Anyone who deals in crypto will run across ERCs and token standards. You might have heard of ERC-1155, ERC-20, ERC-721, and so many other numbers. But what are token standards anyway? What do they do? What is an ERC, and why is it important to you in crypto? Keep reading to find out how ERC-1155 compares to ERC-223!
What are ERC Token Standards?
An ERC token standard is a set of rules that Ethereum-based tokens comply with. Standardized rules allow for a smoother experience. Instead of having to build everything from the ground up for each new project, you can simply use an ERC’s structure to dictate how your token functions. You’ll also be sure that your token is compatible with other tokens under the same ERC and the smart contracts that issue your tokens.
ERC is “Ethereum Request for Comment”, which is the technical term for application-level standards and conventions. ERCs cover tokens, wallets, smart contracts, and more.
The two most notable ERCs are ERC-20 and ERC-721. If you’re in crypto and dealing in Ethereum-based tokens at all, it’s all but certain that you’ve handled cryptocurrency or NFTs that are on the Ethereum blockchain, you’ve dealt with either of those two ERCs.
There are many standards in the Ethereum community, of which the following are just some of the most notable:
- ERC-20: The most widespread cryptocurrency token standard.
- ERC-721: The most widespread non-fungible token standard.
- ERC-1155: A token standard developed for gaming that can govern both fungible and non-fungible tokens.
- ERC-223: A token standard developed to fix a fatal bug in ERC-20 that resulted in millions of dollars of tokens lost.
- ERC-865: A token standard intended to help newcomers to crypto by abstracting away gas fees as part of the transaction.
What is the ERC-1155 Token Standard?
Some token standards are made for particular usage cases where other token standards just don’t match up. ERC-1155 is one such case.
Video games can be put on the blockchain, letting in-game assets become tokens. Blockchain games can have both fungible and non-fungible tokens. Things like health or money or other resources can be implemented as fungible tokens, while items can be implemented as NFTs. As you can expect, this means a massive number of tokens that can be put on the blockchain.
The existing token standards would have trouble dealing with such an implementation, hence why ERC-1155 was created.
If you’re interested in learning more about different kinds of token standards, check out our other comparisons:
ERC-1155 Multi-Token Standard
This is ERC-1155’s headline feature, the capacity that makes it ideal for gaming above other token standards. With a multi-token standard, ERC-1155 can represent and control any number of fungible, non-fungible, and semi-fungible token types under a single contract.
Other token standards require individual contracts for each type of token. This would not normally be a problem in other environments, but in a game, this would be fatal. Individual contracts for each and every type of token in a game would mean a massive number of contracts, which in turn leads to skyrocketing gas prices and abysmal computing efficiency.
ERC-1155 therefore keeps gas costs down and efficiency high while serving its specific needs.
This is another feature particular to ERC-1155. SFTs have aspects of both fungible and non-fungible tokens. A good analogy is concert tickets. Before the event, a ticket is a fungible asset, since any ticket will admit you to the event. Afterwards, it has no further trading value but instead becomes a piece of memorabilia. SFTs function in this manner, giving developers another tool for their projects.
ERC-1155’s Other Features
In addition to the above features, the ERC-1155 standard incorporates the following:
- Batch Transfers: You can transfer multiple types of assets in a single transfer.
- Batch Balance: You can check the balance of all contained digital assets in a single balance call.
- Batch Approval: You can approve a transaction of multiple types of tokens in one go, instead of having to approve every single token type.
- NFT Support: ERC-1155 automatically assumes that a transaction that contains a token whose supply is 1 is an NFT and treats it as such.
- Safe Transfer Rules: ERC-1155 will automatically revert any transaction that trips an error or is improperly filled out.
Applications And Use Cases
While ERC-1155 was developed first for a gaming environment, gaming is not the end-all and be-all of ERC-1155. It has other capabilities that are useful in non-gaming contexts.
For instance, decentralized applications (dApps). Many dApps use both fungible and non-fungible tokens. The problem is that ERC-20 and ERC-721, the most common standards for these types of tokens, are incompatible with each other. Attempting to link the two is a massive and complex challenge. But an ERC-1155 smart contract was created from the ground up to handle both types of tokens. This makes operations much less complex, easier to program, and easier to use.
ERC-1155 is also an excellent choice for digital content packages. The multi-token standard allows a single package to contain a range of products. A musician might release their album as an NFT and bundle it with some limited-edition pictures and some non-exclusive other works, all packaged together in a single batch transfer.
ERC-1155 has not yet seen widespread adoption, but given its capacities and the limitations of other token standards, it is likely to become more important and more widely-adopted in coming years. Its makers, Enjin, have already demonstrated its capabilities on their blockchain ecosystem. They’re doing so well that Enjin Coin is one of the fastest growers in recent years, so we may be seeing more of ERC-1155 very soon.
What Is the ERC-223 Token Standard?
Some token standards are created to address deficiencies in previous token standards. ERC-223 is an excellent example of this, as it’s intended to fix a significant fault in the ERC-20 token standard.
Let’s take a moment to consider the ERC-20 standard first. It’s the Ethereum token standard. It’s the standard that most Ethereum coins use. However, it has one specific fault that has already resulted in several million dollars’ worth of Ethereum coins lost.
ERC-20 has several functions that govern how it sends coins to other accounts. The ‘transfer’ function sends coins to an externally owned account (EOA). The ‘transferFrom’ function sends tokens from one account to another. The ‘approve’ function allows another account to repeatedly withdraw tokens from your account, up to a specified limit. Transferring to a smart contract requires a combination of the ‘approve’ and ‘transferFrom’ functions.
Should you send ERC-20 tokens using the ‘transfer’ function to a smart contract unable to accept them (for example, a smart contract running on the ERC-721 standard), the transfer will show as successful and the tokens will depart your account. However, they will never arrive in the smart contract, and since it is unable to accept them and has no mechanism to return them, the tokens will disappear.
It can be difficult to remember which function should be used for which type of account. This has resulted in millions of dollars of tokens lost, since the transaction shows as successful, and the user has no way of knowing whether the transfer actually did go through or not unless the recipient informs them.
It is with this fault in mind that ERC-223 was created.
ERC-223’s main difference over ERC-20 is a change to ERC-20’s ‘transfer’ function. When executing a ‘transfer’, ERC-223 checks whether the receiving account is an EOA or a smart contract. If it sees that the recipient is a smart contract that cannot accept its tokens, ERC-223 assumes that the contract has implemented the ‘tokenFallback’ function. This sends back the tokens and avoids the loss that ERC-20 is vulnerable to.
The user still pays Ethereum gas fees for the transaction, but this avoids the more grievous loss of tokens.
ERC-223’s solution does have one weakness. If the receiving smart contract does not have a ‘tokenFallback’ function, the ‘Fallback’ function runs instead. This results in the very same token loss ERC-223 is trying to avoid.
While this fix is the largest of ERC-223’s changes and the reason it was created, it also incorporates a few other fixes. For one, the ‘transfer’ function consumes half as much gas as the ‘approve’ and ‘transferFrom’ combination that ERC-20 needs.
Overall, ERC-223 is essentially a patch on ERC-20. It still fills the same functions, handles the same type of token, and makes some improvements over the original, but aside from the fix, is not substantially different compared to ERC-20.
Major Differences Between ERC-1155 Vs ERC-223
The largest difference is that they fill two very different functions. ERC-1155 aims to enable blockchain-based gaming, and in so doing, happens to have a range of other possible uses. ERC-223, on the other hand, is entirely about fixing the fault in ERC-20. Put in simpler terms, ERC-1155 is a standard that aims to enable a wider range of capacities in the crypto world, whereas ERC-223 is an incremental improvement over another token standard.
It’s important to keep this in mind, since the differing functions make it difficult to compare them on a side-by-side basis. We’ll still try to do so, but please bear in mind that one is not necessarily ‘better’ than the other.
Their largest difference is the type of token they handle. ERC-223 only governs fungible tokens. ERC-1155 handles fungible, non-fungible, and semi-fungible tokens. With this in mind, their approaches and their capacities are different.
Another difference is their relative scale of adoption. In addition to Enjin’s ecosystem of games, ERC-1155 has already been adopted by the major NFT marketplaces, most notably OpenSea and Rarible. ERC-223 so far remains little-used, despite its attempt to fix ERC-20’s fault.
Both token standards have some similarities. For one, both incorporate rules to safeguard token transfers. ERC-223 was specifically created to add such rules to ERC-20, while ERC-1155 incorporates its Safe Transfer Rules from the beginning.
Both ERCs also improve on their predecessors’ implementations. ERC-223 saves on gas fees compared to ERC-20, while ERC-1155 fixes certain bugs in both ERC-20 and ERC-721.
As these two standards are made for different use cases, a direct comparison is difficult. Cryptocurrency or crypto wallet projects will have more use for ERC-223, while ERC-115 is ideal for gaming, marketplaces, or portfolio management.
Token standards can fulfill a wide range of use cases, and there’s no better illustration than comparing ERC-1155 and ERC-223 side by side. Yes, they’re both ERCs, but they’re also almost entirely different. Their functionalities are different, their use cases are different. As such, one isn’t really better than the other, they just do different jobs. Are durians better than hot dogs?
It’s important to know what protocols do what, so that you can better understand which to use and how to structure your blockchain project. We’re here to help with that. Check out Tokenfy to see how we can better help you understand the blockchain.