feat: add 10 advanced scenarios from mainnet gas analysis#476
Open
vbuilder69420 wants to merge 2 commits intoflashbots:mainfrom
Open
feat: add 10 advanced scenarios from mainnet gas analysis#476vbuilder69420 wants to merge 2 commits intoflashbots:mainfrom
vbuilder69420 wants to merge 2 commits intoflashbots:mainfrom
Conversation
Add scenario TOML files covering a broad range of EVM gas patterns and real-world DeFi/infrastructure interactions: - erc721: NFT mint and transfer - erc1155: multi-token mint, transfer, and batch transfer - erc4626vault: vault deposit/withdraw with share accounting - governance: proposal creation and voting - lending: collateral deposit, borrow, and repay - simpleAMM: constant-product swaps with 0.3% fee - stablecoin: ETH-backed mint/burn/flash mint - nameRegistry: ENS-like name registration and renewal - multisig: multi-sig submit/confirm/execute - staking: stake/unstake/claim/compound rewards - precompiles/hashPrecompiles: SHA256, RIPEMD160, Identity stress - bridge: L1→L2 deposit simulation (ETH + ERC20) - dutchAuction: time-based pricing with ETH refunds - orderBook: on-chain limit orders with partial fills Also adds campaigns/full-spectrum.toml: a 4-stage campaign (warmup → DeFi ramp → full load → cooldown) that mixes all new scenarios for comprehensive chain stress testing. All contracts are self-contained Solidity 0.8.26, compiled with solc --optimize --optimize-runs 200. Each scenario includes deploy, setup (liquidity/approvals/funding), and fuzzed spam. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Research-driven wave 2: analyzed top gas consumers, block composition, and novel EVM patterns on Ethereum mainnet to identify the highest- impact scenarios missing from contender. New scenarios: - erc4337: Account Abstraction EntryPoint with two-loop validate→execute pattern, deposit accounting, UserOp helper - flashLoan: ERC-3156 flash loan with 5-level deep arbitrage callback (lender→borrower→poolA→poolB→repay) - bondingCurve: Pump.fun-style token launchpad with linear bonding curve math + CREATE2 factory deployment as spam - merkleAirdrop: keccak256-heavy proof verification with packed claimed bitmap (256 claims per storage slot) - create2Factory: ERC-1167 minimal proxy clones via CREATE2 (contract creation as the hot path, not function calls) - multicall3: Batched heterogeneous calls (5-50 per tx), testing memory expansion and loop overhead - weth: WETH9 wrap/unwrap — one of highest-volume mainnet contracts, covers payable+msg.value+ERC20 mint pattern - stableSwap: Curve-style StableSwap AMM with Newton's method iteration (up to 255 rounds per swap) — fundamentally different gas profile from constant-product AMMs - mevSandwich: MEV sandwich bundles using [[spam.bundle.tx]] with frontrun→victim→backrun atomic ordering - diamondProxy: EIP-2535 Diamond with delegatecall dispatch routing through CounterFacet, TokenFacet, StorageFacet All contracts self-contained Solidity 0.8.26, compiled with solc --optimize --optimize-runs 200. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wave 2 of scenario expansion, informed by analyzing Ethereum mainnet block composition, top gas consumers (Etherscan/Dune), and emerging EVM patterns.
Builds on top of #475 (14 basic scenarios + campaign).
New scenarios
erc4337.tomlflashLoan.tomlbondingCurve.tomlmerkleAirdrop.tomlcreate2Factory.tomlmulticall3.tomlweth.tomlstableSwap.tomlmevSandwich.toml[[spam.bundle.tx]]frontrun→victim→backrundiamondProxy.tomlWhat's different from wave 1
These scenarios exercise fundamentally different EVM codepaths:
Test plan
contender setup scenario:<name>.toml)mevSandwich) test bundle submission path🤖 Generated with Claude Code