Ethereum blockchain technology is used extensively for developing decentralized applications. It allowed game developers and players to trade in the in-game assets. One of the popular games, CryptoKitties, opened the debate of differences between ERC721 and ERC20. Anyone buying a token will want to trade it later. This made it necessary to develop standards for tokens. ERC or Ethereum Call for Comments was created to handle these demands. ERC20 and ERC721 are widely used standards for ERC tokens.
ERC20
It is an API for smart contract tokens using ethereum. A set of standards have been devised for this protocol. These rules are related to the sharing, moving and exchanging of tokens. The standard components of ERC20 include its name, symbol, decimal, balance, transfer, approval, transfer from, total supply and allowance data. Only the symbol, decimal system and token name are optional, while others are mandatory. An ERC20 token must have a transfer function to make it easy to transfer a token from its owner to another entity.
ERC721
This standard was implemented for CryptoKitties in 2017. Kitties in this virtual game are represented by ERC721 tokens. Each cat has one exclusive token to represent it. The token determines the cat owner. It makes ownership easier by clearly defining who owns or does not own an asset. For example, it is not feasible for any owner to have half ownership of a cat in this game. For this reason, ERC721 tokens are categorized under non-fungible assets. Its other standards are like ERC20 standards.
ERC20 tokens are fungible, represent only one asset and are divisible in several ways. ERC721 tokens cannot be divided and represent a set of assets.