Sub-cent fees and 400-millisecond blocks let a matching engine live on-chain — build the trading and lending programs that need it.
You have shipped an Anchor program or two, but every decentralised finance protocol you open on Solana looks nothing like the Ethereum tutorials you learned from. There is no msg.sender, state is scattered across accounts you must pass in explicitly, and the biggest exchanges run a real limit order book on-chain rather than a swap curve. This course explains why: sub-cent fees and 400-millisecond slots make placing and cancelling orders cheap enough to matter, and the Sealevel runtime rewards programs that declare up front which accounts they touch. You build the pieces yourself in Anchor Rust — a matching engine with price-time priority, a concentrated-liquidity automated market maker with tick math, an isolated-pool lending market, a perpetual futures engine with funding rates, and a liquid staking pool. You wire in Pyth pull-based oracles with staleness and confidence checks, route swaps through the Jupiter aggregator, and audit your code against the account-confusion and missing-signer bugs that have drained real Solana programs. Five capstones are on offer; you pick one and deploy it to devnet.
Built by Lakshya Kumar
Paste this into any AI chat. Fill in the bracketed parts with your context — you'll get back a straight answer on whether this belongs on your plate.
We grant free access case-by-case — students, career-switchers, builders on a tight budget. Sign in to send us a note.
Sign in to applyFinished the tasks? Take the prompt to your AI and get tested on it. We copy the prompt and open the app — just paste it in.
Phoenix-style books keep bids and asks in slab accounts — see how price-time priority survives when every order is a transaction.
Concentrated liquidity puts capital in a price range instead of a curve — build the tick arrays and fee accumulators that track it.
One swap can hop three pools before it settles — learn how the router picks a path and what your slippage setting actually buys.
Isolated pools stop one bad asset from sinking the whole book — build deposits, borrows, and a liquidator bot that reacts in seconds.
A perpetual has no expiry, so funding payments drag its price toward the index — build that loop and the margin checks around it.
Pyth gives a price with a confidence band, not a single number — learn to reject stale or uncertain feeds before they liquidate someone.
A stake pool token tracks a conversion rate that moves each epoch — build the deposit, delegation, and withdrawal paths behind it.
Solana loses money to missing signer checks and account confusion, not reentrancy — learn to find those before an auditor does.
A deployed program with no depositors is dead — see how Solana protocols bootstrap the first liquidity and keep it after incentives stop.
Complete all modules, then submit the required number of capstone projects. Each must earn a passing rating from an admin reviewer.
Build a minimal on-chain CLOB in Anchor: place_limit_order, cancel, match_taker_order with price-time priority. Support slab-allocated order book, maker-taker fees, and on-chain depth queries. Deploy to devnet with at least 2 trading pairs. Stress-test matching by simulating 10k random orders with property-based tests proving the price-time invariant holds.
I am learning to build production-grade DeFi protocols on Solana — Phoenix-style order books, Orca/Raydium AMMs and concentrated liquidity, Jupiter aggregation, MarginFi/Kamino lending, Drift perps with funding rates, Pyth oracles, mSOL/jitoSOL liquid staking, Sealevel-specific security patterns, and Solana DeFi GTM. Help me understand the actual mechanics with reference to real Anchor programs, real exploits, and real production patterns.
Build a minimal CLMM in Anchor: tick-array account layout, position NFTs via SPL token, fee growth accumulator, sqrt-price math, tick crossing. Benchmark execution efficiency (CU usage) and capital efficiency against Orca whirlpools on devnet. Include a 24h paper-trading log demonstrating fee accrual to LP positions across multiple price ranges.
Build an Anchor lending market with a cross-margin main pool and isolated pools for risky assets. Support deposit, borrow, withdraw, repay, liquidate. Integrate Pyth oracles with staleness + confidence checks. Build a liquidator bot that achieves <2s reaction time on devnet. Stress-test under a simulated 30% price drop and verify all underwater positions get liquidated without bad debt drift.
Build a single-market perp DEX in Anchor: orderbook matching (or vAMM), funding rate settlement, mark-price computation (Pyth + smoothing), maintenance margin enforcement, liquidations with insurance fund. Integrate Pyth for the index. Deploy to devnet and run a 24h simulated trading session with 100 traders and reconcile PnL to zero drift.
Build an SPL stake pool from scratch: deposit SOL, distribute across mock validators, mint pool tokens. Support both instant and delayed withdrawal. Implement manager fee on rewards only (not on principal). Deploy to devnet and demonstrate conversion-rate growth across simulated epoch boundaries. Bonus: include MEV-tip absorption from a mock Jito tip account.
Reference for concentrated-liquidity AMM on Solana. Used in M3.