Back to Home

SimpleMultiSig

Unclassified
0x859e025cdb22...dd1f00b2995d
ByzantiumSource VerifiedEdit this contract
Deployed September 17, 2018 (7 years ago)Block 6,348,053

Christian Lundkvist's SimpleMultiSig: an m-of-n wallet that holds no pending-transaction state because every signature is collected off-chain and submitted in one call.

Byzantium EraVerified Source

Historical Significance

Most multisig wallets of this period kept every proposed transaction on chain and charged each owner a transaction to confirm it. This design moves all of that off chain and pays for exactly one transaction, which made it markedly cheaper to operate and removed a large amount of contract state that could go wrong. The strictly-increasing-address trick, used in both the constructor and the signature loop, is the small idea that makes the whole thing fit in so little code.

Key Facts
Deployment Block
6,348,053
Deployment Date
Sep 17, 2018, 11:28 AM
Code Size
1.2 KB
Gas at Deploy
586,776

Description

The owner set and the threshold are fixed in the constructor and never change. Owners must be supplied in strictly increasing address order, which lets the constructor reject duplicates with a single comparison per entry instead of a nested scan.

execute takes three parallel arrays holding the v, r and s of each signature, plus the destination, value and calldata. It rebuilds the transaction hash from the contract's own address, the call parameters and the current nonce, following the ERC-191 prefix scheme, then recovers each signer in turn. The recovered addresses must also be strictly increasing, which is what stops the same owner's signature being counted twice. Only after every signature checks out does the nonce advance and the call go out.

The result is a multisig with no proposal storage at all. There is no submit step, no confirmation step and no transaction registry; the only thing in mutable storage is the nonce.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.24
Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Unclassified

Bytecode Overview

Opcodes1,276
Unique Opcodes134
Jump Instructions59
Storage Operations16

External Links

Related contracts