SAVE YAM! šŸ 

Yam Finance
Yam Finance
Published in
3 min readAug 13, 2020

--

Long story short

  • We found a bug in the rebasing function that mints too much to reserves
  • The excess mint stays in the YAM Reserves contract
  • This would make it impossible to take any future governance actions
  • We need YAM farmers to act now to help save this project
  • We believe that if the community saves YAM, tokenholders will grant lost rewards + a bonus to those who acted to save the system

Read on for more details. This post will be updated as we know more.

What happened

totalSupply = initSupply.mul(yamsScalingFactor);

should have been:

totalSupply = initSupply.mul(yamsScalingFactor).div(BASE);

No user balances are affected and assets in the staking contracts are unaffected.

However, the initial rebase that occurred at 7am UTC today added approximately $500k worth of yCRV to the YAM treasury.

If governance is unable to submit a bug-fix proposal prior to the second rebase, no further governance actions will be possible as so many YAM will be held in the reserve that it will be impossible for any proposals to reach quorum. If this happens, the YAM treasury will become ungovernable and these funds will be lost.

The next rebase at 8am UTC tomorrow (Thursday, August 13th) will result in an oversupply of YAM into the reserve. However, quorum for passing a proposal is determined at the time the proposal is submitted. As long as we initiate a proposal prior to the second rebase, there is an opportunity to successfully modify the contracts to fix the bug and allow the YAM experiment to continue.

We need ~1,600,000 YAM (160,000 pre-rebase YAM) delegated via yam.finance by 7am UTC on Thursday (less than 7 hours from the time this post was published).

After the proposal has been submitted, users are able to transfer or deposit their YAM back into the staking pool AS LONG AS THE DELEGATED VOTING POWER NEVER DROPS BELOW 400,000 YAM (40,000 pre-rebase YAM) at any point during the three-day voting window.

While it is possible to delegate to yourself and then vote, we strongly urge everyone to delegate via the UI on yam.finance in order to minimize complications. After we have dealt with this bug, you can re-delegate your votes to yourself or any other address at any time.

There is an opportunity cost to leaving YAMS in your wallet for three days. We believe tokenholders will grant lost rewards + a bonus to those who acted to save the system, as determined by on-chain data snapshots. The team that created YAM will strongly advocate the community to do this.

The Proposed Solution

[Updated 1:23am UTC, August 13th, 2020]

The proposed solution is two-fold:

  1. Pause rebasing functionality to halt unintended minting
  2. Transfer control to a more nimble governance contract

This approach will stop the buggy functionality, provide time for a more complete solution, and enable that solutionā€™s timely implementation.

The new temporary governance contract has been deployed to mainnet and can be viewed here: https://etherscan.io/address/0xd87c869f4672363eF2367bb817b086A25735626B. Its functionality has been tested with tooling graciously provided by Compound, but is unaudited. The modified parameters of the new governance contract follow:

  • Hardcoded proposal threshold to (10,000 unscaled YAM)
  • Hardcoded quorum to 1% of initial YAM supply (35,000 unscaled YAM)
  • Decreased voting period to 8 hours

Once this stop-gap is in place, the longer-term solution will involve fixing the supply schedule back to the initially intended parameters and granting lost rewards + a bonus to those who acted to save the system.

--

--