Six EVM decompilers compared on Safe 1.3.0
Not one of the five other EVM decompilers gets Safe 1.3.0's signature check or transaction hash right. A Safe 1.3.0 multisig wallet (formerly Gnosis Safe) is a thin proxy that delegates its calls to a shared singleton contract, which verifies owner signatures and executes calls. We ran six EVM decompilers on that singleton's verified bytecode and checked every function against GnosisSafe.sol and its base contracts. 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 multisig fork, module, or guard, the decompiled code is all you have to go on. Below are three of these errors: what the contract does, what was printed, and what you would conclude from it.
Every other decompiler breaks the signature check
Before a Safe executes a transaction, checkNSignatures loops through as many signatures as the threshold requires. Each signer must be a registered owner, and each signer's address must be strictly greater than the previous one so no owner can sign twice.
currentOwner = ecrecover(dataHash, v, r, s);
}
require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, "GS026");
lastOwner = currentOwner;
}v31 = v32 = address(v1) > address(v1);
if (v32) {
v31 = v33 = _isOwner[address(v1)] != address(0x0);
}
if (v31) {
v31 = v34 = address(v1) != address(0x1);
}
require(v31, Error('GS026'));for (var_7 = 0; var_7 < arg_3; var_7++) {
// …
var_50 = address(var_9);
if (var_50 > address(var_6)) {
mstore(0, var_50);
mstore(32, 2);
var_51 = address(storage_2[var_50]) != 0;
} else {
var_51 = 0;
}
require(var_51, "GS026");
require(var_50 != 1, "GS026");
var_6 = var_9;
} Decompiler A compares the recovered signer against itself (address(v1) > address(v1)), which is always false: every set of signatures appears to revert with GS026, blocking all transactions. B turns the loop into a single if, checking only one signature regardless of the threshold. C makes one pass with no owner or ordering check in any branch. D loops over uninitialized counters and addresses. E's checkNSignatures outputs only argument decoding, and its checkSignatures wrapper stops before the loop.
No other decompiler shows the hash the owners sign
Owners authorize a Safe transaction by signing its EIP-712 hash. encodeTransactionData builds the exact bytes that get hashed: the 0x19 and 0x01 prefix bytes, the Safe's domain separator, and the hash of SAFE_TX_TYPEHASH with the transaction's ten fields.
bytes32 safeTxHash =
keccak256(
abi.encode(
SAFE_TX_TYPEHASH,
to,
value,
keccak256(data),
operation,
safeTxGas,
baseGas,
gasPrice,
gasToken,
refundReceiver,
_nonce
)
);
return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);return (0x20, 0x42,
0x1900000000000000000000000000000000000000000000000000000000000000,
memory[0x2c0],
0xffff000000000000000000000000000000000000000000000000000000000000
& memory[0x2e0]);var_0 = keccak256(abi.encode(SAFE_TX_TYPEHASH, arg_0, arg_1, keccak256(arg_2),
arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9));
return abi.encodePacked(
hex"0000000000000000000000000000000000000000000000000000000000000020",
hex"0000000000000000000000000000000000000000000000000000000000000042",
hex"19", hex"01",
keccak256(abi.encode(EIP712_DOMAIN_TYPEHASH,
block.chainid, address(this))),
var_0[0:30],
abi.encodePacked(var_0[30:32], new bytes(30))); // raw: the returned data itself Decompiler E omits keccak256 from the function completely: it returns 0x19 followed by zeros and two uninitialized memory words. A returns four separate values instead of one byte array and uses the domain separator hash as an array length. B returns undeclared variables, C returns the transaction's raw data parameter, and D returns memory with no hash at all. From any of these five outputs, you cannot tell what owners are actually signing.
Three decompilers lose the call a module makes
An enabled module can trigger transactions from a Safe without collecting owner signatures. Each module call specifies an operation: 0 for a regular call (which can forward ETH), and 1 for a delegatecall (which executes the target's code in the Safe's context, with full access to its storage and balance).
if (operation == Enum.Operation.DelegateCall) {
// solhint-disable-next-line no-inline-assembly
assembly {
success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)
}
} else {
// solhint-disable-next-line no-inline-assembly
assembly {
success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)
}
}if (0x01 <= 0x01 && uint8(arg3) <= 0x01) {
(bool success, bytes memory ret0) = address(arg0)
.Unresolved_(memory[…]); // delegatecall
if (!success) {
emit ExecutionFromModuleFailure(msg.sender);
} else {
emit ExecutionFromModuleSuccess(msg.sender);
}
return success;
}if (arg_3 == 1) {
(var_2, ) = arg_0.delegatecall{gas: var_1}(arg_2);
var_3 = var_2;
} else {
(var_4, ) = arg_0.call{gas: var_1, value: arg_1}(arg_2);
var_3 = var_4;
} Decompiler C prints only the delegatecall: its condition 0x01 <= 0x01 is always true, and the ETH value parameter is never used anywhere in the function. C also gates the call behind msg.sender == 0x01 (Safe's sentinel address for the modules linked list), which the next check immediately rejects, so in C's output no module call can ever execute. B's call forwards ETH with empty calldata, and E's module functions stop before making the call.
How the outputs were checked
Every decompiler was given the same runtime bytecode: the Safe 1.3.0 singleton verified on Sourcify at 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 (22,958 bytes, 31 public functions, compiled with Solidity 0.7.6). A Safe 1.3.0 wallet on Ethereum is a proxy that delegates its calls to this contract.
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: checkNSignatures, encodeTransactionData, and execute.
- EVMole's output for the same code in the workbench: checkNSignatures, encodeTransactionData, and execTransactionFromModule.
- Full writeups on USDC and the Uniswap V2 pair. Single-function examples on Tether, the Uniswap V2 router, and Chainlink are on the home page.