Context
The first time everything hangs together. listen subcommand of the CLI should:
- Spawn the block listener
- Feed blocks into the health scanner
- Promote liquidatable positions through the profit calculator
- Route through the flash-loan router
- Hand off to the tx builder + simulator
This is the moment we can see "would liquidate X for $Y profit" appear in the logs end-to-end, even without a deployed contract or signer.
Scope
- Wire all crates together in
charon-cli/src/main.rs under the listen subcommand
ProfitCalculator: gross = collateral × bonus_bps / 10000, net = gross - gas - flash_fee - slippage_estimate
- Drop opportunities below
bot.min_profit_usd from config
- Each stage logs what it consumed and what it emitted
- No signing / no broadcast — pipeline ends at the simulation gate
Acceptance criteria
References
- PRD section 2b (Hot-Path Sequence)
- PRD Diagram 02 (End-to-End Hot Path)
Context
The first time everything hangs together.
listensubcommand of the CLI should:This is the moment we can see "would liquidate X for $Y profit" appear in the logs end-to-end, even without a deployed contract or signer.
Scope
charon-cli/src/main.rsunder thelistensubcommandProfitCalculator:gross = collateral × bonus_bps / 10000,net = gross - gas - flash_fee - slippage_estimatebot.min_profit_usdfrom configAcceptance criteria
cargo run -- --config config/default.toml listenruns the full pipelineReferences