Back to Home

TargetedForwarder

0x2f35809e1204...c7fc261a9071
ByzantiumSource VerifiedEdit this contract
Deployed September 20, 2018 (7 years ago)Block 6,366,422

Late 2018 deposit address that does not know where it is sending: on every payment it asks a shared registry for the current target, forwards the whole amount there, and logs it.

Byzantium EraVerified Source

Historical Significance

Exchange deposit addresses are one of the most numerous kinds of contract ever deployed, and almost all of them answer the same question differently: where does the money go, and who can change that. The common answer in this era was to hard code a destination or store one per contract. This one refuses to hold the answer at all.

What that buys is a single point of redirection for a whole fleet, which is convenient and also the entire risk. Whoever controls the registry controls the destination of every deposit made through every one of these addresses, retroactively, with one transaction and no trace in the deposit contracts themselves. The contracts are honest about it: their own storage names nothing but the registry.

Key Facts
Deployment Block
6,366,422
Deployment Date
Sep 20, 2018, 12:06 PM
Code Size
2.1 KB

Description

The fallback is the contract. Ether arrives, the contract calls getTargetAddress on a registry whose address was fixed at construction, sends the full amount on with transfer, and emits EthForwarded with the sender, the destination and the value. Nothing is kept, and nothing about the destination is stored here.

That indirection is the design. A deposit address that stores its own destination has to be redeployed or individually updated to point somewhere else. These ask at the moment of payment, so the operator changes one value in one registry and every address in the fleet follows on its next payment. The registry itself is a small owned contract with exactly two functions, getTargetAddress and setTargetAddress.

The rest is a manual override. The contract inherits the standard Ownable of the period, including renounceOwnership and the OwnershipRenounced event, and the owner can call transferETH to push ether to a chosen address or transferTokens to move an ERC20 balance, since tokens sent to a deposit address trigger no fallback and would otherwise sit here. Both return true and transferTokens requires the token's own transfer to report success, which is the 2018 habit of trusting the return value rather than checking the balance.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.24

Bytecode Overview

Opcodes2,100
Unique Opcodes168
Jump Instructions65
Storage Operations17

External Links

Related contracts