Back to Home

Sweeper

0x004bd27e8104...f9090b6439cb
DAO ForkSource VerifiedEdit this contract
Deployed October 3, 2016 (9 years ago)Block 2,370,812

Deposit address whose fallback sweeps its entire balance of one fixed token to the owner, and refuses to run at all if the sweep fails.

DAO Fork EraVerified Source

Historical Significance

The forbidden-token slot is the interesting design decision. An operator running one of these per customer wants a general escape hatch for tokens sent by mistake, but not one that can be pointed at the token the address exists to collect. Encoding that exclusion in storage rather than in an owner's discipline is a small, cheap piece of defence against the operator's own key being misused. The broken destination in the escape hatch is a reminder that the pattern was copied faster than it was read.

Key Facts
Deployment Block
2,370,812
Deployment Date
Oct 3, 2016, 06:09 AM
Code Size
1.0 KB

Description

Three addresses sit in storage: an owner, a token, and one forbidden token the emergency path will not touch. There is no constructor logic in the runtime and nothing else to configure.

The fallback is the whole mechanism. Poke the address with an empty transaction and it reads its own balance of the configured token and transfers all of it to the owner. The condition is written as a single throw guard: if there is a balance and either ether was attached or the transfer returned false, the call reverts. Sending ether to this contract therefore always fails once it holds any tokens, which keeps the sweep and the ether path from being combined.

emergency is owner-only and takes any token plus a destination, with one exception: the forbidden address, which cannot be moved this way. The transfer it makes sends the balance to the contract itself rather than the destination, so the destination argument has no effect. That is a bug preserved in the deployed code, not a simplification of it.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.2+

Bytecode Overview

Opcodes1,070
Unique Opcodes56
Jump Instructions38
Storage Operations6

External Links

Related contracts