Just two days ago, a new decentralized cryptocurrency called YAM was revealed by its creators. On day one the cryptocurrency had a market cap of $ 60 million, but a single line bug in the code caused the currency to collapse and YAM's market cap fell to zero in just 35 minutes. .
YAM was a decentralized finance experiment, so he used a system of governance (to make protocol changes). It was based on agricultural production protocol where tokens are supposed to maintain parity with the US dollar by relaxing or contracting the offer.
What happened?
At around 6 p.m. UTC on Wednesday, August 12, the team discovered a bug in YAM's reline contract that would hit many more YAM coins than it intended to sell. This resulted in a large amount of YAM being sent to the protocol reserve, the YAM project explained in a blog post.
"These tokens belonged to the governance contract itself and therefore could not vote. Because they exist and cannot vote, it is impossible to ever achieve the minimum voter turnout rate. This means that governance is permanently disabled and all other tokens held by governance contracts are permanently locked. "In short, the coin has lost control of its on-chain governance function. The code had not been properly audited given its relative newness, and the bug forced the protocol to continue printing "failed" YAM tokens which ended up preventing token holders from making governance decisions.
The insect
The bug responsible for the above comes from this line of code:
totalSupply = initSupply.mul(yamsScalingFactor);
But it was actually supposed to be something like this:
totalSupply = initSupply.mul(yamsScalingFactor).div(BASE);
The team claims that almost every $ 750,000 Curve Tokens stored in the project treasury were blocked by the code flaw. These assets were intended to serve as reserve currency to support the value of YAM tokens.
The results
All efforts to regain control of YAM treasury have failed. So YAM co-founder Brock Elmore tweeted an apology:
i am sorry everyone. I have failed. thanks for the insane support today. I'm sick of grief
- belmore🍠 (@brockjelmore) Aug 13, 2020
There were nearly 29 million YAM tokens in circulation. At one point, the project even managed to hit a market cap of around $ 525 million. Even now the currency appears to be worth around $ 29 million that is, if you can find YAM buyers.
Either way, the project announced a plan to migrate to YAM 2.0. You can find all related details here.
