In this article we want to share with you an introductory guide about ERC20 tokens
What is a token?
A thing serving as a visible or tangible representation of a fact, quality, feeling, etc. It also has a value that is associated with its context.
Non fungible: Non-fungible means that something is unique and can’t be replaced. By contrast, physical money and cryptocurrencies are fungible, which means that they can be exchanged for another object with the same attributes.
Fungible: Replaceable by another identical item; mutual interchangeable.
Standard representation for fungible tokens.
Identified by Name and Symbol, allows to transfer from your account balance and approve other accounts to spend in behalf of your account.
Implementation: Although what matters is the interface, it is advisable to use an implementation that is already tested and verified. I recommend the one from OpenZeppelin: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
Why to use the standard token – ERC20?
Interoperability: Most decentralized applications support standards, this makes our token able to work in these scenarios.
No Vulnerability: Using tested and verified implementations means we avoid making mistakes in the implementation of tokens.
Easier: It makes it easy to integrate tokens into your contracts, so you only have to worry about calling functions.
Stable coins (DAI, USDT)
Fans Tokens (AFA Token, PSG Token)
Governance (Maker, Uniswap)
Play to earn (A)
ERC1155: Multitoken standard
ERC777: add hooks to the transfers.
ERC677: allows to customize the callback function for the transfer.
ERC223: improves the security of the token transactions.
The main difference btw ERC20 and native tokens:
A native currency has its own issuance and transfer rules tied to the network implementation. On the other hand, tokens allow the issuance and transfer rules to be customized, in addition to representing assets that are not necessarily related to finances, taking advantage of all the security and decentralization of the blockchain.
You can visit this video by @sebaleoperez with the ERC20 presentation in EthBogota 2022.