Back to Home

Forwarder

0xaf450693dc0f...c50b00150a88
ByzantiumSource VerifiedEdit this contract
Deployed December 25, 2017 (8 years ago)Block 4,794,514

Deposit forwarder that pushes incoming ether straight to a bank address, with a separate operator key for sweeping leftover ether and ERC-20 balances.

Byzantium EraVerified Source

Historical Significance

Splitting the receiving address from the operating key is the pattern an exchange or payment processor reaches for once it is running deposit addresses at scale: the hot operator key can sweep but cannot change where funds land, and the owner key that can is used rarely. The addmod guard on the setters is a home-made confirmation step, standing in for the multisig or timelock a later contract would use.

Key Facts
Deployment Block
4,794,514
Deployment Date
Dec 25, 2017, 12:40 PM
Code Size
1.3 KB

Description

Three addresses live in storage: the owner, the bank that receives everything, and a transfer address that acts as a day-to-day operator. The payable fallback rejects zero-value payments and immediately forwards the amount received to the bank with a raw call, so a plain send to this address lands in the bank in the same transaction.

transferEther and transferToken exist for what the fallback misses. Both are open to the operator or the owner. transferEther checks the contract's own balance covers the request before forwarding; transferToken reads balanceOf on the token, checks the same three conditions, and calls transfer with the bank as the recipient. Failures are caught with assert rather than require, which in this compiler burns the remaining gas.

The two setters are the unusual part. Each takes the new address plus four numbers, and refuses unless addmod of the first three equals the fourth. The check is arithmetic, not cryptographic, so it works as a typo guard on the address rather than as a second authorisation factor.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.14

Bytecode Overview

Opcodes1,302
Unique Opcodes137
Jump Instructions92
Storage Operations22

External Links