Expand description
Message handler that maintains the Pool state stored in the global [Cache].
The handler is functionally equivalent to BookUpdater but for DeFi liquidity
pools. Whenever a [PoolSwap] or [PoolLiquidityUpdate] is published on the
message bus the handler looks up the corresponding Pool instance in the
cache and applies the change in-place (for now we only update the ts_init
timestamp so that consumers can tell the pool has been touched).
Structsยง
- Pool
Collect Handler - Handler for pool fee collect events that delegates to a
PoolUpdater. - Pool
Flash Handler - Handler for pool flash events that delegates to a
PoolUpdater. - Pool
Liquidity Handler - Handler for pool liquidity update events that delegates to a
PoolUpdater. - Pool
Swap Handler - Handler for pool swap events that delegates to a
PoolUpdater. - Pool
Updater - Handles [
PoolSwap]s and [PoolLiquidityUpdate]s for a single AMM pool.