Deposit address from August 2017 that forwards ether to its owner instantly and lets anyone push its tokens to the owner with claimToken, if the caller holds at least 0.01 ether.
Historical Significance
An anonymous but carefully built deposit system from the 2017 boom. Ether never rests in the contract, and the token path is open to anyone because the destination is fixed, the same trust shortcut several exchanges used. The source also preserves a quirk of the solc 0.4.10 era: writing if (!ok) revert(); else ... leaves a trace in the bytecode, an extra jump target that a plain statement after the revert would not produce, and that trace is what identified the original phrasing.
Key Facts
Description
A deposit address with a fixed owner, set by a constructor argument and never changeable. Ether sent to it is forwarded to the owner in the same transaction with send, reverting if that fails, and logged as ReceiveEth with the contract's own address and the amount.
Tokens need a second step, handled by claimToken(address token, uint256 amount). Anyone can call it, but it only acts if the caller's own ether balance is at least 0.01 ether and the amount is above zero; otherwise it emits NotClaim and returns. When the check passes, it builds the transfer selector by hashing the string transfer(address,uint256) at runtime and issues a low-level call to the token, sending the amount to the owner, then emits Claim. The balance check on the caller reads like a cheap filter against empty throwaway accounts spamming the function.
The first copy was deployed on 3 August 2017 and the pattern was deployed repeatedly from several accounts with vanity addresses starting 0x00. The event names ReceiveEth, Claim and NotClaim were recovered from their topic hashes, the last by brute force. The source was compiled with solc 0.4.10 with the optimizer on. 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 TokenClaimForwarder {
address owner;
event ReceiveEth(address indexed _from, uint256 _value);
event Claim(address indexed _token, uint256 _amount);
event NotClaim(address indexed _token, uint256 _amount);
function TokenClaimForwarder(address _owner) {
owner = _owner;
}
function () payable {
if (!owner.send(msg.value)) revert();
else ReceiveEth(this, msg.value);
}
function claimToken(address _token, uint256 _amount) {
if (msg.sender.balance >= 0.01 ether && _amount > 0) {
if (!_token.call(bytes4(sha3("transfer(address,uint256)")), owner, _amount)) revert();
else Claim(_token, _amount);
} else {
NotClaim(_token, _amount);
}
}
}