Found Academy useful? A $5 donation by May 14 helps us ship more, faster. Every donor counts (QF matching).

Donate
Phase 01: Build

Build Real Protocols. From Scratch.

Pick a production protocol. Write every function yourself, guided by starter code with TODO blocks. Pass automated tests that verify your implementation. Walk away understanding every line of the protocol you want to fork.

1. Learn

Each section starts with theory. How the protocol works, why it was designed this way, what the key invariants are.

+5 Lynx per section

2. Build

You get starter code with the contract structure. State variables, events, function signatures. Your job: write the function bodies.

+15 Lynx per section

3. Test

Automated tests verify your implementation. Did you apply the fee correctly? Is the reentrancy guard in place? Instant feedback.

Must pass to proceed

4. Complete

When all sections pass, you have a complete, multi-contract protocol. Factory, Pair, Router. All connected. All yours.

+50 Lynx for Final Build

Why build it instead of forking it?

Most builders clone a protocol, change the fee, swap the logo, and deploy. But they don't understand why the constant product formula uses 997/1000. They don't know why minimum liquidity exists. They can't modify the core without breaking invariants they never knew about. Building it yourself, function by function, means you know exactly what to keep, what to change, and what to remove when you build your own protocol on top of it.

Available Now

Building Uniswap V2
Fundamental
engineering
16 sections

Constant product AMM. Factory, Pair, Router, Library. The protocol most DeFi forks are built on.

Building Compound V2
Easy
engineering
18 sections

The most forked lending protocol. cTokens, Comptroller risk engine, interest rates, borrowing, and liquidation. 18 sections.

Building Yearn V2
Medium
engineering
18 sections

The most-forked vault aggregator. Multi-strategy capital allocation, locked-profit JIT defense, first-depositor and donation defenses, the harvest cycle. 18 sections.

Coming Soon

More protocols are being built. Each one follows the same process: learn, build, test, complete.

Coming Soon

Building Uniswap V3

Concentrated liquidity. Ticks, positions, oracle integration. The next level of AMM design.

Coming Soon

Building QuantAMM

Temporal function AMMs with dynamic weights. Advanced DeFi architecture for research-minded builders.

Common Questions

What does 'build from scratch' mean?
You get starter code with the contract structure: state variables, events, function signatures. Your job is to write the function bodies. The swap math, the fee calculation, the LP token logic. TODO blocks with hints guide you, but the thinking is yours.
How are my answers verified?
Each section has automated pattern-matching tests. They check for specific code patterns: the correct fee math (997/1000), reentrancy guards, sqrt formulas, K invariant checks. You must pass all tests to complete a section.
What do I walk away with?
A complete, multi-contract protocol (Factory, Pair, Router, Library) that you built and deeply understand. It is production architecture, modernized to Solidity 0.8.x. You can deploy it to testnet, modify it for your own project, or use it as the foundation for your protocol.
How long does it take?
The Uniswap V2 module has 16 sections. Most builders complete it in 2 to 4 weeks, spending a few hours per week. You can go at your own pace.
Why not just fork the protocol?
Most builders fork a protocol without understanding it. They clone Uniswap V2, change the fee, swap the logo, and deploy. But they cannot modify the core without breaking invariants they never knew existed. Building it yourself means you know what to keep, what to change, and what to remove.

After you build it, audit it.

Once you complete a protocol, the Shadow Arena unlocks a real fork from a past security contest. Find the vulnerabilities. Get scored. Learn what you missed.

Explore the Shadow Arena