Ethereum tokens are essentially digital assets that are being built over the Ethereum blockchain. They benefit from Ethereum’s current infrastructure rather than developers, having to build an entirely new blockchain. In addition, they also strengthen the Ethereum’s ecosystem by driving demand for ether, the native currency of Ethereum, needed to influence the smart contracts.
Since tokens are not mined by their owners nor they are primarily meant for trading (although, if the company that issued them becomes valuable enough in the eyes of the public, then they may be traded on exchanges), but to be sold for the cryptocurrency, they differ from bitcoins and altcoins.
Smart contracts are nothing but how things are getting done in the Ethereum ecosystem. A smart contract with one or more people is initiated if someone wants to get a particular task done in Ethereum. Smart contracts are a series of instructions, written using the programming language “solidity”, which work on the basis of the IFTTT (IF-THIS-THEN-THAT) logic, i.e., if the first set of instructions are done then the next function is executed and after that the next and so on until the end of the contract is reached.
WHAT IS AN ETHEREUM TOKEN?
An Ethereum is not just a currency, but an environment, which makes a primary difference when compared to other cryptocurrencies. Here anybody can exploit the blockchain technology to build their own ventures and DAPPS (decentralized applications) through smart contracts. This is a very important distinction because this very thing shows the true scope of what is possible in Ethereum.
Consider Ethereum like the internet and all the DAPPS as websites that keep running in it. There is something really interesting about these DApps, they are all decentralized and not owned by an individual, but by people. The way in which that happens is usually by a crowd-sale called the “ICO”. Basically, certain tokens of that DAPP are bought in exchange for ether.
These tokens are usually of 2 varieties:
- Usage Tokens – These are the tokens that act like native currency in their individual DApps. A good example of this is Golem. While these tokens have monetary value they won’t give any particular rights or privilege within the network itself.
- Work Tokens – These are the tokens that are identified as a sort of shareholder in the DApp. The DAO tokens is a perfect example of this. If one was a DAO token holder then he had the right to vote on whether a particular DAPP could get funding from the DAO or not.
WHY TOKENS ARE NEEDED?
One must be wondering, if all these DApps are made in the Ethereum Network, then why isn’t Ether used to pay for every transaction within those DAPPS? Why does one need a native currency for them? The answer to that is pretty simple, even in real life, there are tons of places where a form of token over cash is used.
HOW TO CREATE AN ETHEREUM TOKEN?
The simplest way to create a token is simply going to Token Factory and check out their system. They have a superbly user-friendly system which can be used right away!
If one wants to code tokens from scratch then the person should definitely be well versed in Solidity aka the language used to code in Ethereum (Bancor can also be used to create smart contents).
Token contracts can be very complicated but, a basic token contract looks like as shown in the figure below:
The code is broken down into its bare necessities. As it is seen, there are three specific parts of this function:
- The mapping – creates a database wherein everyone can see the balance of their tokens.
- Giving the creator all the tokens – whoever has created the smart contract and tokens will get all the tokens.
- Transfer the token to a sender for ether – here, a sender gets an equivalent amount of token for the ether that they invest into the DApp.
So as it is seen, the creators of various DApps have to create their own tokens. While this may sound great on the surface, it was an absolute nightmare for wallets, trades and other smart contracts who were going to contact with various DApps and tokens. Basically, for each and every DAPP who had their own unique token, they would have to completely re-create the wheel each and every time to make their system agreeable with the DApp.
Imagine reinventing and updating the code time and again every single time a new token is to be interacted with! Something had to be done to circumnavigate this issue. Vitalik Buterin, in DevCon 1 2015, presented the Initial Standards Token which would unravel all these issues. Fabian Vogelstellar, one of the founders of the Mist Wallet, at that point took these standards and polished them up and added some of his own portions to come up with the Ethereum Request for Comments 20 aka ERC20 standard for tokens.