Protocol-specific classes for Uniswap V2 — the constant-product (x · y = k) AMM. These live in uniswappy and are imported into DeFiPy’s namespace at install time.
When working through DeFiPy’s Core API, you typically don’t touch these classes directly — Join, Swap, AddLiquidity, etc., dispatch to them under the hood. You’ll reach for them when you need to construct a pool from scratch (the factory.deploy(exchg_data) pattern), inspect protocol-specific state, or extend the library.
The fee is hard-coded at 30 bps.UniswapExchange has no .fee attribute — the multiplier 997/1000 is baked into get_amount_out0/1. This is correct for canonical V2; non-30-bps V2 forks would need a different exchange class.
First-mint sentinel. V2’s MINIMUM_LIQUIDITY is burned to address "0" on first Join. Filter out the "0" entry when iterating LP holders.
token0 / token1 are bare strings. Not full ERC20 objects. The full ERC20 instance lives at factory.token_from_exchange[lp.name][lp.token0].