Protocols & testing · Free study companion
Uniswap V3 from Scratch
Follow concentrated liquidity from the mental model to the pool and router. Trace the accounting and explore the security boundaries.
20 Whop lessons · 3 study checkpoints · 5 matching quizzes
Watch the course on Whop ↗
Checkpoint 1
Understand the range
A V3 position supplies liquidity within chosen price boundaries. Liquidity outside the current price is inactive for swap-fee earning; it is not automatically liquidated or moved to follow the price. Compare range choices using the same price path before reasoning about returns.
Check your understanding
Active Liquidity →
5 questions · Worked answers · No sign-in needed
Uniswap V3: Ranges and Active Liquidity →
5 questions · Worked answers · No sign-in needed
Practical challenge
Sketch a price path entering and leaving two different ranges. Mark when each position is active.
Check your work
- Mark both boundaries and the direction of each crossing.
- Distinguish token exposure from earned fees.
Further reading
Checkpoint 2
Follow position accounting
Keep liquidity, fee accrual and collected tokens separate. In V3, fees are not automatically compounded into active liquidity. A withdrawal can return both principal and fees, so the full transfer is not newly earned income. Test sequences, not only one balance snapshot.
Check your understanding
Practical challenge
Make a toy ledger for deposit, two swaps, fee collection and withdrawal.
Check your work
- Separate principal and collected fees.
- Include an out-of-range interval and explain its fee effect.
Further reading
Checkpoint 3
Review boundaries and tests
Range boundaries and state-transition order deserve deliberate tests. A clear invariant says what must remain true across swaps, updates and collections. Check edge values and compare implementation behavior with the intended accounting model rather than treating a happy-path result as proof.
Check your understanding
Invariant →
5 questions · Worked answers · No sign-in needed
Invariant Testing →
5 questions · Worked answers · No sign-in needed
Practical challenge
Write three regression scenarios for a range or fee-accounting change.
Check your work
- Include both crossing directions.
- State an expected property and a counterexample for each scenario.
Further reading
Explain the decision, not just the answer.
After each checkpoint, write one assumption you changed and one test you would add. Bring a sanitized example or a specific question to the free Academy community.
Find your way around the community →