Understanding Multitoken Aka ERC1133 Compatibility with ERC20
The Ethereum community came up with the popular ERC20 standard to allow dapps and wallets to handle tokens across multiple interfaces. We are using the MultiToken ERC1133 specification to create decentralized token baskets. The baskets allow users to do automatic rebalancing which helps investments grow faster and drop slower than the market.
How does Multitoken Work?
Multitokens may either keep the assets ratio constant or maintain a more complex strategy as defined by the owners of the tokens. All of the transactions take place on the smart contracts. When the prices of tokens change, the asset ratio in the smart contract is violated. It starts a chain of events for arbitrage and the smart contract allows users to exchange tokens and maintain the originally intended proportions. This rebalances the asset proportions and helps mitigate investment risks and provides a reliable and convenient solution for asset storage and capital distribution.
With the help of the Marketplace everyone can buy multitokens and withdraw them to any crypto-wallet. An additional benefit of using multitoken is the ability to withdraw users’ portfolio anytime they want. Moreover, due to compatibility with ERC20, multitokens can be traded freely on the exchanges.
Choosing the Right Standard
ERC20 compatibility makes multitoken easily usable across the board. However, the we rejected ERC827 and adopted ERC1133. Below there are more details about the standards:
ERC20
The ERC20 protocol was created to standardize transactions between various dapps and crypto- wallets. ERC20 compliant tokens help users to move their assets across the wallets and exchanges seamlessly. The standard ensures that multitoken has the necessary functions to interact with any crypto-wallets that accept ERC20 compliant tokens.
However, there are some limitations to the standard. If users try to use tokens to pay for a smart contract, the tokens can get destroyed unintentionally. So the multitoken implementation needed a more robust solution.
ERC827
This standard is an expansion of ERC20 interface. ERC20 provides only the transfer of value while ERC827 can transfer both value and data. Although the standard allows smart contracts for single transactions only this creates a severe limitation for implementing multitokens.
Also, the ERC827 puts the subtokens at risk of being stolen from the multitoken contract. A problem with the standard is that performing arbitrary calls allow attackers to steal subtokens. Even attempts to prohibit the multitokens from touching through ERC827 don’t resolve the issues. So the ERC827 standard is fraught with various possibilities of misuse. As a result, the MultiToken team decided not to support the standard.
ERC1133
This is an extension of the ERC20 interface. This standard makes it easy to retrieve information and manipulate the multitoken.
Multitoken ERC1133 was released to ensure that all participants (developers of various systems and wallets) can use multitokens as a simple ERC20 compatible token. But at the same time they can get more information about the multitoken if necessary (the sub-patterns can be checked by proportions of the sub-tags). Because of the fact that the crypto-wallets will know the rates of tokens contained within the multitoken, the wallets could deduce the value of a multitoken and figure out the total value of a particular portfolio.
Any wallet or exchange that supports ERC20 can store the multitoken. Although if the wallets or exchanges support ERC1133, they can provide their users with extra information about the subtokens that is available due to the ERC1133 implementation. They can give their users the option to burn the multitoken and retrieve the subtokens.
The ERC1133 implementation makes it easier for crypto-wallet and exchange developers to make multitoken part of their services. So besides the multitoken users, it’s also adding value to the developers.