AI-Native DeFi Operating System on Sui - Monorepo template for building TortoiseOS dApps with Move, Bun, and AI integration.
Inspired by bun-eth, adapted for Sui Move development.
- 🚀 Bun-Native: No transpilation, instant execution
- 🔗 Sui Move Integration: Full Move smart contract development
- 🤖 AI-Ready: Built-in Walrus + Nautilus TEE support
- 🔐 awesome-seal Ready: Security & privacy patterns integrated
- ⚡ Hot Reload: Move contracts auto-generate TypeScript types
- 🐳 Docker Compose: Complete local development stack
- 📦 Monorepo: Shared packages, unified tooling
- 🔧 Task Automation: Comprehensive task runner via Taskfile
# Create new project
bunx create-bun-move my-tortoise-dapp
# Setup
cd my-tortoise-dapp
cp .env.example .env
task setup
# Start development
task dev:full
# Access
# - Web: http://localhost:3000
# - API: http://localhost:3001
# - Sui Node: http://localhost:9000📱 Apple Silicon Users: Due to CPU architecture limitations, run Sui natively instead of in Docker:
./scripts/start-sui-local.sh # Start Sui locally docker compose -f docker/docker-compose.yml up api web postgres redis -dSee Development Guide for detailed instructions.
bun-move/
├── apps/
│ ├── api/ # Elysia backend
│ └── web/ # Next.js frontend
├── packages/
│ ├── move/ # Sui Move smart contracts
│ │ ├── core/ # Core modules + governance
│ │ ├── amm/ # TortoiseSwap (AMM)
│ │ ├── vault/ # TortoiseVault (Auto-compounder)
│ │ ├── stablecoin/ # TortoiseUSD (NFT-backed stablecoin)
│ │ ├── arb/ # TortoiseArb (Arbitrage bot)
│ │ ├── bridge/ # TortoiseBridgeX (Cross-chain)
│ │ ├── rwa/ # RWA Vault
│ │ ├── btcfi/ # BTCfi Aggregator
│ │ ├── privacy/ # Privacy Vault
│ │ ├── prediction/ # Prediction Market
│ │ └── orderbook/ # Orderbook Launcher
│ ├── core/ # Shared utilities
│ ├── sdk/ # TypeScript SDK
│ ├── ai-integration/ # Walrus + Nautilus TEE
│ ├── move-deployer/ # Hot reload system
│ └── create-bun-move/ # CLI scaffolder
├── tooling/tasks/ # Task automation
├── docker/ # Docker Compose
└── docs/ # Documentation
10 AI-powered DeFi products on Sui:
| Product | Description | AI Integration | Phase |
|---|---|---|---|
| TortoiseSwap | AMM with adaptive fees | ML volatility model | 1 |
| TortoiseVault | Auto-compounding yields | RL optimizer in TEE | 1 |
| TortoiseUSD | NFT-backed stablecoin | Vision + NLP valuation | 2 |
| TortoiseArb | Arbitrage & MEV bot | GNN signal generator | 2 |
| TortoiseBridgeX | Cross-chain router | Multi-agent LangChain | 3 |
| RWA Vault | Real-world asset tokenization | LLM fraud detection | 3 |
| BTCfi Aggregator | Bitcoin yield on Sui | LSTM correlation forecast | 3 |
| Privacy Vault | Private yields | Homomorphic encryption | 4 |
| Prediction Market | AI-resolved markets | Ensemble oracles | 4 |
| Orderbook Launcher | CLOB deployment | Prophet liquidity forecast | 4 |
- Bun >= 1.1.0
- Sui CLI (optional, for local builds)
- Docker (optional, for full stack)
- Task (optional, recommended)
# Setup
task setup # Install dependencies
task setup:sui # Install Sui CLI
# Development
task dev:full # Start full stack (Docker)
task dev:api # Start API only
task dev:web # Start web only
task dev:sui # Start Sui node only
# Move Contracts
task move:build # Build all Move packages
task move:test # Run Move tests
task move:deploy # Deploy to configured network
# Testing
task test:all # Run all tests
task test:move # Run Move tests
task test:ts # Run TypeScript tests
# Deployment
task deploy:localnet # Deploy to local Sui
task deploy:devnet # Deploy to devnet
task deploy:testnet # Deploy to testnet
# Cleanup
task clean:all # Clean all artifacts
task clean:move # Clean Move builds
task clean:docker # Remove Docker containers- Deploy contracts:
task move:deploy - Auto-generate types: Move deployer scans packages
- TypeScript types: Creates
deployedContracts.ts - Frontend refresh: Next.js hot reload
import { createWalrusClient, createNautilusClient } from "@bun-move/ai-integration";
// Store model weights on Walrus
const walrus = createWalrusClient({ endpoint: WALRUS_ENDPOINT });
const hash = await walrus.storeModelWeights("model-v1", weights);
// Execute in TEE
const nautilus = createNautilusClient({ endpoint: NAUTILUS_ENDPOINT });
const { result, attestation } = await nautilus.executeInTEE(hash, input);import { createClient } from "@bun-move/sdk";
const client = createClient("localnet");
const balance = await client.getBalance(address);# Network
SUI_NETWORK=localnet
SUI_RPC_URL=http://localhost:9000
# Ports
WEB_PORT=3000
API_PORT=3001
SUI_LOCAL_PORT=9000
# AI Integration
WALRUS_ENDPOINT=https://walrus-testnet.mystenlabs.com
WALRUS_BUCKET_ID=your-bucket-id
NAUTILUS_TEE_ENDPOINT=your-tee-endpoint
NAUTILUS_API_KEY=your-api-key
# Deployment
DEPLOYER_PRIVATE_KEY=your-private-key# Start local Sui node
task dev:sui
# Deploy contracts
task deploy:localnet
# Verify
sui client objects# Configure network
export SUI_NETWORK=devnet
# Deploy
task deploy:devnet
# Verify on explorer
# https://suiexplorer.com/?network=devnet# PRODUCTION - use with caution
task deploy:mainnet- ML Models: Volatility prediction, fee optimization
- RL Agents: Yield strategy optimization
- GNN: Graph analysis for arbitrage
- LSTM: Time-series forecasting
- LLM: Document analysis, fraud detection
- Prophet: Liquidity forecasting
Train Model → Store on Walrus → Deploy to TEE → On-chain Verification
$LAB Token: Governance token for AI model updates
// Vote on model updates
public entry fun vote_on_model(
proposal: &mut Proposal,
lab_tokens: Coin<LAB>,
vote: bool
)# Move tests
sui move test
# TypeScript tests
bun test
# E2E tests
bun test tests/e2e# Start full stack (Linux/AMD64)
docker compose -f docker/docker-compose.yml up
# Start without Sui (Apple Silicon)
docker compose -f docker/docker-compose.yml up api web postgres redis
# Services:
# - sui-node: Sui local network (AMD64 only)
# - api: Elysia backend
# - web: Next.js frontend
# - postgres: State management
# - redis: Caching
⚠️ Apple Silicon Note: The Sui Docker image doesn't support ARM64. Use./scripts/start-sui-local.shto run Sui natively.
- Fork the repository
- Create feature branch:
git checkout -b feature/my-feature - Commit changes:
git commit -m "feat: my feature" - Push:
git push origin feature/my-feature - Open Pull Request
- Phase 0: Foundation (Weeks 0-4)
- Phase 1: Core Stack - AMM + Vault (Months 1-3)
- Phase 2: Collateral - Stablecoin + Arb (Months 4-6)
- Phase 3: Cross-Chain - Bridge + RWA + BTCfi (Months 7-9)
- Phase 4: Privacy + Markets (Months 10-12)
awesome-seal Integration: This project includes comprehensive recommendations for integrating the awesome-seal ecosystem to enhance security and privacy.
See AWESOME_SEAL_EVALUATION.md for:
- 🔒 Encrypted storage with Seal SDK (saves 1-2 weeks)
- 🛡️ Nautilus TEE integration patterns (saves 2-3 weeks)
- 🎯 Token-gated access control (saves 1 week)
- 🔐 Decryptable Move Enum for privacy (saves 1 week)
- Total time savings: 6-12 weeks across development lifecycle
# Create shared Seal integration package
mkdir -p packages/seal-integration
cd packages/seal-integration
bun add @seal/rust-sdk @seal/access-control
# Add to Move packages
# See AWESOME_SEAL_EVALUATION.md for Move.toml configuration- Sui Documentation
- Move Language
- Bun Documentation
- Walrus Storage
- Nautilus TEE
- awesome-seal Ecosystem
MIT License - see LICENSE for details
- GitHub Issues: Report bugs and feature requests
- Discord: Join our community
- Twitter: @TortoiseOS
Built with ❤️ for the Sui ecosystem
🐢 TortoiseOS - Slow and steady wins the DeFi race