ERC-20 is a token standard based on the Ethereum protocol. It is used for all smart contracts on the Ethereum blockchain for token implementation and provides a list of rules that all Ethereum-based tokens must follow.
Due to the standards’s prevalence it has emerged as the most used token standard. There are 6 foremost functions that ERC-20 tokens must have. Those being;
- Making a process that defines the maximum supply of coins, which thus forces the smart contract to not allow more tokens to be created or mined once the cap is realized.
- Making a process to display the balance of tokens in each respective address.
- Making a transfer method to take tokens from the total supply and sending them to a token user.
- Making a transfer process to allow token users to transfer them between one another.
- Making a process to approve transactions from user to user, ensuring that the total supply has a greater balance than or equal to the amount being sent (if sending tokens from a non-personal balance).
- Making a process to approve Txs from one user to another, ensuring that the user has a balance greater than or equal to the amount being sent.