Ethereum 101: Tokens and the ERC-20 Standard
Crypto tokens are digital assets that can serve many functions. A token can be a form of currency, it can represent a digital or physical collectible, it can signify a digital identity, it can be used to access a service… and sometimes it can do any number of these things at the same time.
On the Ethereum blockchain, tokens are built by developers and implemented using smart contracts. The way a smart contract is written is up to each individual developer. However, there are benefits to following a standardized process for contracts that are likely to be executed frequently by many people.
The ERC-20 standard refers to the smart contract standard that implements most tokens on the Ethereum blockchain. The standard defines a set of criteria and technical conditions that must be present each time the standard is used to build a smart contract to manage tokens.
The greatest benefit to adopting the ERC-20 standard when creating tokens is that it works as a common language across the blockchain, allowing tokens built with the standard to integrate with all programs on the blockchain that “speak” the same language. The more this “language” is used to implement tokens, the greater the overall value and usefulness of tokens built using the language.
Key Functions in ERC-20 Compliant Tokens
All tokens built using the ERC-20 standard have a set of required functions the contract must execute in order to comply with the standard. Each time these functions are executed they return information (like the total number of tokens of this type in existence) and initiate actions (like the transfer of a certain number of tokens to an entity, given that entity’s address and amount).
Each of these functions serve an important purpose in the standard, and each comes with some variables that are important to consider when a developer decides whether or how to implement the standard.
We take a look at one of these variables in our article on infinite token allowances.