ICOs & Custom Cryptocurrencies On Ethereum Classic

June 17, 2017 by Christian Seberino

fund raising

Many initiatives are raising capital with initial coin offerings (ICOs). The Ethereum (ETH) project raised 18 million dollars and the DAO project raised 150 million dollars! Furthermore, the entire blockchain space is worth 90 billion dollars! I will describe ICOs and their custom cryptocurrencies on Ethereum Classic (ETC).

ICO Basics

ICO

An ICO is a method of raising funds with the sale of a new cryptocurrency. These cryptocurrencies are often required to purchase goods and services from the issuing organizations. For example, the ETH cryptocurrency (ether) is used to rent ETH system resources. Upcoming ICOs are typically announced on Bitcointalk.org forums and heavily marketed beforehand. Buyers often purchase the new cryptocurrencies by sending bitcoins or ether to escrow accounts. The initial prices are set, then supply and demand determines the future prices. If the organizations are well managed, and their cryptocurrencies prove useful, they should both increase in value. If prices skyrocket, miniscule cryptocurrency subdivisions can typically be used. For example, ETC cryptocurrency tokens can be subdivided into as many as 1018 pieces.

Caution is required with ICOs as they are effectively unregulated. Participants do not purchase ownership in companies, nor, many privileges protected by established case law. There is great potential for innovation as well as scams. Smith & Crown and ICOrating are two resources that can assist with ICO research.

ICO Cryptocurrencies

currencies

Cryptocurrencies are implemented with smart contracts. ETC provides an excellent smart contract platform. It has all of the functionality of ETH at a fraction of the cost.

Many exchanges and other users prefer crytocurrencies to adhere to the Ethereum Token Standard. This standard specifies the following interfaces for cryptocurrency smart contracts:

INTERFACE DESCRIPTION
transfer(receiving_address, transfer_amount) Transfers funds between accounts.
balanceOf(account_address) Returns account balances.
totalSupply() Returns the total supply.

The standard also specifies the following interfaces for when a user wants another account to also manage their funds:

INTERFACE DESCRIPTION
approve(approved_address, approved_amount) Allows other accounts to also transfer funds.
transferFrom(sending_address, receiving_address, transfer_amount) Transfers funds between accounts.
allowance(shared_address, approved_address) Returns approved amounts.

It is also common to include the following named constants:

NAMED CONSTANT DESCRIPTION
name cryptocurrency name
symbol cryptocurrency exchange ticker symbol
decimals cryptocurrency maximum number of subdivision decimal places

For example, the ETC cryptocurrency exchange ticker symbol is ETC. Since ETC cryptocurrency tokens can be divided into as many as 1018 pieces, the maximum number of subdivision decimal places is 18.

Sample Code

There are many Ethereum Token Standard compliant Solidity smart contract examples available. Here is an example of an Ethereum Token Standard compliant Serpent smart contract:

#
# Implements a cryptocurrency that adheres to the Ethereum Token Standard.
#

data NAME
data SYMBOL
data DECIMALS
data TOTAL_SUPPLY
data balance[]
data approved[][]

event Approve(managed_add:address:indexed, manager_add:address:indexed, approv_amt:uint256)
event Transfer(send_add:address:indexed, receiv_add:address:indexed, trans_amt:uint256)

def init():
        #
        # Sets the named constants and the initial balance(s).
        #

        self.NAME                = "Example"
        self.SYMBOL              = "EXPL"
        self.DECIMALS            = 4
        self.TOTAL_SUPPLY        = 100 * 10 ** self.DECIMALS
        self.balance[msg.sender] = self.TOTAL_SUPPLY

def name():
        #
        # Returns the cryptocurrency name.
        #

        return self.NAME

def symbol():
        #
        # Returns the exchange ticker symbol.
        #

        return self.SYMBOL

def decimals():
        #
        # Returns the maximum number of subdivision decimal places.
        #

        return self.DECIMALS

def totalSupply():
        #
        # Returns the total supply.
        #

        return self.TOTAL_SUPPLY

def balanceOf(account_add:address):
        #
        # Returns account balances.
        #

        return self.balance[account_add]

def allowance(managed_add:address, manager_add:address):
        #
        # Returns approved amounts.
        #

        return self.approved[managed_add][manager_add]

def approve(manager_add:address, approv_amt:uint256):
        #
        # Allows managers (other accounts) to also transfer funds.
        #

        self.approved[msg.sender][manager_add] = approv_amt
        log(type = Approve, msg.sender, manager_add, approv_amt)

        return 1

def valid(send_add:address, receiv_add:address, trans_amt:uint256):
        #
        # Determines the validity of transfers.
        #

        valid_trans_amt  = 0 <= trans_amt <= self.TOTAL_SUPPLY
        suff_send_bal    = self.balance[send_add] >= trans_amt
        receiv_bal       = self.balance[receiv_add] + trans_amt
        valid_receiv_bal = receiv_bal <= self.TOTAL_SUPPLY

        return valid_trans_amt and suff_send_bal and valid_receiv_bal

macro update_balance($send_add, $receiv_add, $trans_amt):
        #
        # Updates balance with regards to tranfers.
        #

        self.balance[$send_add]   -= $trans_amt
        self.balance[$receiv_add] += $trans_amt

macro update_approved($send_add, $trans_amt):
        #
        # Updates approved with regards to tranfers.
        #

        self.approved[$send_add][msg.sender] -= $trans_amt

def transfer(receiv_add:address, trans_amt:uint256):
        #
        # Transfers funds between accounts.
        #

        result = 0
        if self.valid(msg.sender, receiv_add, trans_amt):
                update_balance(msg.sender, receiv_add, trans_amt)
                log(type = Transfer, msg.sender, receiv_add, trans_amt)
                result   = 1

        return result

def transferFrom(send_add:address, receiv_add:address, trans_amt:uint256):
        #
        # Transfers funds between accounts.
        #

        result     = 0
        approv_amt = trans_amt <= self.approved[send_add][msg.sender]
        if self.valid(send_add, receiv_add, trans_amt) and approv_amt:
                update_balance(send_add, receiv_add, trans_amt)
                update_approved(send_add, trans_amt)
                log(type = Transfer, send_add, receiv_add, trans_amt)
                result   = 1

        return result

Conclusion

money

ICOs are a new way to raise funds and the ETC platform is an excellent choice for the required cryptocurrency smart contracts. Vigilance due to the lack of regulations remains important. Hopefully, mechanisms to protect against abuse will allow an ever growing number of people to reap the benefits.

Feedback

You can contact me by clicking any of these icons:

twitter facebook linkedin

Acknowledgements

I would like to thank IOHK (Input Output Hong Kong) for funding this effort.

License

license

This work is licensed under the Creative Commons Attribution ShareAlike 4.0 International License.

Archive Previous posts

August 27, 2017Prophet Daniel, Tyler West

社会币的崛起

August 27, 2017Prophet Daniel, Tyler West

The Rise and Rise of Social Coins

July 28, 2017Christian Seberino

Web 3.0 And Ethereum Classic

July 23, 2017Prophet Daniel

Development forces arriving

June 17, 2017Christian Seberino

Should The Ethereum Classic Community Be Ashamed Of Promoting Privacy?

June 17, 2017Christian Seberino

ICOs & Custom Cryptocurrencies On Ethereum Classic

June 17, 2017Christian Seberino

When Absolutely No One Can Steal Or Return Lost Ethereum Classic Funds

May 19, 2017Prophet Daniel

Stand up from the crowd

May 11, 2017Carlo V

ETC Weekly Newsletter: Dev Update 10!

May 1, 2017Christian Seberino

Why You Should LOVE Proof Of Stake Systems — Hybrids!

April 28, 2017Christian Seberino

Ethereum Classic World Computer Transactions Explained

April 28, 2017Christian Seberino

Ethereum Classic Blocks Explained: The Three Categories

April 19, 2017Carlo V

ETC Weekly Newsletter: New all time highs as ETC surges!

April 18, 2017Christian Seberino

Ethereum Classic Public And Private Keys: A Little Enlightenment

April 13, 2017Carlo V

ETC Weekly Newsletter: New devs on ETCdev Team.

March 30, 2017Christian Seberino

The Ethereum Classic World Computer Accounts & States Explained

March 29, 2017Carlo V

ETC Weekly Newsletter: Dev Update + News from Bitkio.

March 24, 2017Christian Seberino

How To Improve Ethereum Classic Immutability Discussions

March 16, 2017Carlo V

ETC Weekly Newsletter: Dev update and more

March 13, 2017Christian Seberino

Ethereum's Vitalik Buterin Discusses The New Viper Smart Contract Programming Language

March 8, 2017Carlo V

ETC Weekly Newsletter: Dev Updates + New Discussions

March 2, 2017Carlo V

ETC Weekly Newsletter : Monetary Policy Statement.

February 28, 2017Christian Seberino

An Interview With The Anonymous Individual That Started Ethereum Classic

February 28, 2017Christian Seberino

How To Create A Censorship Resistant Domain Name System On Ethereum Classic

February 20, 2017Carlo V

ETC Weekly Newsletter : Treasury Proposal

February 13, 2017Christian Seberino

Should We Make ⟠ The Ethereum Classic Currency Symbol?

February 10, 2017Christian Seberino

Serpent: Introduction To The BEST Ethereum Classic Smart Contract Language

February 10, 2017Christian Seberino

Proposal: Ethereum Classic Currency And Logo Conventions To Improve Communication And Avoid Expensive Mistakes

February 10, 2017Christian Seberino

Why Ethereum Classic Uses An Incorrect SHA3 Implementation

February 10, 2017Christian Seberino

Hashes: An Introduction & Why They Are Foundational To The Internet & Blockchains

February 10, 2017Christian Seberino

Why Bloom Filters Are So Cool (+ Useful!) For Blockchains & Beyond: An Introduction

February 1, 2017Carlo V

ETC Weekly Newsletter : Another Great Month Ahead

January 24, 2017Prophet Daniel

Ethereum Classic Harmony

January 17, 2017Carlo V

ETC Weekly Newsletter : Protocol Update Successful!

January 6, 2017Prophet Daniel

Sustainable Development Goals

January 4, 2017Carlo V

ETC Weekly Newsletter : Happy New Year!

December 29, 2016Carlo V

ETC Weekly Newsletter : End Of 2016!

December 28, 2016Christian Seberino

Zero Knowledge Proofs For Dummies

December 20, 2016Carlo V

ETC Weekly Newsletter : In Case You Missed It

December 16, 2016Christian Seberino

How To EASILY Set Up An AMAZING Ethereum Classic Node & Talk To It With Your OWN Code

December 14, 2016Carlo V

ETC Weekly Newsletter : ETC Meetup in London + The New Team

December 12, 2016Carlo V

Introducing The Grothendieck Team

December 6, 2016Christian Seberino

Why Would I Choose To Run My Application On Ethereum / Classic Instead Of The World Wide Web?

December 6, 2016Carlo V

ETC Weekly Newsletter : The Grothendieck Team

December 4, 2016Arvicco

ETC End of Year and Monetary Policy Event: London, December 13th

December 1, 2016Christian Seberino

Why InterPlanetary File System & Its Ilk Are A Big Deal For Blockchains & Beyond

November 29, 2016Carlo V

ETC Weekly Newsletter : Network Update

November 23, 2016Christian Seberino

The Skinny On Smart Contracts: An Introduction & Why You Should Care

November 22, 2016Carlo V

ETC Weekly Newsletter : Monetary Policy Update

November 15, 2016Carlo Vicari

ETC Newsletter

November 15, 2016Christian Seberino

The Bare Basics Of Money And Monetary Policy WITH A FEW WORDS FROM SATOSHI NAKAMOTO

November 8, 2016Carlo Vicari

ETC Newsletter : 2016-11-01 - 2016-11-08

November 4, 2016Christian Seberino

Let's Admit Blockchains Are Weird: An Introduction To The Strangeness

November 1, 2016Carlo Vicari

ETC Newsletter : 2016-10-24 - 2016-11-01

October 31, 2016Carlos Graterol

Instead of The Halvening, A Tithing for ETC

October 17, 2016Arvicco

Gas Reprice Hard Fork on ETC block 2500000 (October 25)

October 14, 2016Christian Seberino

Why Another Hard Fork To Deal With The Recent Denial Of Service Attack Spam Shouldn't Be Controversial

October 13, 2016Christian Seberino

Ethereum / Classic Denial Of Service Attacks & The Estonian Cyberwar

October 12, 2016Christian Seberino

Cuban Piracy & Why Merkle Trees Are So Awesome For Blockchains

October 11, 2016Christian Seberino

Navajo Indians Help Explain Ethereum / Classic Replay Attacks

September 18, 2016ProphetDaniel

The Invisible Field

September 9, 2016Arvicco

Code is Law and the Quest for Justice

September 1, 2016Ethereum Classic

CHBTC contributes funds to foster growth of Ethereum Classic

August 18, 2016Arvicco

Ethereum Classic Kickoff (London)

August 16, 2016ProphetDaniel

Nature Inspired Ethereum Classic Community Dynamics Proposal

August 14, 2016DaxClassix

New Website Created

August 11, 2016ProphetDaniel

Decentralized anarchist governance system

August 10, 2016ProphetDaniel

Couple Values That Forked Ethereum Broke

July 27, 2016Arvicco

Getting things done in a decentralized way

July 25, 2016Arvicco

What can I do to help Ethereum Classic project?

July 24, 2016Arvicco

ETC exchange trading and other news

July 22, 2016Arvicco

ETC - new Ethereum Classic ticker symbol

July 15, 2016Arvicco

Let's keep the original censorship-resistant Ethereum going!

July 11, 2016Arvicco

A Crypto-Decentralist Manifesto