Freecoin (FREE), a faucet token that hands out 10 new coins per claim and skims transfers that leave a sender above the average balance into a pool for the next claimant.
Token Information
Key Facts
Description
Freecoin is a zero-decimal token deployed with a supply of 5,000 FREE credited to its creator (a zero supply argument would have defaulted to 1,000,000). giveNewCoins() lets any address mint 10 new coins for itself, also hands over everything currently held in a shared pool, and counts the address as a new holder if its balance was zero. transfer() moves coins with balance and overflow checks and emits Transfer; afterwards, if the sender's balance is above the average balance (total coins divided by holder count), half of the excess is taken from the sender and added to the pool. getCoins() returns the caller's balance, balanceOf is a public mapping, and claims are logged with a CreatedNewCoins event.
Source Verified
Source reconstructed from the bytecode; exact creation and runtime match with optimizer on. Verified on Etherscan.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Homestead Era
The first planned hard fork. Removed the canary contract, adjusted gas costs.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
Show source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract Freecoin {
string public name;
string public symbol;
uint8 public decimals;
uint totalCoins;
uint numHolders = 1;
uint pool = 0;
mapping (address => uint) public balanceOf;
event Transfer(address indexed from, address indexed to, uint256 value);
event CreatedNewCoins(address user, uint amount);
function Freecoin(uint256 initialSupply, string tokenName, string tokenSymbol, uint8 decimalUnits) {
if (initialSupply == 0) initialSupply = 1000000;
balanceOf[msg.sender] = initialSupply;
name = tokenName;
symbol = tokenSymbol;
totalCoins = initialSupply;
decimals = decimalUnits;
}
function getCoins() constant returns (uint) {
return balanceOf[msg.sender];
}
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
if (balanceOf[msg.sender] > totalCoins / numHolders) {
uint excess = balanceOf[msg.sender] - totalCoins / numHolders;
balanceOf[msg.sender] -= excess / 2;
pool += excess / 2;
}
}
function giveNewCoins() {
if (balanceOf[msg.sender] == 0) numHolders++;
balanceOf[msg.sender] += 10;
balanceOf[msg.sender] += pool;
pool = 0;
totalCoins += 10;
CreatedNewCoins(msg.sender, balanceOf[msg.sender]);
}
}External Links
Related contracts
token
Same eraBare Homestead-era token (Mar 14 2016): public balanceOf mapping + a single unchecked transfer firing the standard Transfer event.
0xc77f06...494c69March 14, 2016DinastyCoinToken
Same eraHomestead-era transfer-only token, DinastyCoinToken (DCT), fixed supply 200000000 and 6 decimals.
0x3693fd...c11466March 14, 2016token
Same eraMinimal Homestead-era token shell (Mar 14 2016): just a public balanceOf mapping and its compiler-generated getter, with no other functions.
0x38e1da...41a81aMarch 14, 2016DianstyCoinToken
Same eraDianstyCoinToken (DCT), a named Ethereum token deployed on 14 March 2016.
0x6d4de8...d5dba4March 14, 2016sultancoin
Same eraA fixed-supply token with direct transfers only, deployed March 2016.
0x9a11ff...0b797dMarch 15, 2016666๐
Same eraSix hundred and sixty six units, named and ticketed with a ram emoji.
0x7684aa...d0ed06March 16, 2016