degenbot.aerodrome¶
Aerodrome V2/V3 liquidity pools and trackers.
Submodules¶
Package Contents¶
- class degenbot.aerodrome.AerodromeV2Pool(*args: Any, **kwargs: Any)¶
Bases:
degenbot.aerodrome.v2_pool_state.AerodromeV2PoolState,degenbot.aerodrome.v2_pool_calc.AerodromeV2PoolCalc,degenbot.types.abstract.AbstractLiquidityPoolAerodromeV2Pool class.
- type PoolState = AerodromeV2PoolState¶
- FEE_DENOMINATOR = 10000¶
- deployer_address: degenbot.types.chain.ChecksummedAddress¶
- classmethod from_handle(py_pool: degenbot.types.Pool) Self¶
Wrap a Rust-owned
Poolhandle as a Python companion.Internal seam (ADR-005, Polars-style
_from_pydfpattern). Every identity field (address, tokens, factory, fee, stable, variant) is read off the handle; reserves live in Rust (AerodromeV2PoolState) and are read viasnapshot_aerodrome()— the PythonStateCacheis gone.- Returns:
A
clsinstance wrappingpy_pool.- Raises:
DegenbotValueError – If the handle is not an Aerodrome V2 pool.
- property state: PoolState¶
State.
- Raises:
DegenbotValueError – If the Rust snapshot is absent.
- property update_block: degenbot.types.aliases.BlockNumber¶
Update block.
- static swap_is_viable(state: PoolState, vector: degenbot.uniswap.types.UniswapPoolSwapVector) bool¶
Swap is viable.
- Returns:
The computed boolean value.
- external_update(update: degenbot.aerodrome.types.AerodromeV2PoolExternalUpdate) None¶
External update.
- Raises:
ExternalUpdateError – See function documentation.
- discard_states_before_block(block: degenbot.types.aliases.BlockNumber) None¶
Discard cached states earlier than the given block.
- Raises:
NoPoolStateAvailable – See function documentation.
- restore_state_before_block(block: degenbot.types.aliases.BlockNumber) None¶
Restore the last pool state recorded prior to a target block.
Use this method to maintain consistent state data following a chain re-organization.
- Raises:
NoPoolStateAvailable – See function documentation.
- class degenbot.aerodrome.AerodromeV3Pool(*args: Any, **kwargs: Any)¶
Bases:
degenbot.uniswap.v3_liquidity_pool.UniswapV3PoolAerodromeV3Pool class.
- type PoolState = AerodromeV3PoolState¶
- TICK_STRUCT_TYPES = ('uint128', 'int128', 'int128', 'uint256', 'uint256', 'uint256', 'int56', 'uint160', 'uint32', 'bool')¶
- class degenbot.aerodrome.AerodromeV2PoolTracker(*, factory_address: str, bot: degenbot.bot.Bot, chain_id: degenbot.types.aliases.ChainId | None = None, deployer_address: degenbot._ffi.ChecksummedAddress | str | None = None, pool_init_hash: str | None = None)¶
Bases:
_AbstractAerodromeV2PoolTracker[degenbot.aerodrome.pools.AerodromeV2Pool]Generate and track concrete instances of V2 liquidity pool helpers.
Tracks Uniswap V2 liquidity pool helpers or their child classes.
- class degenbot.aerodrome.AerodromeV3PoolTracker(*args: Any, **kwargs: Any)¶
Bases:
degenbot.uniswap.trackers.AbstractUniswapV3PoolTracker[degenbot.aerodrome.pools.AerodromeV3Pool]AerodromeV3PoolTracker class.
- abstractmethod get_pool_from_tokens_and_fee(*args: Any, **kwargs: Any) Never¶
Return pool from tokens and fee.
- class degenbot.aerodrome.AerodromeV2PoolState¶
Bases:
degenbot.types.abstract.AbstractPoolStateAerodromeV2PoolState class.
- class degenbot.aerodrome.AerodromeV3PoolState¶
Bases:
degenbot.uniswap.v3_types.UniswapV3PoolStateAerodromeV3PoolState class.