Crucible - Reproduction Scope & Capabilities¶
This document defines the feasibility parameters for experiments within the Crucible framework. It enumerates supported attack classes, compatible chains, available fidelity levels, and operational boundaries.
Is Your Experiment In Scope?¶
The following decision matrix facilitates assessment of reproduction feasibility.
| Question | If YES | If NO |
|---|---|---|
| Does the exploit target an EVM-compatible chain? | ✅ Proceed | ❌ Out of scope (see Non-EVM Limitations) |
| Does an archive RPC provider exist for that chain at the target block? | ✅ Proceed | ⚠️ Partial - The scenario may be modeled, but historical state forking is unsupported. |
| Is the vulnerability a smart contract bug (not a key compromise)? | ✅ Full reproduction possible | ⚠️ Partial - the contract behaved as designed, but Crucible can still deploy the affected contracts via bridge plugins and demonstrate the exploit path (L2+) |
| Does the exploit involve multiple chains? | ✅ Use a multi-chain topology | Single-chain topology is simpler and recommended |
| Does the exploit require non-EVM components (e.g., Solana relayer)? | ⚠️ Model the EVM side; declare the rest in excluded_components |
✅ Full reproduction possible |
What Crucible Can Reproduce¶
Supported Chain Types¶
Crucible utilizes Foundry's Anvil for historical state forking. Consequently, any EVM-compatible chain is supported, contingent upon the availability of an archive RPC endpoint capable of serving state at the target block.
This includes:
- Mainnet Ethereum
- L2s (Arbitrum, Optimism, Base, etc.)
- Alt-L1s (BSC, Polygon, Avalanche C-Chain, etc.)
- Custom or private EVM networks (by pointing rpc_url in testbed.yaml to your own node)
Archive Depth Warning: While Ethereum archive data is widely available on free tiers, fetching state for very old blocks on chains like BSC or Polygon often requires a paid RPC provider (e.g., GetBlock, QuickNode).
Heuristic: If the RPC endpoint supports
cast call --rpc-url <YOUR_URL> --block <N> <CONTRACT> "balanceOf(address)", Crucible is capable of executing the fork.
Supported Attack Categories¶
Because Crucible operates at the EVM execution layer, there is no whitelist of supported attack types. If the vulnerability can be triggered via standard EVM transactions on a forked chain, it can be reproduced.
Common examples include:
| Category | Typical Fidelity | Reproduction Mechanism |
|---|---|---|
| Smart contract logic bugs (reentrancy, access control, integer overflow, etc.) | L2-L3 | Fork at the pre-exploit block, deploy/execute the exploit contract, capture full traces |
| Bridge protocol vulnerabilities (message verification bypass, guardian bypass, hash collision) | L2-L4 | Deploy bridge plugins to forked chains, simulate malicious cross-chain message flows |
| Flash loan attacks | L2-L3 | Fork at the target block (historical liquidity pools are preserved), replay the flash loan sequence |
| Oracle manipulation | L2-L3 | Fork includes historical oracle state; manipulate the oracle on the fork before executing the exploit |
| Governance / Proxy attacks | L2-L3 | Fork, impersonate governance/multisig accounts using Anvil, execute malicious upgrades |
| MEV / sandwich attacks | L2 | Fork and replay target transactions alongside exploit; Crucible sets strict FIFO ordering to guarantee determinism |
Custom Testing & Novel Attacks¶
Crucible is not limited to reproducing historical exploits. The exact same infrastructure—deterministic EVM forks, multi-chain bridge plugins, and automatic artifact capture—can be used for novel research:
| Use Case | Description |
|---|---|
| Zero-Day Attack Development | Develop and test novel exploits against live/forked mainnet state before responsible disclosure. |
| "What-If" Counterfactuals | Fork before a historical exploit, deploy a hypothetical patch to the vulnerable contract, and prove the exploit would have failed. |
| Custom Contract Testing | Deploy your own protocol contracts to a multi-chain fork environment to test cross-chain logic under realistic latency/state conditions. |
| Agentic Security Research | Use the AgentPlugin interface to give LLM agents access to a sandboxed, forked environment for autonomous vulnerability discovery. |
See Custom Contract Testing for a guide on deploying your own Solidity code.
Supported Fidelity Levels¶
Crucible defines a 5-level fidelity system that describes the depth of reproduction. The level is declared per attack in evidence.yaml and enforced at runtime.
| Level | Name | What It Means | When to Use |
|---|---|---|---|
| L0 | Narrative | No executable code. The attack is documented but not reproduced. | Attack is fundamentally non-reproducible (e.g., social engineering) |
| L1 | Conceptual | A script runs and demonstrates the vulnerability concept, but does not replay historical transactions. | Infrastructure compromises where contracts behaved as designed |
| L2 | Fork-State Behavioral | Fork at the historical block, verify vulnerable contracts exist, send exploit calldata, verify state changes. | Most smart contract exploit reproductions |
| L3 | Exact Transaction Replay | All of L2 plus the exact historical transaction(s) are replayed byte-for-byte on the fork. | High-fidelity academic reproductions |
| L4 | Multi-Chain Full | All of L3 plus multiple chains forked simultaneously with an instrumented bridge plugin simulating cross-chain message passing. | Bridge exploit reproductions requiring cross-chain state |
Available L4 Bridge Plugins:
| Plugin | Topology | Chains | Vulnerability Class |
|---|---|---|---|
nomad_bridge |
topologies/nomad_bridge.yaml |
ethereum + polygon | Message verification bypass (committedRoot == 0x00) |
poly_network_bridge |
topologies/poly_network_bridge.yaml |
ethereum + polygon + bsc | Hash collision selector |
wormhole_bridge |
topologies/wormhole_bridge.yaml |
ethereum + polygon | Guardian signature bypass |
Artifact Capture (Automatic)¶
Every experiment automatically produces publication-grade artifacts without any instrumentation code in the attack script:
| Artifact | What It Records |
|---|---|
run.jsonl |
Complete experiment lifecycle events, phase transitions, and final results |
events.jsonl |
All contract events emitted during the experiment |
storage_diffs.jsonl |
Every storage slot that changed (before/after values) |
gas_profile.jsonl |
Gas consumed per transaction |
balance_diffs.jsonl |
ETH/token balance changes per account |
cross_chain.jsonl |
Cross-chain message correlation (bridge experiments) |
agent_reasoning.jsonl |
LLM agent observe→think→act trace (if using AgentPlugin) |
run_manifest.json |
Full provenance: git commit, Foundry version, Python version, platform, config fingerprint |
log_integrity.json |
SHA-256 hash of every artifact file for tamper detection |
Determinism Guarantees¶
Crucible enforces deterministic execution by default:
| Parameter | Value | Effect |
|---|---|---|
| Gas price | 0 |
Eliminates gas-related non-determinism |
| Block base fee | 1 Gwei (fixed) |
Consistent fee calculation |
| Transaction ordering | FIFO |
Prevents ordering-dependent result variation |
| Timestamp | Pinned to fork block | No time-dependent drift |
| Auto-mine | Enabled | Transactions are mined instantly |
Two runs of the same experiment against the same fork block, using the same RPC provider and Foundry version, will produce identical artifacts. Use crucible diff <run_a> <run_b> to verify.
What Crucible Cannot Reproduce¶
Non-EVM Chains¶
Crucible is EVM-only. It cannot fork or execute transactions on:
- Solana (e.g., Wormhole root cause was Solana-side)
- Cosmos / IBC chains
- Substrate-based chains (Polkadot, Kusama, Moonriver, etc.)
- Harmony ONE (used by Horizon bridge)
- Move-based chains (Aptos, Sui)
Mitigation: For cross-chain vulnerabilities involving a non-EVM counterpart, the EVM component may be reproduced while declaring the non-EVM elements within excluded_components in the evidence.yaml manifest. This paradigm is utilized by the native bridge attack packs for Wormhole (Solana component excluded) and Horizon (Harmony component excluded).
Infrastructure Compromises¶
If the exploit was a private key compromise or an operational security failure, the smart contracts behaved exactly as designed. There is no on-chain bug to replay.
Examples: - Multichain (July 2023): MPC key shard theft - the authorized keys signed valid transactions - Horizon (June 2022): 2-of-5 multisig key compromise - the multisig contract worked correctly
The on-chain exploit transaction itself cannot be meaningfully reproduced because the contracts behaved as designed. However, Crucible can still deploy the affected contracts via bridge plugins and demonstrate the vulnerable contract interfaces at L2 fidelity.
State Not Served by Archive RPC¶
Archive RPC providers may not serve complete state at very old blocks. This manifests as:
eth_getCodereturning empty for contracts that existed at the fork blockanvil_setBalancefailing for addresses that didn't exist at the fork block- Storage reads returning zero for slots that should have data
This is a provider limitation, not a Crucible limitation. Mitigations:
- Use a paid archive provider with deep history (e.g., GetBlock, QuickNode, Alchemy Growth)
- Use Crucible's fork cache (.fork_cache/) to avoid re-fetching state across runs
- Check provider archive depth before starting an experiment
Cross-Platform Bit-Identical Results¶
While Crucible maximizes determinism, exact bit-identical results across different environments are not guaranteed due to:
- Different Foundry nightly builds may produce slightly different gas estimates
- Different archive RPC providers may serve slightly different state at the same block (rare)
- Docker vs. native execution may have minor differences
For formal publications: Utilize Docker (with a pinned Foundry version) and execute the experiment twice with crucible diff to confirm determinism on the specific host environment.
Practical Constraints¶
RPC Provider Requirements¶
| Scenario | What You Need |
|---|---|
| Single-chain Ethereum experiment | Any free archive RPC (Ankr, LlamaRPC, PublicNode) |
| Single-chain BSC or Polygon at old blocks | Paid archive RPC (GetBlock ~$39/mo, QuickNode) |
| Multi-chain bridge experiment | Archive RPC for each chain in the topology |
| Custom chain | Your own archive node with eth_getBlockByNumber, eth_getCode, debug_traceTransaction support |
Resource Requirements¶
| Topology | RAM | Disk | Time to Fork |
|---|---|---|---|
| Single chain | ~2 GB per Anvil process | ~500 MB cache per chain | 10-60s depending on RPC latency |
| Dual chain (bridge) | ~4 GB | ~1 GB | 20-120s |
| Triple chain (3-chain bridge) | ~6 GB | ~1.5 GB | 30-180s |
LLM Agent Experiments¶
If your experiment uses the AgentPlugin interface (LLM-driven autonomous agents):
| Requirement | Options |
|---|---|
| LLM Provider | OpenAI, Anthropic, Ollama (local), or mock (no API key needed) |
| Determinism | Not guaranteed - LLM responses are inherently stochastic |
| Artifact stream | agent_reasoning.jsonl captures the full observe→think→act trace |
See Also¶
| Doc | What It Covers |
|---|---|
| Deployment Guide | Installation and setup |
| Tutorial | Reproduce your first exploit in 10 minutes |
| Fidelity Guide | Detailed fidelity level reference (L0-L4) |
| Attack Pack Guide | How to create a new attack plugin |
| RPC Provider Guide | Archive RPC provider comparison and costs |
| Benchmarks | Results from the 6 built-in benchmark attack packs |
| Troubleshooting | Common errors and fixes |