Skip to content
Security
Command

/simulate

Multi-actor, multi-block simulation against a live fork. Stateful attack sequences across many txs.

From plugin
rugproof
1145 skills23 agents45 commands4 hooks
> /plugin marketplace add omermaksutii/RugProof
> /plugin install rugproof@rugproof

Command definition

simulate.md
description: Multi-actor, multi-block simulation against a live fork. Stateful attack sequences across many txs.
argument-hint: "<chain> [<address>]  [--block latest]"
allowed-tools: Read, Write, Bash, Agent, mcp__block-explorer__*, mcp__anvil__*, mcp__tenderly__*, mcp__forge-runner__*

/simulate — full mainnet-fork audit

Deeper than `/exploit-live`. Reasons about the protocol across multiple blocks, multiple actors (attacker, victim, MEV searcher, governance, oracle), and multi-step attack sequences.

When to use

  • Protocol has cross-contract state machines (e.g. lending → liquidation → AMM swap).
  • Exploits depend on time progression (oracle TWAP windows, vesting cliffs, governance delays).
  • You need to verify a multi-block attack actually composes on real state.

Procedure

Step 1 — Spin up the fork

Default: `anvil` via the `anvil-mcp`. If the user has Tenderly configured, prefer that for richer trace data.

Step 2 — Define actors

Set up multiple addresses with realistic balances:

attacker:   1 ETH, 0 tokens
victim:     10 ETH (already deposited into target)
mev:        100 ETH (front-running searcher)
governance: timelock controller
oracle:     mock or live Chainlink feed

Step 3 — Generate attack sequences

Dispatch the `attacker` subagent with the audit findings. It produces a sequence:

Block N:
  - attacker: take flash loan from Aave  (1M USDC)
  - attacker: deposit into target vault
  - attacker: trigger price update via swap

Block N+1:
  - attacker: liquidate victim at manipulated price
  - attacker: repay flash loan, keep collateral

Step 4 — Run

Execute each step via the fork. Capture:

  • Per-step state transitions (balances, allowances, oracle prices, vault shares)
  • Gas costs
  • Total value extracted

Step 5 — Output

Simulation: berachain-fork @ block 12345678

Attack sequence:
  Block 12345678  [attacker] Flash-borrow 1M USDC                  ✓ gas 215K
  Block 12345678  [attacker] Deposit to Vault (10K shares minted)  ✓ gas 87K
  Block 12345678  [attacker] Manipulate oracle via AMM swap        ✓ gas 142K
  Block 12345679  [attacker] Liquidate victim @ stale price        ✓ gas 256K
  Block 12345679  [attacker] Repay flash loan                      ✓ gas 32K

Net P&L:
  attacker:  +12.4 ETH ($31,200)
  victim:    -10.0 ETH (liquidated)
  protocol:   -2.4 ETH (bad debt absorbed)

Conclusion:
  EXPLOITABLE — full attack sequence successful, protocol incurs bad debt.
  Recommend: TWAP oracle (30min window) + per-block deposit/liquidate cooldown.

Notes

  • Don't fabricate attacks — only simulate things you can actually run.
  • For Tenderly users, link to the simulation URL — it has a stunning UI for state diffs.
  • For Anvil users, save the trace to `rugproof-reports/sim-traces/`.
Read more
@omermaksutii
Ships withrugproof

Rugproof your code before someone else does. 🌐 Live site: omermaksutii.github.io/RugProof 📦 Latest: v1.0.0 — 45 commands · 23 agents · 45 skills · 13 MCP servers · tested, offline-first, with rule packs, a benchmark, non-EVM coverage, and post-deploy

1152 skills23 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
11
Star history of omermaksutii/RugProof on GitHub, a chart by star-history.com

Other commands on rugproof.

audit-deep

audit-deep

Command

Deep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files.

@omermaksutii@omermaksutiiInstall Command
audit-deps

audit-deps

Command

Audit third-party dependencies — resolve installed versions, cross-reference known-vulnerable releases, and flag vendored code…

@omermaksutii@omermaksutiiInstall Command
audit-diff

audit-diff

Command

Diff two Rugproof audit reports (before vs after) to track regressions — what's new, what's fixed, and whether the grade moved.

@omermaksutii@omermaksutiiInstall Command
audit-history

audit-history

Command

Pull past public audits (Code4rena, Sherlock, Spearbit, etc.) for a deployed contract or known protocol.

@omermaksutii@omermaksutiiInstall Command
audit-live

audit-live

Command

Audit a deployed contract on a live chain. Pulls verified source from the block explorer, optionally forks the chain for…

@omermaksutii@omermaksutiiInstall Command

More commands from other plugins.

deslop-reborn

deslop-reborn

Command

One iteration of the IronClaw Reborn de-slop loop — take ONE Reborn crate, fan out parallel review sub-agents (thermo-nuclear…

@nearai@nearaiInstall Command
audit

audit

Command

Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open…

@trailofbits@trailofbitsInstall Command
arsenal

arsenal

Command

Show which external bug-bounty tools are installed on this machine and print install hints for the missing ones. Curated from…

@awarexone@awarexoneInstall Command