Context
The last stop before submission. Encodes the call, prices the gas, dry-runs it via eth_call, and hands off to the signer. BSC uses EIP-1559 (since the Paris hard fork). The simulation gate catches ~99% of races pre-submit so we don't burn gas on losing bids.
Scope
- New
crates/charon-executor/ crate
TxBuilder::build(opportunity) -> SignedTransaction
- Encodes
CharonLiquidator.executeLiquidation(...) calldata from LiquidationOpportunity
- EIP-1559 gas pricing:
max_fee_per_gas = base_fee × 1.2, max_priority_fee from config
eth_call simulation: if the call reverts, abort with the revert reason (no tx sent)
NonceManager: monotonic nonce tracking so concurrent liquidations don't collide
- Skip-submission flag for now (signing comes with wallet setup)
Acceptance criteria
References
Context
The last stop before submission. Encodes the call, prices the gas, dry-runs it via
eth_call, and hands off to the signer. BSC uses EIP-1559 (since the Paris hard fork). The simulation gate catches ~99% of races pre-submit so we don't burn gas on losing bids.Scope
crates/charon-executor/crateTxBuilder::build(opportunity) -> SignedTransactionCharonLiquidator.executeLiquidation(...)calldata fromLiquidationOpportunitymax_fee_per_gas = base_fee × 1.2,max_priority_feefrom configeth_callsimulation: if the call reverts, abort with the revert reason (no tx sent)NonceManager: monotonic nonce tracking so concurrent liquidations don't collideAcceptance criteria
charon-executorcrate compilesTxBuilder::buildreturns a fully-encoded, simulatable txNonceManagerreturns monotonically-increasing nonces concurrentlymaxFeePerGas,maxPriorityFeePerGas) populated correctlyReferences