Poloniex per-customer deposit address from May 2017: forwards every ether payment straight to the exchange's wallet, with an admin who can redirect it or make arbitrary calls to recover tokens.
Historical Significance
Poloniex was one of the largest exchanges of the 2017 cycle, and this contract is the address a Poloniex customer was shown when they deposited ether. Using a forwarding contract per customer instead of a plain key per customer meant the exchange never had to sweep ether: it arrived at the central wallet in the same transaction that paid the deposit address.
The design carries its era with it. Forwarding with call.value and no gas limit, a hardcoded destination that the admin can quietly change, and a general-purpose contractCall as the only route for stray tokens were all common answers in 2017 to problems that later deposit designs handled with sweepers, minimal proxies and CREATE2.
Key Facts
Description
Poloniex gave customers their own ether deposit addresses by deploying one of these contracts per address. The constructor hardcodes two addresses: a destination that Etherscan labels Poloniex 2, and an admin that Etherscan labels Poloniex: Deposit Funder, which is also the account that deployed every copy. This is among the earliest, deployed on 22 May 2017, and the same bytecode was still being deployed at the end of 2018.
The payable fallback forwards the full msg.value to the destination with a plain call and emits an event naming the destination, or reverts if the transfer fails. Nothing is ever held in the contract on the ether path. Three admin functions carry the deployer's own vocabulary: usurp(address) hands the admin role to a new address, revise(address) changes where deposits are forwarded, and contractCall(address,bytes) makes an arbitrary call from the deposit address. That last one is how tokens sent to an ether deposit address could be moved, by having the deposit contract call transfer on the token itself.
The source was compiled with solc 0.4.11 and the optimizer off. The runtime code matches the deployed bytecode; only the trailing swarm metadata hash differs, because the EthereumHistory attribution comment changes the source text. Sourcify records this as a partial match and Etherscan shows it as verified.
Source Verified
Spurious Dragon Era
Continued DoS protection. State trie clearing.
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.10;
contract PoloniexDeposit {
address destination;
address admin;
event e(address destination);
modifier onlyAdmin {
if (msg.sender != admin) revert();
_;
}
function PoloniexDeposit() {
destination = 0x209c4784AB1E8183Cf58cA33cb740efbF3FC18EF;
admin = 0xb42b20ddbEabdC2a288Be7FF847fF94fB48d2579;
}
function() payable {
if (destination.call.value(msg.value)()) {
e(destination);
} else {
revert();
}
}
function usurp(address _admin) onlyAdmin {
admin = _admin;
}
function revise(address _destination) onlyAdmin {
destination = _destination;
}
function contractCall(address _contract, bytes _data) payable onlyAdmin {
if (!_contract.call.value(msg.value)(_data)) revert();
}
}External Links
Related contracts
PoloniexDeposit
Same deployerFirst Poloniex deposit forwarder on Ethereum, part of over 400,000 identical contracts. Compiled with solc 0.4.11, source verified by EthereumHistory.
0x9b5c5d...2c0757December 31, 2017Contract 0x5d200d...52b7fa
Same deployerETH forwarder with configurable destination. Forwards incoming Ether to a parent address set at deployment, with an owner-only flush() method.
0x5d200d...52b7faJanuary 4, 2018