An infinite-supply ERC-20-compatible token where every transfer mints a hug. Deployed August 23, 2016 by Jon Romero as a social experiment and Ethereum tutorial
Historical Significance
One of the earliest social token experiments on Ethereum โ predating the social token wave by years. The concept of permanently recording someone's name on-chain as proof of a received hug foreshadows later on-chain social primitives. The contract is also notable for using an emoji (๐ค) as its token symbol, an unusual choice for 2016.
Context
August 2016 was three months after The DAO hack and during the contentious period leading up to the Ethereum hard fork. While much of the ecosystem was focused on governance and security, Jon Romero was publishing accessible tutorials showing ordinary developers how to deploy contracts in Mist. HugCoin was a teaching tool that made blockchain experimentation feel approachable.
Token Information
Key Facts
Description
Anyone can claim and send Hug tokens. When a user gives their first hug, they may include a name or message which is stored and indexed on-chain. Each address is allowed exactly one logged message; subsequent hugs still work, but the contract records only the hug itself.
The contract tracks total huggers and stores structured data about hugs, including the recipient address, an associated name string, and the timestamp of the hug. Hug tokens can be transferred between addresses, and the primary interaction pattern is the "giveHugTo" function, which combines token transfer with message recording.
The token has no fixed supply limit, reinforcing its purpose as a symbolic gesture rather than a scarce asset.
HugCoin was deployed on August 23, 2016 and implements an infinite-supply token designed to represent โhugs.โ The contract exposes a human-friendly interface, including a name (HugCoin), a symbol (๐ค), and functions for giving hugs directly to other addresses.
Source Verified
Byte-perfect match on both runtime bytecode (1,715 bytes) and creation bytecode (3,100 bytes, excluding 96-byte constructor args). Verified with soljson v0.3.3, v0.3.4, and v0.3.5 โ all produce identical output with optimizer enabled. Source published by the author at github.com/jonromero/ethereum_contracts.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
DAO Fork Era
The controversial fork to recover funds from The DAO hack.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
Show source code (Solidity)
contract HugCoin {
string public name = 'HugCoin';
string standard = 'HugCoin 0.2';
string public symbol = '<3';
uint8 decimals = 0;
address owner;
uint8 constant a_hug = 1;
uint public totalHuggers = 0;
Member[] public hugged;
mapping (address => uint256) public balanceOf;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
struct Member {
address member;
string name;
uint memberSince;
}
modifier isOwner {
if (msg.sender != owner) throw;
_
}
function HugCoin(string sym) {
symbol = sym;
owner = msg.sender;
giveHugTo("Jon V", msg.sender);
msg.sender.send(msg.value);
}
function transfer(address _to, uint256 _value) returns (bool success) {
balanceOf[_to] += a_hug;
totalHuggers += 1;
Transfer(msg.sender, _to, a_hug);
return true;
}
function giveHugTo(string receipient_name, address _to) returns (bool success){
if (balanceOf[_to] == 0) {
hugged[hugged.length++] = Member({member: _to, name:receipient_name, memberSince: now});
balanceOf[_to] = a_hug;
totalHuggers += 1;
}
else {
balanceOf[_to] += a_hug;
}
Transfer(msg.sender, _to, a_hug);
return true;
}
function destroy() isOwner {
suicide(owner);
}
function () {
throw;
}
}External Links
Related contracts
shares
Same eraAn early on-chain corporation contract by cryptonomica.net, representing company shares as ERC-20 tokens with embedded voting โ deployed hours before the DAO ha
0x684282...9a33b5July 20, 2016ReplayProtection
Same eraAlex Van de Sande's post-DAO-fork ETH/ETC replay-protection splitter. Routes ether or ERC20 tokens to different recipients depending on which chain it runs on.
0x64668c...456541July 27, 2016BeerCoin
Same eraERC20-style 'I owe you a beer' IOU ledger by Nick Johnson (ENS). Each transfer creates a personal beer debt; obligations are tracked and transferable.
0x74c1e4...48f4acJuly 29, 2016Xi
Same eraDAO-era ERC-20-shaped token, May 2016. Symbol is the Greek capital letter Xi. Fixed cap 15,000; 1 token per 0.001 ETH via buy().
0xbe3dc7...cab9dfJuly 31, 2016Hash DB Token
Same era2017 ERC-20 token tied to HashDB, an early Ethereum-backed data store; mintable via buy() with refund-on-overpay and frontend-bypass transferFrom.
0x0bf43e...a20147August 7, 2016Blockchain Reddit
Same eraAn Ethereum smart contract that enables on-chain publishing and token-gated upvoting of posts.
0x5793dc...9438c2August 7, 2016