Reports have emerged that there is a bug in the ICON smart contract code. This programming error is being exploited by spammers to disable token transfer transactions. With the ICX token swap only four days away, this is yet another setback for the much-maligned cryptocurrency project.

Details of the Bug

According to a Reddit post, there is a critical error in the ICX ERC-20 token smart contract. Despite the ICON development team characterizing it as a minor error, users report that hundreds of thousands of transactions have been canceled. The reportedly allows anyone except the contract creator to disable or enable ICX token transfer on a network-wide level. A Redditor by the name of “NotYourMothersDildo” claims that someone has been spamming the ICON blockchain, disabling transactions in the process. According to the Reddit poster, the bug is the same one found in the Yggdrash cryptocurrency project.

An examination of the smart contract code shows the fragment where the error resides. It seems like a typographical error in the “onlyFromWallet” modifier. This particular modifier controls the ICON token transfer function via the “enable” and “disable” command gates.

The modifier with the incorrect code controls the fragment in the image below A Redditor with the username “firesquidwao” explains the problem thus:

This part of the code is a modifier. The modifier uses the thing in the require() to see if it is allowed, when called, to run the code in the {} in the two functions to enable/disable. However, instead of saying the message sender must be ==(equal) to the wallet address of the creator of ICON. It means that the message sender must !=(not equal) to the wallet address of the creator of ICON. So, everybody except for the creator of ICON then fits the requirement to use the modifier, and therefore everybody but him can enable/disable Token Transfer.

Another Setback for ICON

The news of the bug is the latest setback for the ICON project. For months, delays over the ICX token swaps kept investors apprehensive until Binance announced its support a few days ago. Binance even reportedly disabled all ICX token transfers but has since reversed the decision even though the problem appears to exist still.

Min Kim, a co-founder of ICON acknowledged the bug in a tweet. Kim said the bug was a minor issue and that steps were already being taken to rectify the problem permanently. However, even if the mistake appears small, the problem that it causes isn’t insignificant. Fixing code errors in a public blockchain can sometimes be a challenging endeavor. Thus, the question now is whether the development team can obtain a solution before the token swap on June 20.

Minor bug. Quick solution initiated. Permanent solution already in the works and expected to be done today. Thank you for your patience and understanding. — Min (@minhokim) June 16, 2018

While the story unfolds, the consensus on social media is that such a thing shouldn’t have occurred in the first place. Many believe that the development ought to have audited and tested the smart contract code before rolling it out to the public.

How big of an indictment do you think this latest setback is on the viability of the ICON project? Will this bug cause a delay in the ICX token swap? Keep the conversation going in the comment section below.

Image courtesy of Reddit and Twitter (@minhokim)