Skip to content

How one line of code killed Yam Finance

August 14, 2020

The now infamous project Yam.Finance launched without checking your code, as it does with many other projects in space.. Richard Ma, the CEO of the blockchain security company, Quantstamp, he said Cointelegrpah that many DeFi projects are launched unchecked to benefit from the use of reverse psychology:

“The lack of an audit is currently seen as a great way to use reverse psychology in marketing.” He added, “Create the awareness that these projects are in high demand and that you can join them from the ground floor before other people find out.”

According to Ma, many like popular projects Yearn Finance, Cream, and Yearn Finance II were introduced in a similar way. However, he points out that this doesn’t necessarily mean DeFi users should be paranoid about these beloved projects. Ma noted that “the greatest danger lies in the early days.”

When a project survives its first mounting pain, “it begins to go through many informal safety reviews.” In the case of Yearn Finance, Quantstamp later conducted a formal security audit. Yam was not fortunate enough to reach this stage. Although Ma did an unofficial review of some of Yam’s smart contracts, did not review the one that led to the failure of the project. When examining the code, he said that a single line of code did the yam farmers fail:

“TotalSupply = initSupply.mul (yamsScalingFactor)”

How one line of code killed Yam FinanceHow one line of code killed Yam Finance

This should be followed by “div (BASE)”, essentially dividing the supply by a very large number. 10 followed by seventeen zeros. Without this divider, the network was set up to create Zimbabwean-style inflation. According to Ma, there is no way to correct this mistake. As a result, cryptocurrencies worth around USD 750,000 are locked forever.

The CEO of Quanstamp doesn’t believe the Yam debacle will end DeFi as “the DeFi people have a way to agree to the volatility”. He added that many crypto influencers had invested in the now-defunct project, and noted this “So many influencers have entered YAM that it’s now about 1/3 of my Twitter feed.”

The brief history of Yam.finance is perhaps best summarized in the following table:

CoinMarketCap

Source: CoinMarketCap.

Receive Breaking News !

Install
×
Enable Notifications    Ok No thanks