Skip to content

feat: add 14 new scenarios and full-spectrum campaign#475

Open
vbuilder69420 wants to merge 1 commit intoflashbots:mainfrom
vbuilder69420:feat/new-scenarios
Open

feat: add 14 new scenarios and full-spectrum campaign#475
vbuilder69420 wants to merge 1 commit intoflashbots:mainfrom
vbuilder69420:feat/new-scenarios

Conversation

@vbuilder69420
Copy link

Summary

  • Adds 14 new TOML scenario files covering a broad range of EVM gas patterns and real-world protocol interactions
  • Adds 1 new campaign (full-spectrum.toml) that mixes all scenarios across 4 stages
  • All contracts are self-contained Solidity 0.8.26, compiled with solc --optimize --optimize-runs 200
  • Each scenario includes contract deployment, state setup (liquidity/approvals/funding), and fuzzed spam patterns

New scenarios

Scenario Category Gas Profile Spam Patterns
erc721.toml NFT Storage (ownership maps) mint, transferFrom
erc1155.toml Multi-token Calldata + storage scaling mint, transfer, batch transfer
erc4626vault.toml Yield Vaults Share accounting math deposit, withdraw
governance.toml Governance Nested mapping writes createProposal, vote
lending.toml Lending Ratio math + cross-contract depositCollateral, borrow, repay
simpleAMM.toml DEX x*y=k + fee calc swapAForB, swapBForA, addLiquidity
stablecoin.toml Stablecoins Supply tracking + ETH refunds mint, burn, transfer, flashMintBurn
nameRegistry.toml Name Services keccak256 + storage register, renew, setRecord
multisig.toml Infrastructure Dynamic arrays + nested maps submit, confirm, execute
staking.toml Staking Reward calc + external calls stake, unstake, claim, compound
hashPrecompiles.toml Precompiles Pure compute SHA256, RIPEMD160, Identity, batch
bridge.toml Bridges Event-heavy + nonce tracking depositETH, depositERC20, process
dutchAuction.toml Auctions Timestamp math + ETH refunds bid (time-based pricing)
orderBook.toml DEX Array storage + partial fills placeBuy, placeSell, cancel

New campaign

campaigns/full-spectrum.toml — 4-stage progressive load test:

  1. Warmup (50 TPS, 60s) — ERC20, ERC721, ERC1155, stablecoin
  2. DeFi Ramp (150 TPS, 120s) — AMM, lending, staking, vault, orderbook, bridge
  3. Full Load (300 TPS, 180s) — all 14 scenarios simultaneously
  4. Cooldown (30 TPS, 60s) — governance, staking, name registry

Test plan

  • Each scenario parses correctly (contender setup scenario:<name>.toml)
  • Each scenario deploys + spams against a local Anvil node at low TPS
  • Full-spectrum campaign runs all 4 stages without errors
  • No regressions in existing scenarios

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant