Back to Home

Fomo3dPotDrainer

0x92897c667bb5...f19a9ca6bdb9
ByzantiumSource VerifiedEdit this contract
Deployed August 10, 2018 (8 years ago)Block 6,123,211

August 2018 FoMo3D airdrop bot: spawns a throwaway contract that buys and withdraws in a loop, stopping when its own model of the airdrop pot falls below 1.2 ether.

Byzantium EraVerified Source

Historical Significance

FoMo3D's airdrop lottery drew on a hash that included the buyer's address, so a contract calling repeatedly in one transaction gets a fresh draw each time. Bots that exploited this came in generations, and the distinguishing feature of this one is that it does its accounting offchain.

Reading airDropPot_ costs gas on every iteration. Modelling it instead, from a single number supplied at call time, costs nothing and is close enough over a handful of rounds. The result is a bot with no view of the thing it is attacking, running a fixed number of attempts against an estimate that was already stale when the transaction was signed. It is a small, honest illustration of what the economics looked like from the attacker's side: gas was the binding constraint, and accuracy was worth less than the gas it cost.

Key Facts
Deployment Block
6,123,211
Deployment Date
Aug 10, 2018, 04:10 PM
Code Size
554.0 B

Description

Two contracts in one artifact. The deployed code is a factory with a single function, execute, taking a game address, a pot size, a round budget and an affiliate id. It creates a second contract with the ether the call carried, and that second contract's creation code is embedded in the factory's own bytecode.

The child never becomes a live contract. Its whole behaviour is a loop in the constructor. Each round it calls the game twice by raw selector: 0x8f38f309, which is buyXid, with the affiliate id and team zero and the call's ether attached, then 0x3ccfd60b, which is withdraw. Neither return value is checked. It then updates its own idea of the pot, subtracting a tenth, increments a counter, and stops when the counter passes the round budget or the modelled pot drops below 1.2 ether. Whatever is left goes to tx.origin through selfdestruct.

The pot is a number the caller passes in, not a number read from the chain. The contract never asks the game how large the airdrop pot actually is; it assumes each round takes ten percent and stops when its own arithmetic says the prize is no longer worth the gas. That makes the round budget the real control and the threshold a safety catch.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.24

Bytecode Overview

Opcodes554
Unique Opcodes109
Jump Instructions19
Storage Operations2

External Links

Related contracts