Currency Coin Logo
CurrencyCoin
Currency Coin

The Precursor to the ERC-20 Standard

Discover the precursor to the ERC-20 standard, authored by Vitalik Buterin and deployed just 40 days after Ethereum's launch.

View Timeline

What is CurrencyCoin?

Verifiable Authorship

The on-chain contract is an enhanced implementation of the reference currency.sol file authored by Vitalik Buterin.

Deployed Sept. 8, 2015

Deployed just 40 days after Ethereum's launch, this contract is a verifiable artifact from the mainnet's earliest "Frontier" era.

The Precursor to ERC-20

The EIP-20 proposal officially cites the contract's source repository, documenting its role as a direct precursor to the standard.

A Unique Relic

The blockchain confirms its deployed bytecode is unique, establishing it as a singular, non-replicated on-chain artifact.

From a Wiki to the World's Standard

In the chaotic early days of Ethereum, there was no standard for tokens. Developers were creating incompatible contracts, leading to ecosystem fragmentation.

Recognizing this, Vitalik Buterin initiated the Standardized_Contract_APIs repository on GitHub. This public workspace became the foundation for what would eventually become ERC-20. The process was collaborative; developers like Caktux and Simon de la Rouviere (Simondlr) contributed ideas and code, debating function names like disapprove versus unapprove.

On September 6, 2015, Vitalik Buterin committed the definitive Solidity version of currency.sol, which served as the template. Just two days later, on September 8, 2015, developer 'rfikki' deployed a hardened version of this contract to the mainnet. This deployment became a live implementation of the concepts that were later formalized in the official EIP-20 proposal.

contract currency {

    struct Account {
        uint balance;
        mapping ( address => uint) withdrawers;
    }

    mapping ( address => Account ) accounts;

    event CoinSent(address indexed from, uint256 value, address indexed to);

    function currency() {
        accounts[msg.sender].balance = 1000000;
    }

    function sendCoin(uint _value, address _to) returns (bool _success) {
        if (accounts[msg.sender].balance >= _value && _value < 340282366920938463463374607431768211456) {
            accounts[msg.sender].balance -= _value;
            accounts[_to].balance += _value;
            CoinSent(msg.sender, _value, _to);
            _success = true;
        }
        else _success = false;
    }

    function sendCoinFrom(address _from, uint _value, address _to) returns (bool _success) {
        uint auth = accounts[_from].withdrawers[msg.sender];
        if (accounts[_from].balance >= _value && auth >= _value && _value < 340282366920938463463374607431768211456) {
            accounts[_from].withdrawers[msg.sender] -= _value;
            accounts[_from].balance -= _value;
            accounts[_to].balance += _value;
            CoinSent(_from, _value, _to);
            _success = true;
            _success = true;
        }
        else _success = false;
    }

    function coinBalance() constant returns (uint _r) {
        _r = accounts[msg.sender].balance;
    }

    function coinBalanceOf(address _addr) constant returns (uint _r) {
        _r = accounts[_addr].balance;
    }

    function approve(address _addr) {
        accounts[msg.sender].withdrawers[_addr] = 340282366920938463463374607431768211456;
    }

    function isApproved(address _proxy) returns (bool _r) {
        _r = (accounts[msg.sender].withdrawers[_proxy] > 0);
    }

    function approveOnce(address _addr, uint256 _maxValue) {
        accounts[msg.sender].withdrawers[_addr] += _maxValue;
    }

    function isApprovedOnceFor(address _target, address _proxy) returns (uint256 _r) {
        _r = accounts[_target].withdrawers[_proxy];
    }

    function disapprove(address _addr) {
        accounts[msg.sender].withdrawers[_addr] = 0;
    }
}

The original code, authored by Vitalik Buterin, committed on Sep 06, 2015

Buy CurrencyCoin ($CC)

Trade the historical artifact that started the token revolution

Live Chart Placeholder

DexScreener chart widget

Swap Widget Placeholder

DexScreener swap widget

Frequently Asked Questions

Currency Coin Background

Another piece of on-chain history

Brought to you by the Blockchain Historical Society