ERC-1155


erc1155

We already know that Ethereum not only has its currency (Ether) but it also supports different types of tokens built on top of Ethereum which represent various digital assets. Until recently there were only two main token standards - ERC-20 and ERC-721. A token standard is a programming interface that defines common methods that a token smart contract has to comply with.

But the last year a new Ethereum improvement proposal was finalized with a new token standard that can make existing token standards obsolete. Let’s see what all the fuss is about but before that let’s outline existing token standards.

Token types in Ethereum

There are two token types in Ethereum:

  • fungible tokens. Fungible tokens can be thought of as currencies inside of Ethereum.
  • non-fungible tokens. Non-fungible tokens represent something unique. So non-fungible tokens are not mutually interchangeable.

Fungible tokens are represented by the ERC-20 standard. Examples of fungible tokens:

  • BNB - cryptocurrency created by the Binance cryptocurrency exchange. From its page: “BNB has multiple use cases: fueling transactions on the Chain, paying for transaction fees on Binance Exchange, making in-store payments, and many more.”
  • GNT - “Golem enables users and applications (requestors) to rent out cycles of other users’ (providers) machines. Any user ranging from a single PC owner to a large data center can share resources through Golem and get paid in GNT (Golem Network Tokens) by requestors.”

Non-fungible are represented by the ERC-721 standard. Examples of non-fungible tokens:

  • CryptoKitties - CryptoKitties is a blockchain game that allows players to purchase, collect, breed and sell virtual cats.
  • Gods Unchained - The Ethereum-based crypto collectible card game. It’s Heathstone in Ethereum.

ERC-1155 token standard

Note that ERC-20 and ERC-721 can only represent a single token type. It’s time for the ERC-1155 token standard to come into play. ERC-1155 defines a standard that allows storing multiple tokens of different types in the same smart contracts. Also, it defines methods to transfer multiple tokens in the same transaction.

Advantages of ERC-1155:

  • It saves space in Ethereum for bytecode storage. Instead of storing bytecode for multiple token smart contracts, only one bytecode of ERC-1155 smart contract is stored. Ethereum database gets larger every day putting storage costs on users running run a full node.
  • It makes transaction costs cheaper. Because instead of sending multiple transactions with different token transfers, you can send a single transaction.

One of the most interesting projects using ERC-1155 is Enjin Coin. Enjin’s platform is designed to tokenize in-game items, trade among players. The Singapore-based company Enjin announced a partnership with Samsung in 2019. The digital currency is supported by Samsung Galaxy S10.

Conlcusion

ERC-1155 was finalized in the summer of 2019 and it’s already available in Ethereum. To my shame, I went into it only recently when working on the support of ERC-1155 token for Blockscout.