What is An Ethereum Token: The Ultimate Beginner’s Guide
To a beginner, the entire concept of Ethereum and Ethereum token can get very confusing very fast. The idea that Ethereum not only has its own currency (Ether) but also has tokens on top of that which can act as currency themselves, can be a little mind-boggling. Before we even begin understanding what Ethereum tokens are all about, it’s important to grasp some basic concepts. If you would like an intensive walkthrough of Ethereum please check out our dedicated blockchain courses on ethereum.
The entire Ethereum network is a giant mass of nodes (computers) connected to one another. In fact, the entire network can be visualized as a single entity called the “Ethereum Virtual Machine” or EVM for short. All the transactions that have happened and will ever happen in this network are automatically updated and recorded in an open and distributed ledger. So what is the advantage of this? Before we explain that it is important to know what a “smart contract” is.
Smart contracts are how things get done in the Ethereum ecosystem. When someone wants to get a particular task done in Ethereum they initiate a smart contract with one or more people. Smart contracts are a series of instructions, written using the programming language “solidity”, which work on the basis of the IFTTT logic aka the IF-THIS-THEN-THAT logic. Basically, if the first set of instructions are done then execute the next function and after that the next and keep on repeating until you reach the end of the contract.
The best way to understand that is by imagining a vending machine. Each and every step that you take acts like a trigger for the next step to execute itself. It is kinda like the domino effect. So, let’s examine the steps that you will take while interacting with the vending machine:
Step 1: You give the vending machine some money.
Step 2: You punch in the button corresponding to the item that you want.
Step 3: The item comes out and you collect it.
Now look at all those steps and think about it. Will any of the steps work if the previous one wasn’t executed? Each and every one of those steps is directly related to the previous step. There is one more factor to think about, and it is an integral part of smart contracts. You see, in your entire interaction with the vending machine, you (the requestor) were solely working with the machine (the provider). There were absolutely no third parties involved.
So, now how would this transaction have looked like if it happened in the Ethereum network? Suppose you just bought something from a vending machine in the Ethereum network, how will the steps look like then?
Step 1: You give the vending machine some money and this gets recorded by all the nodes in the Ethereum network and the transaction gets updated in the ledger.
Step 2: You punch in the button corresponding to the item that you want and record of that gets updated in the Ethereum network and ledger.
Step 3: The item comes out and you collect it and this gets recorded by all the nodes and the ledger.
Every transaction that you do through the smart contracts will get recorded and updated by the network. What this does is that it keeps everyone involved with the contract accountable for their actions. It takes away human malice by making every action taken visible to the entire network. But, having said that, what mainly incentivizes these people to fulfill their end of the bargain anyway? What are they getting by helping out the requestors? This is where Ether comes in.
Every single step in a smart contract is a transaction or a complex computation and would have a cost that is measured in “gas”. The price of this gas is paid by the requester in “Ether”. Ether is the currency with which everything runs in the Ethereum. When people talk about ETH and ETC they are actually talking about the value of the Ether in their respective blockchain.
Let’s check out the graph of gas prices over the years:
Every command has a specific gas limit which ensures that a buggy piece of code doesn’t end up depleting your entire ether wallet. So basically, the main reason why people fulfill their end of the bargain in a contract is that they are incentivized to collect Ether.
What happens when your ether supply gets depleted in the middle of the contract? If you do not have the ether required for all the gas payments, then all the transactions that have already taken place during the course will go back to the original state. But, your ether wallet will still reflect the change in balance since all transactions made in the blockchain are irreversible.
Going forward it is very important that you have two things absolutely clear:
- Smart contracts are how things get done in Ethereum.
- Ether is the currency that is used in the Ethereum network to do anything.
What Is An Ethereum Token: The Ultimate Beginner’s Guide
The primary difference between Ethereum and any other cryptocurrency is that it’s not just a currency, it’s an environment. Here anyone can take advantage of the blockchain technology to build their own projects and DAPPS (decentralized applications) through smart contracts. This is a very important distinction because this very thing shows you the true scope of what is possible in Ethereum.
Think of Ethereum like the internet and all the DAPPS as websites that run in it. There is something really interesting about these DAPPS, they are all decentralized and not owned by an individual, they are owned by people. The way that happens is usually by a crowd-sale called the “ICO” (more on that later). Basically, you buy certain tokens of that DAPP in exchange of your ether.
These tokens are usually of 2 varieties:
- Usage Tokens.
- Work Tokens.
Usage Tokens: These are the tokens that act like native currency in their respective DAPPS. Golem is a pretty good example of this. If you want to use the services in Golem then you will need to pay with Golem Network Token (GNT). While these tokens have monetary value they won’t give you any particular rights or privilege within the network itself.
Work Token: These are the tokens that identify you as a sort of shareholder in the DAPP. Because of that, you have a say in the direction that that DAPP takes. A perfect example of this is the DAO tokens. If you were a DAO token holder then you had the right to vote on whether a particular DAPP could get funding from the DAO or not.
Why Do We Need Tokens?
Right now you must be wondering, if all these DAPPS are made in the Ethereum Network, then why don’t we simply use Ether to pay for every transaction within those DAPPS? Why do we need a native currency for them? The answer to that is pretty simple, even in real life, there are tons of places where we use a form of token over cash.
Remember that time you went to the water park? Remember how they took your money and tied a band around your wrist which you used to gain access to all the rides in the park and to buy food as well? In this example the water park is the DAPP, your money is ether and the band is the token.
Okay, how about the time you bought those movie tickets for Wonder Woman and included an extra popcorn and coke in your ticket? The moment you entered the theater how did you get in the hall? You showed them the ticket. How did you buy your popcorn and coke? Again, by showing them the ticket. In this case, the cinema theater is the DAPP, your money is Ether and the ticket is the token.
By using tokens to execute certain functions in the smart contract of the DAPPS you make the process much more simple and seamless. Plus, tokens are also great for the overall value of ether as well (more on that later). Before we go any deeper, let’s first learn how exactly can one create a token and how can a DAPP issue tokens in exchange of ether.
How To Create An Ethereum Token
The simplest way for you to create a token is simply going to Token Factory and check out their system. They have a superbly user-friendly system which you can use right away:
If, however you want to code your tokens from scratch then you should definitely be well versed in Solidity aka the language used to code in Ethereum.
(You can also use Bancor to create smart contents, we will cover that a bit later in the guide.)
Token contracts can be very complicated but this is what a basic token contract looks like:
So let’s break down the code into its bare necessities. As you can see, there are three specific parts of this function:
- The mapping
- Giving the creator all the tokens.
- Transfer the token to a sender for ether.
The mapping: This part of the code is the mapping part:
This creates a database wherein everyone can see the balance of your tokens. Tokens like ETH itself is logged into an open ledger. Anyone can see all the balances and transactions of that particular token.
Giving the creator all the tokens: In this part of the function, whoever has created the smart contract and tokens will get all the tokens:
Transfer the token to a sender for ether: Now finally, the last part of the code. This is the part where a sender can get an equivalent amount of token for the ether that they invest into the DAPP.
The function is very self-explanatory. Firstly, it will check if the sender has the requested amount of tokens in their balance. Then the code will deduct the said amount of token from the sender balance and then add that value to the recipient’s balance. It is very straightforward.
So as you can see, the creators of various DAPPS have to create their own tokens. While this might sound good on the surface, it was an absolute nightmare for wallets, exchanges and other smart contracts who were going to interact with various DAPPS and tokens. Why was it so bad? Basically, for every single DAPP who had their own unique token they would have to completely re-invent the wheel every single time to make their system compliant with the DAPP.
Imagine reinventing and updating your code time and again every single time you need to interact with a new token! Something had to be done to circumnavigate this problem. Vitalik Buterin, in DevCon 1 2015, introduced the Initial Standards Token which would solve all these issues. Fabian Vogelstellar, one of the founders of the Mist Wallet, then took these standards and polished them up and added some of his own to come up with the Ethereum Request for Comments 20 aka ERC20 standard for tokens.
ERC20 Ethereum Standard For Tokens
The ERC20 standard is basically a specific set of functions which developers must use in their tokens to make them ERC20 compliant. While this is not an enforced rule, most DAPP developers are encouraged to follow the standards to ensure that their tokens can undergo interactions with various wallets, exchanges and smart contracts without any issues. This was great news for everyone because now they at least had an idea of how future tokens are expected to behave. ERC20 tokens have gotten widespread approval and most of the DAPPS sold on ICO’s have tokens based on the ERC20 standard.
So, what does a token need to have to be ERC20 compliant? It is basically a set of 6 functions that can be recognized and identified by other smart contracts, which in turn leads to seamless interactions. When executed, the following 4 basic activities are what all the ERC20 tokens required to do:
- Get the total token supply.
- Get the account balance.
- Transfer the token from one party to another.
- Approve the use of token as a monetary asset.
Ok so now that we have learnt what tokens are and what exactly they do. We have also learned how to create them and what rules they follow. But, the big question is, how exactly do you get your hands on them? When a new and exciting DAPP comes along, how do you get your hand on its tokens? The answer is through the ICOs.
What Are ICOs?
- They have provided the simplest path by which DAPP developers can get the required funding for their project.
- Anyone can become invested in a project they are interested in by purchasing the tokens of that particular DAPP and become a part of the project themselves. (We are talking about Work Tokens here).
So, how does an ICO work?
Firstly, the developer issues a limited amount of tokens. By keeping a limited amount of tokens they are ensuring that the tokens itself have a value and the ICO has a goal to aim for. The tokens can either have a static pre-determined price or it may increase or decrease depending on how the crowd sale is going.
The transaction is a pretty simple one. If someone wants to buy the tokens they send a particular amount of ether to the crowd sale address. When the contract acknowledges that this transaction is done, they receive their corresponding amount of tokens. Since everything on Ethereum is decentralized, an ICO is considered a success if it is properly well-distributed and a majority of its chunk is not owned by one entity.
The DAO ($150 million) was the biggest ICO of all time until it was recently overtaken by Bancor ($152 million).
In the past 12 months alone a staggering $331 million dollars have been raised in ICOs.
NOTE: ICOs have become an extremely controversial topic nowadays because of the sheer amount of money that developers have been raising even before the creation of an Alpha version of their product. Some people are accusing it of being a Ponzi scheme. While we don’t exactly label it that, it is true that certain aspects need to be checked before proceeding with future ICOs.
How Does An Ethereum Token Get Its Value?
Now that we know how you can get your hands on you tokens, let’s find out what gives them their value in the first place. Tokens get their value from the same place that most things get their value. They are mainly two factors:
- Supply & Demand.
Supply & Demand: This is basic economics 101. More the demand and lesser the supply more will be the price of the product. The supply-demand graph looks sorta like this:
The sweet spot where both the curves intersect is the equilibrium. So, how do Ethereum Tokens take care of supply and demand? Do you remember the token creation code? Specifically, the second part of the code? Let’s take another look now, shall we?
As this code implies, there is a fixed amount of tokens that can be issued in the first place. Each and every token is accounted for because like ether, token transactions are also recorded in the open ledger. If in case the developer wants to change the number of tokens issued, then they will have to create a new application. Any code that is issued in the blockchain is irreversible so the old application cannot be changed in any way.
So, now that we have a fixed and finite amount of tokens, that takes care of the “supply” part. What about the demand? The demand obviously depends on a lot of factors. What is the quality of DAPP in itself? Are people excited about the DAPP? Has that DAPP been marketed properly? Is that DAPP going to solve problems? If the demand of the DAPP is sufficiently high, and with the supply remaining constant, it goes without saying that the value of the token is going to be pretty high.
Trust: Like with any currency, tokens will only have value if people have trust in it. Trust comes from a lot of sources like the credibility of the developers, the kind of service provided by the DAPP etc.
Now that we have gained at least an introductory knowledge about tokens, let’s do some research on the 3 hottest Ethereum Tokens in the market right now:
Founder: Julian Zawistowski
Token Cap: 1 Billion GNT
Money Raised In ICO: $8.6 million
Think about this for a second. You are in your home with a super powerful PC and CPU and you are hardly using it at night, while at the same time, halfway around the world in Philippines, an animator is desperately looking to render a high-def video. Wouldn’t it be awesome if he could somehow access your computer’s power for the night and get his work done? With Golem that’s no longer a pipedream.
Golem describes itself as an “Airbnb for computers”. It is essentially a peer-to-peer network which is aiming to be the world’s first decentralized supercomputer. By tapping into the Golem network you can essentially “rent out” some of the CPU power in the network and use it for your own projects.
There are 3 kinds of people in the Golem network:
- Software Developers.
Image credit: Golem White Paper.
Requestors: These are people who want to access the power in the golem network. They can do so by paying with GNT (Golem Network Token).
Providers: These are people in the Golem network who are renting out their computer power. They get paid in GNT for their services.
Software Developers: These are people who are going to be uploading the software they develop into the Golem system. In case the requestors want to use their software, they will have to pay GNT to the software developers to gain access to their software and then pay the providers the required amount to rent out their computer power.
There is one way that the Golem system can be exploited. Suppose a requestor rents out a provider’s hardware and uses it to run a virus code which steals all the data in that hardware or the entire system. What happens then? To counteract this issue all the transactions in Golem will be run in a sandbox environment. What does that mean? When you rent out a provider’s hardware you will be under a lot of rules which will restrict your movement. So, if you were a hacker you won’t really have the freedom to move about and do what you want.
This is what the Golem graph, as of writing, looks like.
The Market Cap is currently sitting at ~$500 million.
- A very interesting concept which can effectively create the world’s first decentralized super computer.
- Can give access to people living in poorer parts of the world to world-class computer machines.
- The team behind Golem is very good and proven.
- The value of GNT has been steadily rising over the last few years.
- The sandbox environment contains any potential hacks.
- Gives software developers a platform to release and showcase their software.
- Makes good use of underutilized computer equipment.
- Even though there is a way to contain any hacks, no sandbox is perfect. A bug can be exploited which can render the entire system useless.
- According to the roadmap given in their white paper, Golem will take 8 years to run at an optimal state which is too long a time.
- Potential latency issues because of over usage.
It looks like Golem has a pretty bright future with a very interesting concept. Along with that, it has a very good team backing it, headed by a very capable leader. The team has been together since DevCon 1 and it looks like they have what it takes to make the concept really work. Seeing the growth in GNT’s value over the past few months, there is no reason to doubt their potential.
Founders: Joey Krug & Jack Peterson.
Token Cap: 11 million REP
Money Raised In ICO: $5.2 million
Remember that old game show “Who Wants To Be A Millionaire?” Every participant on that show had 3 lifelines, one of which was audience poll. Basically, if they were stuck on a question, they could ask the audience that question. The audience was then supposed to vote on the option that they felt (or knew) was to be correct. More often than not, the audience got it right. This phenomenon is called the “Wisdom Of The Crowd”, which states that groups of people, in general, are correct more often than individuals. Now what Augur did was use that same idea in prediction markets.
What Are Prediction Markets?
Prediction markets are speculative markets which allow users to purchase and sell shares in the outcome of an event. Suppose you have specialized knowledge in a particular field eg. A basketball match. By taking various factors into consideration you wager on the favorable outcome.
Image Credit: Augur white paper.
How does Augur work?
There are three kinds of people who use augur:
- The Reporters aka the REP token holders.
- The Wagers.
- The Market Creators.
The ReportersThese are the people who own the REP tokens and are therefore obligated to report on the outcomes of their fields of choice. When an event is near maturation they report on the outcome (this will be discussed later). If they report wrongly or they do not report at all they risk losing 20% of their REP coins. The value of augur is directly proportional to the quality of the reporters. Why? Because if a lot of the reporters are dishonest then no one will want to use augur which will greatly decrease the demand. This forces all the reporters to remain honest.
The Wagerers: These are the ones who will be betting on the outcome of the future of the markets based on the reports by the reporters.
The Market Creators: They will be creating the markets for the reporters to report on and earn market fees as a result.
The Reporting Period
The reporting is done in 2 phases. Within the first month of the completion of the event, the reporters submit their report to the network which is tightly secured and kept away from the public. A month later, the second phase happens where the reports are shown in an open ledger which is free for all to see. When that is done, we reach a final consensus.
Aftermath Of The Consensus
- The wagerers get their appropriate reward for putting their bets.
- The reporters who reported honestly get fees from the wagerers.
- The reporters who didn’t report correctly get 20% of their REP deducted and that, in turn, go to the reporters who reported honestly and correctly.
Let’s take a look at augur’s curve:
Current market cap is sitting at ~$345 million
- Based on the concept of “wisdom of the crowd” which helps keep the whole system honest.
- Helps to make correct future predictions for markets.
- Forces the reporters to report honestly at the risk of losing REP tokens.
- Not dependent on a central entity for market predictions which keep it free of human greed.
- Tends to reward those who bought in early and accumulated REP coins as compared to newer buyers.
Augur is growing from strength to strength but is facing stiff competition from Gnosis, which is a similar token. How it comes out of this battle will greatly affect its future.
Founders: Bprotocol Foundation.
Token Cap: Unknown
Money Raised In ICO: $153 million
Bancor has shaken the crypto world down to its very foundation’s thanks to its ICO. People have invested a staggering $153 million into the company! So what is the noise all about? What is so interesting and exciting about Bancor? One of the problems that MAY affect the Ethereum community in the future is the sheer amount of tokens. While most of the popular tokens can be easily exchanged, the problem arises when you have rare tokens.
While you can easily exchange and buy tokens like GNT, what happens when you have tokens that nobody wants to exchange with? How do you liquidate your tokens then? This is where Bancor offers an extremely elegant solution. Bancor has come up with the idea of issuing smart tokens.
What Is A Smart Token
The idea of the smart token is to make tokens which completely do away with currency exchanges. Normally if you were to buy a token what happens is that you will have to go to an exchange, wherein someone will try to match you with someone else and after the transaction takes places. If you have a rare token that no one really uses, it can get hard to have someone match up with you.
So what bancor does is that it builds tokens with smart contracts built inside it. The smart contract has a mathematical formula inside it which allows you to have exchanges directly with the smart contract itself. Basically, it becomes its own market maker!
The Maths Behind Smart Tokens
The smart contract inside these smart tokens runs on the following formula:
Price = (Balance)/ (Supply * CRR)
Let’s examine the equation.
- Price = The price of the smart token.
- Balance = The money with which you were buying the token (ETH in this case because we are solely talking about Ethereum tokens).
- Supply = The total supply of the tokens available in the market.
- CRR = Constant Reserve Ratio. This is the ratio between the original balance and the market cap. This is a constant and will never change. Its value is always <1.
So now that we have defined all the values and variables in the equation, let’s see how altering every single one of them will affect the price of our token.
Case 1: Buying new tokens
When you are buying new tokens you will do so by adding ETH to the smart contract of your token. When you do that obviously “Balance” will increase. Since you are buying new tokens, it also means that you are creating new tokens out of nothing, which in turn increases the “Supply” itself. Since ”CRR” is a constant, it won’t change.
So keeping these things in mind, let’s re-examine the equation:
Price = (Balance)/ (Supply * CRR)
Now, keep in mind, CRR remains unchanged, so while the value of supply has changed (Supply * CRR) will still be a smaller value than (Balance).
Numerator (Balance) > Denominator (Supply * CRR), the overall value of the price of a token will INCREASE.
Case 2: Selling your tokens
Now, what happens when you are selling token? Since you are taking Eth out of the smart contract your “Balance” will go down. At the same time since you are literally commanding the smart contract to destroy the required amount of tokens, your “Supply” will go down. CRR being the constant remains the same as before.
Now put these values in the equation:
Price = (Balance)/ (Supply * CRR)
The numerator will still be greater than the denominator, but since the new numerator will be less than the original numerator (on account of balance reducing) the overall price will drop.
You can simply put numbers in the equation and check out the changes itself. So what exactly is happening whenever you are buying and selling new smart tokens?
Now, what happens if you sell a lot of coins at once and you don’t have enough balance to counter it out? The equation has been made in a way that it adjusts itself dynamically to any and all circumstances. If you are interested you can check out the Bancor white page where they have a couple more complicated formulas which very much proves that the equations will always hold true.
When you BUY smart tokens you are giving ETH to the smart contract and instructing the equation to literally come up with new tokens for your out of the thin air.
When you SELL smart tokens you are instructing the smart contract to destroy the required amount of tokens and deduct the value of ETH from your Balance and transfer it to your wallet.
- Has completely taken the middle man out of cryptocurrency exchanges.
- You won’t have to pay any extra taxes or charges because the middle man no longer exists.
- The idea of smart tokens has enormous potential.
- Makes sure that you can always liquidate your tokens.
- Gives an interface for you to make newer tokens.
- The ICO was highly controversial because they didn’t keep a market cap initially for close to an hour. Not keeping a market cap greatly affects the price of the tokens.
- The idea of the smart tokens can be a little tough to grasp for people who are new to cryptocurrency.
- The idea is extremely nascent and untested.
Questioning the future of Ethereum tokens is the question the future of DAPPs and Ethereum itself. In the past one year, a number of tokens that have come out is truly staggering and it shows no sign of stopping. As long as people are looking to innovate on the Ethereum blockchain, you will be getting a new and steady supply of tokens.
Since a token can be anything fro currency, to real-world assets, to IOUs, tokens are going to evolve into becoming more and more versatile. Fabian Vogelstellar, the man who gave us the ERC20 token Standard has this to say about tokenization:
“I believe we are just at the beginning of tokenizing everything. Maybe in the future, you will be able to buy a share of the chair you are sitting on, the paint inside your house or a fraction of equity in a huge building complex.”