LEGO and our digital Web3 realm…..

ERC-? Demystifying Token Standards in Web3

Created by:

Lego anyone?

There is an analogy used in the Web3 world that a blockchain such as Ethereum, Polkadot, or Solana is a platform for money-LEGOs. When audited contracts, DeFi protocols, crypto tokens, etc all have recognisable standards across the eco-system, it guarantees that they can inter-operate smoothly with each other. So when crypto tokens are designed, we need to make sure the infrastructure on the blockchain (e.g. crypto wallets) can communicate with them. We therefore ensure that the whole system is composable, just like Lego blocks.

Lego Contract Builders

Web3 developers design and audit token standards to ensure an interoperable ecosystem

Since we are using the Ethereum Network in our lessons track, we’ll use the Ethereum ecosystem as our basis for explanation here.

The birth of a token standard.

Any ERC token starts its life as a technical design proposal in the Ethereum community. It’s short for an Ethereum Request for Comment. It gets voted on, and if well received, the design will be perfected and it will become an ERC token.

There are many types of these tokens, but we are going to look very briefly at only three of them. Just think ecosystem, interoperability, composability and of course LEGO, and you’ll start to get the picture!

Let’s first make this distinction. Every blockchain has its own unique native currency. Ether, or ETH is the native currency coded into the Ethereum blockchain. It secures the network financially, and is among other things, used for paying transactions fees. But an ERC token is a token standard on top of this.

What does it do though?

ERC-20

It’s good to realise that the token standard is what it is because of the code in the smart contract that creates it. Similarly to ETH, we can use an ERC-20 on the network as a token of value. And similarly to money, where one ERC-20 token has all the same properties as the next one, we say that it is fungible.

The smart contract that first mints the ERC-20 tokens also serves to track ownership and supply of all of those tokens across the network. Actually they never leave the contract. The crypto tokens you see in your wallet, is just a reference to them in their home of the smart contract. That’s why you will sometimes see warnings about scams saying “always check the token contract address”. That address hash, will point towards home to the token contract it came from. Examples of ERC-20s are DAI, MATIC, UNI, etc.

ERC-721

Sound reasonable? Now an ERC-721 aka an NFT, is a non-fungible token which means it’s unique. And the differences in one to the next can be as big or small as we decide to create in both the smart contract that points to it, and the type of content that it will actually be, whether it’s a seated concert ticket, or a rocket to the Moon. There are proving to be an ever growing number of things we can use them to represent. An ERC-721 has all the functionality of an ERC-20, and of course much more. We can expect to see half of the world being NFT-ed at some stage in the future!!

ERC-1155

And lastly…… at least for this moment in time, the ERC-1155, a multi-token standard. Its smart contract seeks to manage both ERC-20s and ERC-721s from inside one contract. It is proving ideal in the world of gaming where fungible and non-fungible qualities are needed, for example representing life/energy for the former, and any range of attributes/weapons that hold a subjective value for the latter. As far as ERC-1155 development is concerned, it is giving us a chance to improve on some design issues on the other two tokens. It makes precious on-chain bytecode storage much more efficient, and it is simply opening up a whole new world of possibilities exponentially.

The Future?

Are ERC-20 and ERC-721 tokens going to disappear? No way. But watch this space for the ERC-1155!

Now, you may have a few ERC-20s or NFTs to create, so we’ll let you get back to that. Have fun!

Lego Protocol Builders

Developers building composable components for distributed networks

;