Coin Brief ENDE

Glamsterdam's broken invariants and Fearless Wallet's exfiltration show what a diff hides

Two security stories from 6 November look unrelated. The Ethereum Foundation delayed Glamsterdam's fork onto the Hoodi testnet because EIP-8037 and EIP-8038 break eight invariants that deployed contracts rely on. On the Polkadot forum, the auditing firm Zealynx showed how code that sent Fearless Wallet users' keys to an attacker sat in public source for about 16 months. Both are about the same blind spot: the thing that breaks is not in the lines anyone is looking at.

In Ethereum's case the contracts did not change at all. Their assumptions about gas costs and state charging were reasonable when they were written; the protocol is what moves. The Foundation's response is to publish the eight invariants with examples and prompts and ask teams to check their own code, because, as Marius van der Wijden wrote, auditors cannot cover every project's on-chain and off-chain code.

In Fearless Wallet's case the code changed in plain sight. The exfiltration arrived in a pull request titled Ton Service that touched 251 files, carried no review comments and hid a 25-line function behind a token-sounding name, empty-key encryption and a date check that kept it silent in testing. It was later switched remotely through a config file in another repository, and removed inside an 80,000-line release commit.

The fixes the two cases point to are similar in kind. Make assumptions explicit and testable: a list of invariants a protocol change may break, a CI check that fails when a new caller of a key export function or a new network host appears. And treat anything outside the diff that controls behaviour, whether gas schedules or remote configuration, as part of what has to be reviewed.

Glamsterdam's broken invariants and Fearless Wallet's exfiltration show what a diff hides
Glamsterdam's broken invariants and Fearless Wallet's exfiltration show what a diff hides — Coin Brief

What it means

Code review checks the change in front of the reviewer. Both incidents were decided elsewhere, in a protocol specification and in a separate branch, which is why publishing assumptions and guarding them in CI does more than asking reviewers to look harder.

Written by Victoria Shinder.