Milestones
Status: Active Audience: Grant reviewers, internal planning
Overview
This protocol is a fully on-chain perpetual futures exchange on Solana. It uses a Central Limit Order Book (CLOB) with a slab-based critbit tree, price-time priority matching executed inline on-chain and isolated margin per position. Traders and external vault managers interact with two Anchor programs (the Perps Program and the Vault Program) through a web trading interface and API server.
The protocol launches with two protocol-owned vaults: a Market-Making Vault providing order book depth and a Liquidation Vault absorbing insolvent positions. External managers can deploy their own vaults using the same on-chain mechanism.
The protocol will initially launch without a token. A points-based incentive system will encourage early trading activity. Token economics are deferred to a future phase.
Milestone 1: Research, Architecture & Visual Prototype
Delivery Date: TBD Milestone Cost: $5,000
Goal: Establish the technical foundation and deliver a working visual prototype with mock data that demonstrates the product vision.
Deliverables
- Research documentation: competitor analysis, CLOB vs Peer-to-Pool trade-offs, key concepts glossary
- Full architecture specification: smart contract design, service architecture, database model, indexer design, oracle integration, fee structure, trading mechanics, user and admin stories
- Prototype API: wallet authentication, market data endpoints and real-time WebSocket channels, all backed by mock data
- Prototype Web App: trade page (chart, live order book, order form), account management, funds modals and vaults listing
Acceptance Criteria
- All architecture documents published in the repository covering the full protocol design
- Prototype API is running and serving mock market data via REST and WebSocket
- Trade page displays live mock price updates, order book depth and accepts order input
- Wallet authentication flow works end-to-end
Evidence of Completion
- Video walkthrough of the prototype: wallet connect, trade page with live mock data, order form interaction, vaults listing and funds modals
Milestone 2: Core On-chain Programs & Devnet Integration
Delivery Date: TBD Milestone Cost: $15,000
Goal: Deploy the core Perps and Vault programs to Solana devnet and connect the prototype to real on-chain state.
Deliverables
- Perps Program (core): order book (slab-based critbit tree, inline matching, price-time priority), margin deposits and withdrawals, place order (limit + market), cancel order, close position, Pyth oracle validation, admin authority on all privileged instructions
- Vault Program (basic): vault creation with configurable fees and lockup, LP share minting and burning, NAV per share calculation, user deposit and withdrawal, admin authority on all privileged instructions
- Both programs deployed to Solana devnet
- Prototype web app connected to devnet programs (real transactions, real on-chain state)
- Admin panel (basic): market initialization and oracle feed configuration, restricted to the admin wallet
Acceptance Criteria
- A complete order lifecycle executes successfully on devnet: deposit margin, place limit order, match against a taker, close position, withdraw margin
- A basic vault lifecycle executes successfully on devnet: create vault, deposit, withdraw
- Oracle staleness and confidence checks reject invalid price feeds
- Admin-only instructions reject any signer that is not the stored admin pubkey
- Web app submits real transactions that confirm on devnet
Evidence of Completion
- Video walkthrough demonstrating the full devnet trading flow: wallet connect, deposit, place order, fill, close position, withdraw and basic vault deposit and withdrawal
Milestone 3: Complete On-chain Programs
Delivery Date: TBD Milestone Cost: $12,000
Goal: Complete both Anchor programs with the full instruction set, a comprehensive test suite and a published IDL.
Deliverables
- Perps Program (complete): funding rate accrual and settlement, liquidations, adjust position margin, full admin and emergency controls (pause, freeze, market deprecation, admin transfer)
- Vault Program (complete): manager trading via CPI into the Perps Program, vault freeze and unfreeze, admin force freeze and deprecation, performance fee collection
- Anchor IDL generated and published
- Test suite covering all instructions, order matching scenarios, funding rate accrual, liquidation flow, vault lifecycle and oracle rejection cases
- Admin panel expanded with full controls: pause markets, freeze accounts, deprecate markets, transfer admin
Acceptance Criteria
- Funding rate accrues and settles correctly across multiple intervals
- A position below maintenance margin is liquidated
- Vault manager can place orders on behalf of the vault via CPI
- Admin controls (pause, freeze, deprecate) work correctly across both programs
- All test cases pass
Evidence of Completion
- Deployed program IDs on Solana devnet (verifiable on-chain)
- Published Anchor IDL
- Test suite results showing all cases passing
- Video demonstrating a liquidation and a funding settlement cycle on devnet
Milestone 4: Off-chain Infrastructure
Delivery Date: TBD Milestone Cost: $10,000
Goal: Build the Indexer and Keeper Bot and connect the API Server to real on-chain state.
Deliverables
- Indexer: subscribes to on-chain program logs and account changes, writes history records to Database (trades, closed positions, filled and canceled orders, margin movements, vault transactions), publishes real-time events to Redis for WebSocket broadcasts, runs hourly stats jobs (account snapshots, vault stats, market stats) and a periodic leaderboard recompute job. High-speed data infrastructure is critical - understanding Solana's event system (Geyser, program logs, account subscriptions) is a prerequisite for the indexer and real-time UI.
- Keeper Bot: two off-chain components - (1) a liquidation bot that monitors open positions and submits liquidations for underwater accounts, and (2) a market-maker bot that organizes vault liquidity on the order book. Both call permissionless funding settlement on each interval.
Acceptance Criteria
- Indexer processes all on-chain events and writes the correct records to the database.
- A fill event on devnet produces a trade record in the database and triggers a WebSocket broadcast to subscribed clients
- Keeper Bot detects and liquidates an underwater position on devnet without manual intervention
- Market-maker bot maintains two-sided quotes on the order book
- Funding settlement is called automatically on each interval for all active markets
- API returns a valid unsigned transaction for place order, cancel order, deposit, withdraw and transfer that the client can sign and submit successfully
Evidence of Completion
- Video demonstrating a complete trade flow on devnet where the indexer populates records visible in the API in real time, the Keeper Bot liquidates an underwater position automatically and the client signs and submits a transaction built by the API Server
Milestone 5: Full Trading Interface & Monitoring
Delivery Date: TBD Milestone Cost: $8,000
Goal: Complete all pages of the web app connected to real on-chain state and put monitoring in place before mainnet.
Deliverables
- Trade page: live positions and open orders from chain via WebSocket, market stats from the indexer
- Portfolio page: equity chart, open positions, open orders, trade history, funding history, deposit and withdrawal history
- Vaults pages: real TVL and NAV from chain, share price chart, deposit and withdraw flow
- Leaderboard page: all-time PnL, realized PnL, volume, win rate, Sharpe ratio, max drawdown
- Monitoring: dashboards for protocol health (TVL, open interest, market state), Keeper Bot uptime (funding settlement, liquidation processing) and API availability, with alerting for critical failures
Acceptance Criteria
- A user can connect a wallet, deposit margin, place a limit order, see it appear in the open orders tab, have it filled, see the resulting position, close the position and withdraw the proceeds, all without leaving the web app
- Real-time updates (order book, positions, account balance) are reflected in the UI within seconds of the on-chain transaction confirming
- Portfolio page displays accurate equity and PnL history from the indexer
- Leaderboard displays correct rankings based on all-time PnL
- Vault deposit and withdraw transactions are built and signed correctly
- Monitoring dashboards are live and alerts fire correctly on simulated failures (Keeper Bot stopped, API down)
Evidence of Completion
- Video walkthrough of the complete end-to-end trading experience on devnet covering all pages
- Monitoring dashboard screenshot or recording showing live data and a triggered alert
Milestone 6: Security & Mainnet
Delivery Date: TBD Milestone Cost: $10,000
Goal: Admin governance layer and mainnet deployment. Independent security audit funded separately by the Solana Foundation.
Deliverables
- Independent security audit of both programs with all critical and high findings resolved. Audit report published
- Timelock mechanism for admin instructions (propose, delay, execute) with multi-sig compatibility via Squads. Upgrade authority transferred to multi-sig
- SEAL Framework Checklist (SFC) for Multisig Operations certification, covering governance, signer security, operational procedures and emergency operations
- Mainnet deployment: both programs deployed and verified, SOL-PERP market initialized, Market-Making Vault and Liquidation Vault seeded, full production stack live
Acceptance Criteria
- Audit completed by an independent security firm with no unresolved critical or high severity findings
- Admin instructions on mainnet require timelock and multi-sig approval before execution
- Upgrade authority is held by a multi-sig wallet, not a single private key
- SFC for Multisig Operations certification passed
- Both programs are deployed and verified on Solana mainnet-beta with publicly known program IDs
- SOL-PERP market is live and accepting orders
- Market-Making Vault and Liquidation Vault are active with initial capital
Evidence of Completion
- Published audit report from the security firm
- Mainnet program IDs verifiable on-chain
- Multi-sig wallet address and timelock configuration published
- SFC certification report published
- Live production web app URL on mainnet
Milestone 7: Developer SDK & Ecosystem
Delivery Date: TBD Milestone Cost: $5,000
Goal: Release a TypeScript SDK that allows external developers to integrate with the protocol and publish supporting documentation and examples.
Deliverables
- TypeScript SDK covering all core operations: place order, cancel order, deposit margin, withdraw margin, vault deposit and withdrawal, account management
- Integration examples: a basic market making bot and a minimal trading interface built on top of the SDK
- SDK reference documentation published on the protocol docs site
- SDK published to npm with supply chain security: npm provenance via Sigstore, 2FA enforced on the publish account, granular CI publish tokens and minimal external dependencies
- All repository commits signed with GPG to provide a verifiable chain of trust from developer to published package
Acceptance Criteria
- A developer can integrate with the protocol using only the SDK without calling the API directly
Evidence of Completion
- npm package URL
- Published SDK docs on the protocol docs site