ERC-1155 standard: what is it and how does it work?

in token •  5 years ago 

When someone talks about Ethereum tokens, they are usually referring to ERC-20 tokens. This is the common choice for most Ethereum assets and the majority of people only have knowledge of this standard. This kind of tokens are fungible, which means that they can be divided into significantly smaller pieces and put back together at any time. All tokens of this kind are virtually the same with no distinction between each other. Think of it as fiat money, if I have $1 in my bank account it is essentially the same $1 you have on yours, and it can be divided in smaller pieces and they will worth the same.
A more recent kind of token is the ERC-721 non-fungible token standard (can't be separated), which allow each single asset to be a one of a kind collectible item with his own serial number. This standard have been being widely used in blockchain games for obvious reasons.

Where does the problem relies? Why is the ERC-1155 token standard needed?

Basically, neither ERC-20 nor ERC-721 standards are really suitable for games. If you want to represent an in game asset with an ERC-20, you will end up deploying a whole new ERC-20 contract to the blockchain just for that particular asset, and you will have to do it for each item you want to create, and deploying a single new contract into the blockchain is quite expensive. With ERC-721 you will have the same issue of having to create multiple contracts, and they aren't made to be fungible, and almost every game needs fungible items like ammunition, materials or in game currencies. But both standards are hardly interchangeable, making really expensive and difficult to create a decent blockchain game.

So, why ERC-1155?

The main characteristic of this token standard is multiple tokens can be instantiated in a single smart contract, this means that a single smart contract can govern every token in a blockchain game, including both fungible and non-fungible. This standard allows batch transfers, sending multiple tokens to one or multiple recipients in a single transaction. This reduces the gas and congestion on the Ethereum blockchain. These are the first type of tokens with the possibility to execute a smart contract function by sending a token to an address.
Everything that can be done with an ERC-20 or an ERC-721 can be done quicker, cheaper and in a more efficient way with the ERC-1155 standard. Now I want you to stop for a couple of minutes and to think, besides game industry, how many possibilities and applications this might have.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!