Rebase Bug Permanently Breaks Yam Governance
Unaudited contracts resulted in its death after all.
A bug in the hastily-developed contracts for Yam Finance resulted in the governance contracts being â€œpermanently brokenâ€� and $750,000 worth of Curve tokensÂ locked from use.
Andre Cronje, DeFi developer and founder of the yEarn protocol, told Cointelegraph that this resulted from a bugged rebase function.
Yam is supposed to be a stablecoin with a similar mechanism to Ampleforth, with the contracts creating or destroying supply based on the tokenâ€™s price to maintain a $1 peg.
Cronje said that a bug in the rebase function meant that each call after the first one would â€œexponentially increase [supply] every time by 10^1e18.â€�Â
This results in a massive influx of new tokens, far more than there should have been.
But there were three parts to the bug, according to Cronje. The issue was compounded by an additional mechanism used by Yam to balance the tokenâ€™s price. The rebase function also sells â€œinto the yCRV/YAM pool up to a max of 10% slippage,â€� he said, to ensure that the price reflects the updated supply. The proceeds from the sale and remaining YAM are sent into the projectâ€™s treasury contract.
A further aspect of the system is its governance, which requires a percentage of all tokens to be committed to a proposal for 12.5 hours. While there were earlier concerns about not enough tokens being delegated, triggering a support campaign to get holders to vote, this was ultimately futile.
Since the rebase created a huge amount of new YAM and sent it to the treasury contract, it now holds the vast majority of all tokens. â€œThis means the available YAM on the market aren’t enough to reach quorum,â€� said Cronje.
The result is that both the governance and the treasury are now â€œbrickedâ€� and cannot be accessed. The rebase bug cannot be fixed without access to governance, so this should in theory spell the death of the project â€” or at least its existing smart contracts and tokens.
Powered by WPeMatico