WTF are Token Standards?
ERC-20, ERC721, ERC1155...ERC-WTF are you talking about?...
If, like many others in this space, you have no idea what these token standards actually mean...Look no further, this article will unravel this mysterious lingo.
So get your reading glasses on, it's time to learn!
#Avalanche and other "smart" blockchains allow developers to code pretty much anything they would want. This allows for unprecedented levels of innovation and creativity. But it also means that some guidelines are needed for things to be able to interact and work together.
magine if Alice and Bob wanted to create their own non-fungible tokens. Without a common pre-agreed standard, they could end up with two very different tokens. In turn, this would mean that #NFT marketplaces would have to account for both Bob's and Alice's implementations.
Token standards fix this
Token standards define sets of parameters and behavior's so that tokens from different developers remain composable inside the ecosystem. This includes standardizing function names and inputs.
Four Major Token Standards
ERC-20
ERC-20 is one of the more common Token standards. It sets a standard for fungible tokens and was introduced shortly after Ethereum's release in 2015. It codifies how tokens are transferred, the balance is retrieved, and approvals are granted.
Approvals especially, are an important piece of ERC-20 and other standards, as they allow a third party to spend a pre-defined amount of tokens without asking for an owner's permission every time.
ERC-721
This token standard is very similar to ERC-20 except for one key difference, this is a non-fungible token. The non-fungible aspect helps to standize behaviours of NFTs. This token standard maps ID of each token to an owners address, allowing for each ERC-721 Token to be represented in a unique way. The Token standard was introduced in 2018.
For those who can't decide between ERC-20 or ERC-721....
ERC-1155
the ERC-1155 standard was developed in 2018. It combines functionalities of both fungible and non-fungible tokens in one contract while also enabling batch transactions.
Where ERC-20s maps addresses to balances and ERC-721s maps addresses to IDs, ERC-1155s creates a mapping between an address and balance and then maps it to an ID. This way, some pieces in the collection can be fungible, whereas others remain completely unique.
ERC-4626
Finally, the ERC-4626 was developed last year to provide a common standard for tokenised yield-bearing vaults. Each ERC-4626 token represents a share in the underlying vault, which can be a lending market, a yield farm, a liquid staking pool or something else entirely.....
The Purpose of Token Standards
Ultimately, different token standards achieve one common goal:
Making development on the blockchain easier and safer
Link to Tweet: https://twitter.com/traderjoe_xyz/status/1584176139311775744
Need further assistance?
Come visit us in our Discord server to get dedicated one-on-one support.