Back to Home

UserWallet

0xb168e6e6ae3f...402320d27541
ByzantiumSource VerifiedEdit this contract
Deployed March 16, 2018 (8 years ago)Block 5,264,997

Per-customer deposit wallet whose single sweep function looks the token up in a central list and delegatecalls whichever sweeper handles it.

Byzantium EraVerified Source

Historical Significance

This is the exchange deposit-wallet pattern at its most economical. An exchange has to publish a distinct address per customer, so the per-wallet deployment cost is multiplied by the size of its user base; pushing all logic behind one delegatecall keeps that cost near the floor while leaving the operator free to change sweeping behaviour later. The design was published by Bittrex and copied widely enough that the same few hundred bytes recur across thousands of addresses.

Key Facts
Deployment Block
5,264,997
Deployment Date
Mar 16, 2018, 10:16 AM
Code Size
406.0 B
Transactions by Year
201811

Description

Storage holds one address: the sweeper list, fixed at construction. sweep takes a token address and an amount, asks the list which sweeper handles that token, and delegatecalls into it with the original calldata unchanged.

Because the call is a delegatecall, the sweeper's code runs in this wallet's own context, so the tokens and ether it moves are this wallet's. The wallet itself holds no sweeping logic and never needs upgrading: changing how a token is swept means pointing the list at a different sweeper, and every wallet ever deployed picks up the change on its next call.

This variant is stripped to the minimum. There is no fallback and no tokenFallback, so it accepts ether only through a plain transfer with no code path of its own.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.2+

Bytecode Overview

Opcodes406
Unique Opcodes51
Jump Instructions16
Storage Operations1

External Links