Smart contracts have great power to absorb money like a black hole. Almost 400$ Million is gone due to a bug in the smart contract of YAM. What was the bug that cause all the destruction?
=> Could there be any handle mechanism by
Solidity or some kind of approval mechanism before deploying smart contract?
Some high-level information:
We have found a bug in the rebasing contract, please read below. All funds in staking contract are safe, as this is an unrelated part of the protocol. User YAM balances are also unaffected. — Yam Finance (@YamFinance) August 12, 2020
In the case of this bug, an excess of YAM tokens would be printed, causing a larger supply to dilute the intended price, meaning that the value of each YAM token would decrease — hurting investors. Additionally, this larger supply of YAM tokens would make it more difficult for the community to contribute to governance, as more YAM tokens would be needed to make changes. This would make the code unable to be modified, so bugs such as these would persist.