The mechanics are public, the failure modes are not — learn both before you put real money behind a contract you wrote.
You can read a Uniswap contract and still not know why a swap moves the price the way it does, or why a lending market liquidates half its borrowers on a quiet Tuesday. DeFi — decentralised finance, banking primitives rebuilt as public smart contracts — is unforgiving that way: every mechanic is on-chain, and nobody explains it. This course rebuilds them from the arithmetic up. You derive the constant-product formula behind an AMM (automated market maker, the pool that quotes a price instead of matching an order book), then extend it to concentrated liquidity with tick maths. You write an over-collateralised lending market with a kinked interest curve and a liquidation engine, a stablecoin with a controller that defends its peg, and an ERC-4626 vault that compounds without leaking value to a donation attack. You wire Chainlink oracles with staleness guards, build a perpetual futures market with funding, and read EigenLayer restaking as an incentive system, not a slogan. Along the way you learn what TVL (total value locked) and LP (liquidity provider) actually measure, and where both mislead. Every module compiles: real Solidity you test, break, and extend, ending in a capstone protocol you ship to a testnet.
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.
Derive x*y=k yourself, then extend it to concentrated liquidity and see exactly where a large swap loses money to slippage.
Build the interest curve, the health factor, and the liquidation path — the three pieces that decide whether a market survives a crash.
Compare a bank-backed coin, a collateral vault like DAI, and an algorithmic peg by the only measure that counts — how each one fails.
Wire Chainlink feeds with staleness and deviation guards, then build a TWAP and work out what it would cost an attacker to move it.
Implement funding rates, mark price, and margin calls so positions settle honestly instead of drifting profit and loss into thin air.
Ship an ERC-4626 vault that auto-compounds across strategies without letting the first depositor quietly skim from the second.
Follow EigenLayer stake into an outside service and price the risk you inherit the day that service decides to slash.
Work reentrancy, oracle manipulation, donation and governance attacks on real exploited code until the smell becomes obvious.
Plan incentives, governance, and treasury so early liquidity stays once the rewards stop instead of walking to the next protocol.
Complete all modules, then submit the required number of capstone projects. Each must earn a passing rating from an admin reviewer.
Build a Uniswap-v3-lite implementation in Solidity: tick math, fee tiers, position NFTs, fee growth accumulator, and an on-chain governance module that controls parameter changes (new fee tiers, protocol-fee toggle, fee distribution). Deploy to a testnet, seed two markets, run a 24h paper-trading session, and produce a one-page report on capital efficiency vs a V2-style baseline.
I am learning to build production-grade DeFi protocols on Ethereum — AMMs (V2/V3, concentrated liquidity), lending markets (Aave/Compound style), stablecoins (over-collateralized, algorithmic, hybrid), oracles (Chainlink, Pyth, TWAP), derivatives (perps, options), yield aggregation (ERC-4626 vaults), restaking (EigenLayer, LRTs), DeFi risk and audit patterns, and DeFi GTM. Help me understand the actual mechanics with reference to real contracts (Uniswap, Aave, MakerDAO), real exploits, and real production patterns.
Implement a single-asset Aave-style lending market: deposit, borrow, repay, withdraw, and liquidation engine. Use a kinked interest rate model with utilization-based borrow APR. Integrate Chainlink for prices with staleness guards. Build a keeper bot that liquidates underwater positions. Deploy to a testnet and stress-test with 1000 simulated borrowers under a 30% price drop.
Build a RAI-style stablecoin: PI controller for the redemption rate, over-collateralized minting (use ETH or stETH), liquidation auctions, and a savings rate. Demonstrate price stabilization in a simulated market with random demand shocks. Include the controller-tuning analysis: how were Kp and Ki chosen, and what is the stability region? Deploy to a testnet with a working frontend.
Implement a single-market perpetual DEX in Solidity: position open/close, margin management, funding rate settlement, mark-price computation (oracle + smoothing), maintenance margin enforcement, and a liquidation engine with insurance fund. Integrate Chainlink as index and a TWAP from a CL-AMM as cross-check. Run a 24-hour paper trading session and produce reconciliation that proves no PnL drift across thousands of trades.
Build an ERC-4626 vault that rotates capital across at least three DeFi strategies (e.g., Aave supply, Compound supply, Uniswap V3 LP). Implement strategy weights driven by realized APY observation; auto-compound rewards; expose pause + emergency-exit; include access-controlled strategy switching with timelock. Full test coverage including invariant tests against share-price drift and donation attacks.
Reference for lending protocol design. Used in M3.