Yam Finance is the hottest trend in DeFi at the moment, but a technical flaw in its code was discovered just a day after it started distributing tokens. Prominent members of the crypto community had already labeled it as a scam and warnings had been posted, however, it was seemingly rescued at the last minute.
As reported by BeInCrypto, Yam Finance promised to bring fairness back into farming with an elastic token supply which it aims to eventually peg with the U.S. dollar.
The experimental financial project began distributing YAM tokens to participants who staked other crypto assets into eight different pools on the platform.
The farming frenzy that supervened saw token prices surge from zero to $167 as collateral flowed into the unaudited smart contracts. At the time of press, there was over $560 million in total value locked onto the platform according to YAMalytics.
The promise of easy money was such a pull that Messari noted the most popular page on its entire website was the one displaying Yam portfolios:
And @jpurd17's YAM portfolio screener is the most viewed page on Messari right now…
What a sentence. https://t.co/qUS1rBRtEo
— Messari (@MessariCrypto) August 12, 2020
YAM Code Flaw Governance Dilemma
In a tweet earlier today, Aug 13, the project stated that it had found a bug in its code but reassured eager farmers that their funds were safe for the time being:
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.
The YAM monetary system works on a principle of ‘rebasing’ which allocates 10% of each diminished token distribution back into a treasury via a dollar-pegged stablecoin called yCRV.
Following the first day of staking, participants are able to deposit their earned YAM back into the protocol to earn a slice of the next distribution. The tokenomics are fully explained on the official website.
It appears that the bug causes rebases to mint more YAM than intended, and two proposals were subsequently made to reset the rebase to zero and reset the YAM in the reserves back to zero.
To fix this issue, we are creating a two-part proposal:
1. Set rebase to 0; this will pause rebases to allow us to implement full fix
2. Reset YAM in YAM reserves to zero; this will eliminate the over-inflated YAM in the reserves
— Yam Finance (@YamFinance) August 12, 2020
To achieve the governance vote, 35,000 YAM were initially requested. However, after speaking to Compound Finance CEO, Robert Leshner, the project team discovered that they needed 160k tokens to achieve governance.
Pleas were put out to farmers to remove liquidity and start delegating for the survival of the project. The tokens must be held in Yam wallets until Aug 16, 9 AM UTC, in order for them to count, so it’s still a big risk for many.
We need YAM farmers to act now. If we are successful, YAM holders will very likely vote to reward those voters who help save the protocol.
Aave developer, Emilio Frangella [@The3D_] has been conducting his own investigation into the Yam staking rewards contracts, discovering that changes to the original contract are minimal and mostly related to configuration or small improvements on the reward distribution. However, a governance decision is required and the tokens can return to zero if it fails.
Yam Fights for Survival
To its credit, the project has issued several warnings about the unaudited nature of its smart contracts and this has now been plastered on the front page of the farming dashboard;
While the initial creators of the Yam protocol have made reasonable efforts to attempt to ensure the security of the contracts, including forking much of the codebase from existing well-audited projects and soliciting review from friends, nothing approaching the rigor of a formal audit has been conducted at this time. We STRONGLY urge caution to anyone who chooses to engage with these contracts.
An official explanation of the events claims that if governance is unable to submit a bug-fix proposal prior to the second rebase, no further governance actions will be possible due to the amount of YAM in the reserve. The notice added, “If this happens, the YAM treasury will become ungovernable and these funds will be lost.”
The crypto community weighed in with their opinions, which ranged from some labeling it an all-out scam, to others praising the effort and attempt to try something different.
Ethereum Foundation’s Hudson Jameson [@hudsonjameson] was of the opinion that the team behind it meant well, and for it to be a ‘cool experiment’ because they love DeFi, but did not expect such a response and rushed to launch it, adding;
Shaming the ecosystem or the YAM team for what may turn into a failed experiment is a net negative. We need a community of people like the YAM team to push the envelope,
Defirate editor Cooper Turley commented on the possibility of not reaching the required amount for the governance vote due to high gas fees:
Will community members eat ~$100 in gas to save the yCRV treasury? Feel like this is a pretty crucial turning point for the project.
Whales to the Rescue
The ‘Save Yam’ campaign garnered the support of other DeFi platforms such as Synthetix and Curve Finance that encouraged participants to contribute to the voting system.
Earlier in the day the platform also added that it was approached by a number of ‘benevolent whales’ who wanted to help out by farming the Uniswap pool as the deadline approached.
We have been contacted by various benevolent YAM whales.
Many are farming the Uniswap Pool until 7am UTC to accrue extra YAM to delegate.
Progress toward our 160k goal will appear slow but then speed up rapidly as we approach 7am UTC.
Help us. We are all in this together #DeFi
— Yam Finance (@YamFinance) August 13, 2020
Earlier this morning Yam had hit its target and stretched the goal to 200,000 votes “for extra safety.” At the time of press, the platform was reporting over 270,000 votes delegated which mostly came from the aforementioned whales.
The most recent update from Yam was that the governance proposal had finally been submitted.
Governance proposal submitted (0x1d64875b24732bc2e8880cd0870ea8e301ddde683ce81fea418e9ab4feea90bb)
we are urgently investigating a potential flaw that would prevent proposal execution.
We strongly advise exiting the Uniswap YAM/yCRV pool prior to rebase at 8am UTC (35 mins)
— Yam Finance (@YamFinance) August 13, 2020