Context
When a price oracle update is pending in the mempool, its effect on health factors is already knowable — no need to wait for the block to land. Pre-computing liquidation txs against the incoming price gives us a head start on every competing bot that waits for confirmation.
Scope
charon-scanner/src/mempool.rs with a MempoolMonitor task
subscribe_pending_transactions() via alloy pub-sub
- Detect txs whose
to address matches a known oracle (Venus Oracle, Chainlink, etc.)
- Decode the new price from calldata
- Simulate: which tracked positions would cross
health_factor < 1.0 at the new price?
- Push pre-computed
LiquidationOpportunity into the executor queue, flagged as "pre-computed"
- When the block lands, fire immediately (zero compute delay)
Acceptance criteria
References
- PRD section 6b (Mempool Monitoring & Pre-computation)
- PRD Diagram 06 (MEV Defense Pipeline)
Context
When a price oracle update is pending in the mempool, its effect on health factors is already knowable — no need to wait for the block to land. Pre-computing liquidation txs against the incoming price gives us a head start on every competing bot that waits for confirmation.
Scope
charon-scanner/src/mempool.rswith aMempoolMonitortasksubscribe_pending_transactions()via alloy pub-subtoaddress matches a known oracle (Venus Oracle, Chainlink, etc.)health_factor < 1.0at the new price?LiquidationOpportunityinto the executor queue, flagged as "pre-computed"Acceptance criteria
Position.health_factoras a fresh scan would post-confirmationReferences