degenbot.uniswap.v4_pool_state¶

State mixin for Uniswap V4 concentrated-liquidity pools.

Holds all data attributes (immutable and mutable) and read-only properties that access them. No calculation logic — calculations live in UniswapV4PoolCalc.

V4-specific state: - pool_id: the pool identifier tracked by the V4 PoolManager contract - pool_key: the V4 PoolKey struct (currency0, currency1, fee, tick_spacing, hooks) - hook_address: the hooks contract address - active_hooks: which hook flags are set - protocol_fee: directional protocol fees - lp_fee: the LP fee

Module Contents¶

class degenbot.uniswap.v4_pool_state.V4PoolState¶

Bases: degenbot.uniswap.cl_pool_state.ConcentratedLiquidityPoolState

State for V4-style concentrated-liquidity pools.

Immutable data set at construction: - _token0, _token1: the paired ERC-20 tokens - _pool_id: the pool identifier (bytes) - _pool_key: the V4 PoolKey struct (sparseness is no longer stored here — Rust coverage is the fact)

property token0: degenbot.erc20.Erc20Token¶

Token0.

property token1: degenbot.erc20.Erc20Token¶

Token1.

property tokens: tuple[degenbot.erc20.Erc20Token, degenbot.erc20.Erc20Token]¶

Tokens.