Per-customer deposit wallet whose single sweep function looks the token up in a central list and delegatecalls whichever sweeper handles it.
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
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
Byzantium Era
First Metropolis hard fork. Added zk-SNARK precompiles, REVERT opcode, and staticcall.
Bytecode Overview
Verified Source Available
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract UserWallet {
AbstractSweeperList c;
function UserWallet(address _sweeperlist) {
c = AbstractSweeperList(_sweeperlist);
}
function sweep(address _token, uint _amount)
returns (bool) {
return c.sweeperOf(_token).delegatecall(msg.data);
}
}
contract AbstractSweeperList {
function sweeperOf(address _token) returns (address);
}