Skip to main content

Module bundle

Module bundle 

Source
Expand description

Multi-transaction bundle simulation over cumulative block state, plus coinbase / miner-payment accounting (Phase 6 Track A+B).

A bundle is an ordered sequence of Call-kind transactions applied to a single overlay so that transaction i observes the committed writes of transactions 0..i — the minimal primitive an MEV searcher needs to value a candidate set of transactions as a unit. It is intentionally not a block builder: there is no mempool, ordering auction, or Create-kind support (see the Phase 6 spec non-goals).

The execution itself lives in EvmOverlay::simulate_bundle (and the cache-side convenience EvmCache::simulate_bundle); this module owns the public vocabulary those methods speak.

§Coinbase accounting

BundleResult::coinbase_payment is the block beneficiary’s balance delta across the bundle — the honest miner payment. Under EIP-1559 (London+, which this engine runs by default) revm credits the beneficiary only the priority fee ((effective_gas_price − basefee) × gas_used) and burns the base-fee portion in-EVM, so the delta already excludes the base fee. It also captures any direct value transfers to the beneficiary (an explicit coinbase tip). So coinbase_payment = Σ priority_feeᵢ × gas_usedᵢ + direct coinbase tips, over the transactions whose effects are kept. Set the base fee with EvmCache::set_basefee to model a non-zero base fee (a higher base fee lowers the priority fee, and thus the payment, for a fixed gas_price). All arithmetic is saturating.

Structs§

BundleOptions
Options controlling a bundle simulation.
BundleResult
Result of a bundle simulation.
BundleTx
One transaction in a bundle.
TxOutcome
Outcome of a single transaction executed within a bundle.

Enums§

RevertPolicy
What happens when a bundle transaction reverts (or halts).