Of course, no standard is bug-free no matter how great the team is. Just last year, there were 130 ERC-20 tokens affected by an issue in which transfer functions of token contracts did not return anything when called upon.
The problem was described as follows:
The calling contract sends an external call to the [BadToken], which processes the call, makes the transfer, and does not return a Boolean return value. The calling contract now looks up the return value in the memory, but since the token did not write a return value, it will take whatever it finds in this memory position as the return value of the external call. This is already pretty bad: taking some data that happens to be in a memory slot as a return value is not a good idea.
What's at Stake?
The biggest risk is that a smart contract expecting an ERC-20 interface will not be able to interact with the older token's contract if compiled with Solidity version ≥ 0.4.22. This could mean that tokens sent to such contracts will get stuck there forever, even if the contracts have functions to transfer ERC20 tokens.
The trouble appears to be bigger for Binance, as it's building its own decentralized exchange (DEX) and blockchain ecosystem. Two problematic situations come to mind:
- BNB tokens cannot be sent to decentralized exchanges that compiled contracts with Solidity version ≥ 0.4.22.
- If Binance uses the same smart contract logic to build the Binance DEX, no ERC-20 token would work there. This is speculative, however, as the development quality of the BNB token does not dictate the quality of Binance.
In a recent interview, Binance founder Changpeng Zhao explains:
The Binance Coin will migrate to the Binance Chain as a native coin. We are also encouraging other ERC20 tokens to migrate to Binance Chain. There are many benefits for doing that. Binance Chain is a faster chain. It's super easy to create a token on Binance Chain. There are no smart contracts to program; it's more secure and there's less room for bugs.
Binance wants ERC-20 tokens to migrate to its own blockchain, the Binance Chain, which seems far-fetched. There's no good reason as to why a team wouldn't go with a much safer protocol like Ethereum or Stellar. The only advantage is that projects might be able to save money on listing fees. Also, maybe they'll have a say on the blockchain consensus, as it will be DPoS based.
If the goal of blockchain technology is to increase decentralization, this seems like the wrong way of promoting it. Still, as Zhao reminded us during an interview on Ivan on Tech, Binance is privately-owned, and its goal is to make money.
Should we just leave the future of cryptocurrencies in the hands of another privately-owned enterprise?
Binance has created a meaningful product that connects millions of users every day, and hopefully it can prove that the entire ecosystem will be truly decentralized.
Disclaimer: The views expressed in the article are solely those of the author and do not represent those of, nor should they be attributed to, CCN.