Which ERC Standards are important?

Hi everyone

I am trying to understand the ERC standards. I found 17 different standards on the ethereum.org webpage. Some of them look familiar, such as the ERC-20 and 721 token standards, at least I have heard of them before and understand the ERC-20 has been used for ICOs and 721 for the Cryptokitties, I think.

Please help me understand:

  1. What are these ERCs good for?
  2. Do I need to know about them when coding smart contracts?
  3. Which ones are the most important ones to know about?
  4. Are these ERC standards just different types of smart contracts?
  5. What is the difference between a token and a smart contract?
1 Like
  1. What are these ERCs good for?

Emmm, no matter which kind of ERC, there is Simple Summary and Motivation, I think this part is trying to explain why we need this, for example:
https://eips.ethereum.org/EIPS/eip-20

  1. Do I need to know about them when coding smart contracts?
  2. Which ones are the most important ones to know about?

I think the more you know, the better, but at least you should know ERC20 and ERC721.

  1. Are these ERC standards just different types of smart contracts?

Yes, I think so.

  1. What is the difference between a token and a smart contract?

Emmm, I think a token must be a contract, but a contract may be not a token, just like staking contract, oracle contract, these are not a token contract.

2 Likes

Thank you!

I am trying to find the types of smart contracts that exist outside of tokens, it is so difficult to find any good resource for that. Basically any application/implementation on Ethereum can be considered a smart contract, right? I always imagined an oracle as being sort of sensors in the world outside (off-chain) and providing information directly into any specific smart contract, thus rather being a function in a smart contract rather than a smart contract on its own.

1 Like

Yeah.

As for oralce, for example, in the Compound Lending Protocol, for all supported assets, there should be a valid price, so there is an oracle for it, and someone sets price in the oracle, so lending contract can get price from the oracle contract.

2 Likes

I wouldn't say so, no. They're "guidelines" to develop interoperable smart contracts, a given contract can implement many standards, or none at all.

Smart contracts are computer code with associated storage (memory) living under an ethereum address. Code, storage, address.

While standards are technical specifications to facilitate interoperability between stuff.
For example the ERC20 standard specifies a token's interface and behavior such that if you develop a smart contract that complies with it, then you can expect for it to integrate easily with other systems that know how to handle ERC20 tokens. This way, you can design a Wallet contract and safely assume it can call transfer() on any ERC20 token.

Just like wrenches, which also follow interoperability standards by having predefined shapes and sizes so they work with standard-compliant screws:

3 Likes

Does this mean that I could have a smart contract that could have both the ERC-20 standard and the ERC-721 standard? Would it be one smart contract that handles two types of tokens then? Is that possible?

1 Like

Yeah, have a look at https://eips.ethereum.org/EIPS/eip-1155

2 Likes

Interesting… so this would be a completely new standard, different from both ERC-20 and ERC-721, but basically integrating functionality from both. Why would anyone from now on not apply this standard going forward, even their smart contract is to handle only ERC-20 tokens for the moment, they may wish to integrate ERC-721 tokens at some later point … which should be possible using the upgrade plugin feature, right?

1 Like

Hi @codingbibi,

Ecosystem support is key for standards. Wallets, block explorers all support ERC20, and to a lesser extent ERC721. There is less support for ERC777 and ERC1155.

If you were creating an NFT collectible, then due to the level of eco system support you might choose ERC721 over ERC1155 if you wanted it used widely.

If you were building a self contained game, then you may consider ERC1155.

1 Like