degenbot.builders.protocol¶
Protocol for pool construction and state updates.
Each builder owns: - The I/O choreography (Rust-backed metadata lookup → RPC fetch → decode → construct) - Pool registration in the Pool Registry - State updates via pool.external_update()
Builders do NOT own: - Pool type resolution (Bot’s job) - I/O routing (received via BotIo — the single Rust-backed executor) - Database I/O (owned by the Rust ConstructionIo handle attached to Bot)
Module Contents¶
- class degenbot.builders.protocol.PoolBuilder¶
Bases:
ProtocolProtocol for pool construction and state updates.
Builders must accept
addressas the first positional-or-keyword parameter inbuild(), andpoolas the first positional-or-keyword parameter inupdate(). Optional parameters are forwarded viarequest: BuildPoolRequest— builders read the fields they recognize and ignore the rest.The
ioargument is aBotIo— the single construction-I/O executor (Rust-backed, 65 methods). There is no sync/async fork;AsyncBotand the async builders are retired.- build(address: str, *, chain_id: int | None = None, io: degenbot._ffi.BotIo, request: degenbot.builders.request.BuildRequest) degenbot.types.abstract.liquidity_pool.AbstractLiquidityPool¶
Build a pool from on-chain data.