Six EVM decompilers compared on USDC
We ran six EVM decompilers on FiatTokenV2_2, the implementation contract behind USDC on Ethereum, and checked every function of each output against its verified source. All five other decompilers produced more than ten behavioral errors each, without marking any line as uncertain. In EVMole's output we found none.
On an unverified token, the decompiled code is all you have to go on. Below are three of these errors, in permit, transfer, and increaseAllowance. Each shows what the contract does, what was printed, and what you would conclude from it.
Two decompilers hash the next nonce in permit
With EIP-2612 permit, an owner approves a spender by signing an off-chain message instead of sending a transaction. The signed message includes the owner's current nonce, and USDC hashes and increments that nonce in one expression. Decompilers A and B write the incremented nonce to storage first and then read it back into the hash; EVMole keeps the original value it read.
keccak256(
abi.encode(
PERMIT_TYPEHASH,
owner,
spender,
value,
_permitNonces[owner]++,
deadline
)
)_nonces[v4] = _nonces[v4] + 1;
v5 = keccak256(0x6e71edae…26c9, v4, address(varg3),
varg2, _nonces[v4], varg1);var_1 = storage_nonces[arg_0];
storage_nonces[arg_0] = unchecked(var_1 + 1);
// …
keccak256(abi.encode(PERMIT_TYPEHASH,
arg_0, arg_1, arg_2, var_1, arg_3)) Postfix ++ passes the old value (7) to abi.encode. In A's output, the hash receives 8 instead, so any permit signed against A's code fails on-chain with "EIP2612: invalid signature". B makes the same ordering mistake in both permit overloads.
The other three decompilers hide the signed nonce altogether: C passes only the owner to the signature check, D never constructs the signed message, and E's permit stops after checking the deadline. C also requires the deadline to equal the maximum uint256, which makes every permit with a finite deadline appear to revert.
Two decompilers never credit the recipient of a transfer
USDC's transfer subtracts the amount from the sender, adds it to the recipient, and emits Transfer. Decompiler C prints the debit and then immediately reverts where the credit belongs.
_setBalance(from, _balanceOf(from).sub(value));
_setBalance(to, _balanceOf(to).add(value));
emit Transfer(from, to, value);storage_map_d[msg.sender] =
(0x7fff…ffff & storage_map_d[msg.sender]) - arg1;
revert("SafeMath: addition overflow");storage_9[msg.sender] = var_0;
var_1 = SafeMath.add(arg_1, ((1 << 255) - 1) & storage_9[arg_0]);
require(var_1 <= ((1 << 255) - 1),
"FiatTokenV2_2: Balance exceeds (2^255 - 1)");
require(storage_9[arg_0] >> 255 != 1,
"FiatTokenV2_2: Account is blacklisted");
storage_9[arg_0] = var_1;
emit Transfer(indexed: [msg.sender, arg_0], data: [arg_1]);
return 1; In the real contract, that revert only triggers if the recipient's balance overflows. In C's listing, it fires unconditionally: every transfer appears to fail, and no Transfer event is ever emitted. C repeats the same mistake in transferFrom and five other functions that move tokens. Decompiler E's transfer stops even earlier: it checks the calldata length and pause flag, then closes the function with no balance change at all.
USDC packs an account's balance into the low 255 bits of a storage slot and its blacklist flag into the top bit, which is what the bitmasks and >> 255 checks are reading.
Three decompilers report the wrong Approval amount
increaseAllowance adds to a spender's allowance. The contract computes the new total once, and _approve both stores it and emits it in the Approval event. Decompiler C writes the new allowance to storage, then reads it back and adds the increment a second time for the event.
_approve(owner, spender, allowed[owner][spender].add(increment));allowance[msg.sender][arg0] += arg1;
emit Approval(msg.sender, arg0,
arg1 + allowance[msg.sender][arg0]);var_0 = SafeMath.add(arg_1,
storage_allowance[msg.sender][arg_0]);
// …
storage_allowance[msg.sender][arg_0] = var_0;
emit Approval(indexed: [msg.sender, arg_0], data: [var_0]); C's event logs 16 instead of 13. D does the same in both increaseAllowance and decreaseAllowance, and E repeats the mistake in decreaseAllowance, subtracting the decrease twice. Any indexer or integration trusting the Approval events from these outputs would track the wrong allowance after each of these calls.
The wrong permit nonce and the wrong Approval amount are the same mistake: reading a storage slot again after overwriting it. On USDC alone, all five other decompilers make it somewhere. They make it on other contracts too: in Tether's destroyBlackFunds on the home page, and in Uniswap V2's burn.
How the outputs were checked
Every decompiler was given the same runtime bytecode: FiatTokenV2_2, the implementation contract behind USDC's proxy, read from Ethereum on 13 October 2026. It is 23,464 bytes with 55 public functions.
- USDC (the proxy):
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 - FiatTokenV2_2 (the code compared):
0x43506849D7C04F9138D1A2050bbF3A0c054402dd
AI agents first reviewed each output against the verified source, function by function, looking for behavioral differences: wrong values, missing or invented checks, dropped writes, calls, or events, or truncated functions. Names, formatting, and readability did not count, and a mistake repeated across several functions counted once in each. We then checked every error shown on this page by hand against the source and each decompiler's output.
EVMole checks every decompiled function against the original bytecode with differential fuzzing before showing it (how the decompiler works).
Check it yourself
- The verified source on Sourcify, at the lines quoted above: permit, _transfer, and _increaseAllowance.
- EVMole's output for the same code in the workbench: permit, transfer, and increaseAllowance.
- Full writeups on Safe 1.3.0 and the Uniswap V2 pair. Single-function examples on Tether, the Uniswap V2 router, and Chainlink are on the home page.