💎 Fed’s first rate cut since 2020 set to trigger market. Find undervalued gems with Fair ValueSee Undervalued Stocks

Code Error in ICON’s Smart Contract Sparks Outrage on Social Media

Published 06/18/2018, 05:45 AM
Updated 06/18/2018, 06:01 AM
 Code Error in ICON’s Smart Contract Sparks Outrage on Social Media
ETH/USD
-

ICON, the 23rd largest cryptocurrency on Coinmarketcap, had an unacceptable bug in its smart contract code, and the error permitted everyone to disable ICX token transfers. The issue was reported by at least two Reddit users and a Twitter user. ICON, which is often referred to as the “Korean Ethereum,” reacted quickly and assured everyone that the bug would be fixed.

On Friday, a Twitter user sounded the alarm about the ICX error:

https://twitter.com/wolfcryptogroup/status/1007764965338550272

Soon, the topic began trending on Reddit, with one of the threads reaching nearly 300 comments. Once the bug became known, users started to spam ICX’s Ethereum smart contract by exploiting the disable function.

Reddit user “ThrashSilence” explained the principle behind the error by commenting:

!= means NOT EQUAL

== means EQUAL

“In this case, the contract is enforcing that the wallet address is NOT equal to a specified one, when it should be equal. This allows any address except the contract creator to enable or disable token transfers for everyone.”

In other words, the flaw was possible only because of a typo that involved a single character.

It seems that the code was fixed but the error can still be viewed:

According to a Reddit user, the part of the code starting with the line 162 is a modifier that considers the thing in the parenthesis to check if it is allowed, when called, to run the code in the {} to enable/disable. But the code uses “!=” instead of “==,” which, in Solidity, means that instead of saying the message sender must be equal to the wallet address of creator of ICON, it says the message sender must “not equal” to the wallet address of the creator of ICON. It suggests that everyone except for the contract owner can use the modifier to enable or disable token transfers.

“Wow, I'm speechless. Like building a car and the only key that does not start the car is the one you give to the buyer,” commented another user.

After the bug became public, Binance temporarily suspended ICX deposits and withdrawals.

Commentators on Reddit were shocked to see that a startup with millions of US dollars did not properly invest in code testers. ICON’s market cap touches on $770 million, according to Coinmarketcap data.

The ICON team came with a prompt reaction:

“We have implemented a solution to mitigate further problems. Most importantly, this error in no way threatens the security of your ICX tokens. All the ERC20 ICX tokens are safe.”

ICX is currently trading at $1.98, down 4% in the last 24 hours.


This article appeared first on Cryptovest

Latest comments

Risk Disclosure: Trading in financial instruments and/or cryptocurrencies involves high risks including the risk of losing some, or all, of your investment amount, and may not be suitable for all investors. Prices of cryptocurrencies are extremely volatile and may be affected by external factors such as financial, regulatory or political events. Trading on margin increases the financial risks.
Before deciding to trade in financial instrument or cryptocurrencies you should be fully informed of the risks and costs associated with trading the financial markets, carefully consider your investment objectives, level of experience, and risk appetite, and seek professional advice where needed.
Fusion Media would like to remind you that the data contained in this website is not necessarily real-time nor accurate. The data and prices on the website are not necessarily provided by any market or exchange, but may be provided by market makers, and so prices may not be accurate and may differ from the actual price at any given market, meaning prices are indicative and not appropriate for trading purposes. Fusion Media and any provider of the data contained in this website will not accept liability for any loss or damage as a result of your trading, or your reliance on the information contained within this website.
It is prohibited to use, store, reproduce, display, modify, transmit or distribute the data contained in this website without the explicit prior written permission of Fusion Media and/or the data provider. All intellectual property rights are reserved by the providers and/or the exchange providing the data contained in this website.
Fusion Media may be compensated by the advertisers that appear on the website, based on your interaction with the advertisements or advertisers.
© 2007-2024 - Fusion Media Limited. All Rights Reserved.