Fix WETH allowlist accepting unreviewed chains #10
- @julien opened this issue · Sep 18, 2026edited
WETHRegistry.isKnownImplementation accepts a codehash on any chain that
reproduces it. Canonical WETH9's bytecode has no chain-specific logic (no
constructor argument), so it's byte-identical everywhere — meaning it could
be registered on a chain whose native gas token isn't ETH at all, wrapping
that native currency flawlessly while wrapping the wrong asset entirely.
Neither the codehash check nor the deposit/withdraw probe can catch this,
since "native currency is ETH" isn't observable from inside the EVM.Named and described in docs/notes/native-currency-substitution.md.
Done: isKnownImplementation pairs each hash with the exact chain IDs it was
reviewed on, so a hash match means "reviewed on this chain," not "reviewed
somewhere." - @julien · Sep 18, 2026edited
Closed via 9 — merged bb4dfe378f1f4ec0a66a917fb7a9d25992d4194a into main.
Sign in to comment.