Skip to content

[study] (1h) V2 AMM refresher — constant product, reserves, LP tokens #72

@ozpool

Description

@ozpool

Goal

Refresh V2 mechanics so V3/V4 additions land in contrast.

Time estimate

1h (single focused session)

Study plan (in order)

  1. [15 min] Uniswap V2 whitepaper §2 'Functionality' and §3 'Constant Product Formula'
  2. [15 min] uniswap/v2-core: contracts/UniswapV2Pair.sol — read swap, mint, burn
  3. [15 min] Hands-on: compute LP tokens minted when you deposit (100 A, 200 B) into a pool with reserves (500 A, 1000 B)
  4. [15 min] Write answers to the outcomes below from memory

Total: 60 min

After studying, you can

  • Explain x * y = k and its price-impact implications
  • Compute LP token minting given reserves + deposit amounts
  • Describe V2's 0.3% flat-fee accrual model
  • Articulate capital inefficiency for correlated pairs (stablecoins)

Tradeoff prompt for the architectural review

When is V2's simplicity still the right model vs V3 CL?

References

  • Uniswap V2 whitepaper
  • uniswap/v2-core (GitHub)

Metadata

Metadata

Assignees

Labels

priority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick uptype:studyArchitecture study / research issue

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions