Skip to content

feat(tornado): Proposal 67 malicious-proposal verification#89

Open
Zeugh-eth wants to merge 2 commits into
mainfrom
feat/tornado-proposal-67
Open

feat(tornado): Proposal 67 malicious-proposal verification#89
Zeugh-eth wants to merge 2 commits into
mainfrom
feat/tornado-proposal-67

Conversation

@Zeugh-eth

Copy link
Copy Markdown
Member

What

Adds a Foundry verification of Tornado Cash Proposal 67 — a live malicious proposal — under src/tornado/proposals/67/.

Proposal 67 is disguised as a relayer-fee + token-burn change. Its target is an unverified, counterfeit Relayer Registry whose governance() / staking() resolve to attacker-controlled vanity look-alike addresses, gating nullifyBalance() to the attacker (a relayer kill-switch). It is an attack on the protocol, not the treasury.

Contents

  • proposal67.t.sol — 7 fork tests across 3 suites:
    • Contentgovernance()/staking() are vanity look-alikes (share the 7-byte prefix, ≠ real)
    • Powers — only the attacker can nullifyBalance; the real DAO governance is locked out
    • Treasury — attacker cannot withdraw/transfer/unlock/upgrade (every vector reverts); the real proxy can drain the full ~7.32M TORN (contrast)
  • README.md — summary + Etherscan references + run instructions
  • audit.html — human-readable security report

Verification

forge fmt --check   # clean
solhint             # 0 errors (only repo-standard naming/low-level warnings)
forge test --match-path "src/tornado/proposals/67/**"   # 7 passed, 0 failed

Verified locally forking at chain head via a non-censoring RPC (publicnode). The committed test pins block 25_427_000, which (like the other proposal tests here) needs an archive MAINNET_RPC_URL. ⚠️ Several public RPCs (llamarpc, cloudflare) block Tornado Cash calls (OFAC) — a non-censoring endpoint is required.

Notes / follow-up

  • Self-contained (does not extend a DAO base). A full Tornado_Governance base + dao-registry.json entry (via the dao-scaffold pattern) is a sensible follow-up if Tornado becomes a first-class supported DAO here.
  • Disclosure: L2Beat (S. Shemyakov) & pcaversaccio; decompilation via Dedaub (pcaversaccio gist).

Proposal 67 disguises a counterfeit Relayer Registry as a fee/burn change.
Its target redirects governance()/staking() to attacker vanity look-alikes,
gating nullifyBalance() to the attacker (relayer kill-switch). Adds fork
tests verifying the spoofed addresses, the attacker capability matrix, and
that the treasury is unreachable by the attacker yet drainable by the real
proxy. Plus a human-readable audit.html and README.

Tests fork mainnet and need a non-censoring MAINNET_RPC_URL (OFAC).
Make Tornado Cash a first-class DAO in the harness:
- src/tornado/Constants.sol, interfaces (ITornadoGovernance, IRelayerRegistry)
- src/tornado/tornado.t.sol: Tornado_Base (fork/labels/lock helper) and
  Tornado_Governance, which runs the real custom-governor lifecycle
  (lock -> propose -> castVote(bool) -> execute) with before/after hooks.
  Includes a MockProposal lifecycle self-test that passes end-to-end on a
  mainnet fork (proves legit proposals can be verified).
- dao-registry.json + @tornado/ remapping entries.
- Refactor Proposal 67 verification onto Tornado_Base.

8 tests pass (1 lifecycle + 7 Proposal-67) forking at head; pinned-block
runs need a non-censoring archive MAINNET_RPC_URL.
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