Exchange deposit wallet that reports every incoming payment to a logger contract and routes token withdrawals through a sweeper registry.
Historical Significance
The logger is the part worth noticing. Emitting the deposit from a single shared contract rather than from each wallet means an exchange can watch one address for every customer deposit across its whole fleet, instead of subscribing to thousands of individual addresses. That is a practical answer to a real operational problem of the period, and it is why this design kept being redeployed.
Token Information
Key Facts
Description
Two addresses are fixed at construction: a sweeper list and a logger. The payable fallback does no accounting of its own; it calls logIncoming on the logger with the sender, its own address, the block number and the value. The record lives in the logger's events rather than in this contract's storage, so the wallet itself stays a few hundred bytes no matter how many deposits it sees.
withdraw asks the sweeper list which sweeper handles a given token and delegatecalls it with the original calldata, so the sweeping code runs against this wallet's balances while living in one shared contract. tokenFallback is present and empty, which is what an ERC-223 token needs to see before it will transfer in.
The fallback records but does not forward. Ether accumulates in the wallet until a sweeper moves it, which is why the logger is given the block number: an operator reconciling deposits needs to know when each one landed, not just that it did.
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)
pragma solidity ^0.4.23;
contract AbstractSweeperList {
function sweeperOf(address _token) public returns (address);
}
contract Logger {
function logIncoming(address _from, address _to, uint256 _block, uint256 _value) public;
}
contract UserWallet {
AbstractSweeperList sweeperList;
Logger logger;
constructor(address _sweeperlist, address _logger) public {
sweeperList = AbstractSweeperList(_sweeperlist);
logger = Logger(_logger);
}
function () public payable {
logger.logIncoming(msg.sender, this, block.number, msg.value);
}
function tokenFallback(address _from, uint _value, bytes _data) public {
}
function withdraw(address _token, uint _amount) public returns (bool) {
return sweeperList.sweeperOf(_token).delegatecall(msg.data);
}
}