YIP-107: Vesting Pool Sunset, Migration, and Mint

Vesting Contract Issues and Issuance

This document has 2 functions. It will discuss the status and problems with the current Contributor Vesting Contract and will propose a short term solution to mitigate them and provide stopgap funding while a longer term solution is developed.

Part 1: Problems with the Contributor Vesting Contract

The contributor vesting pool contract was created in December of 2020 as the main contract from which to pay contributors YAM tokens for work done. It was funded with 2M YAM (800K BoU) around that time (I cannot find the snapshot vote or forum post confirming this). You can read early discussion about the pool creation and intent of the funds here.

The way this contract works, is that all disbursements from it require a vesting period to be set and the YAM is then streamed to the recipient. They can claim the YAM that has “vested” from the stream at any point. The only way to remove YAM from this contract is to create a transaction to stream it. This is how the DAO has paid contributors in YAM. YAM can be paid out immediately, but it requires setting a stream length of 0.

So what is the problem? It seems there is an internal accounting error within the contract itself. As you can see from the contract link, there are currently approximately 664,000 YAM in the contract. But some of the YAM in the contract is “earmarked” by streams that are currently vesting and have not been claimed by their recipients. Here is where the problem comes in.

If you go through all the streams that the contract is currently paying about and add them all up, they should equal about 323,000 YAM that can be claimed from current streams. This would leave around 340,000 YAM still available to be paid out to contributors. The true number is probably higher since some streams are longer than they should be and will be closed before they finish (don’t ask me why, I didn’t do it that way).

Now to the problem. There is a function in the contract called totalUnclaimedInStreams which you can query here (it is the 7th function). This function is supposed to calculate the amount of YAM that is earmarked to be paid out from streams, and is used as a check to determine how much YAM is available to be paid out in new streams. Right now this function returns 263352110180119369750267771596, which when converted to normal decimals and scaled (divide by 10^24 and multiply by 2.5) is 658380. The contract says that 658,380 of the ~664,000 YAM within it are accounted for. This is a discrepancy of ~320K YAM. Because the number calculated in totalUnclaimedInStreamsis what is used to check if streams can be opened, for the time being we cannot open any new streams.

So either the contract is miscalculating this number, or the information that we have about the current streams is wrong. Since we are querying the contract directly, it seems unlikely we are adding things up wrong. And based on how the contract is written, it seems impossible to verify this without closing all the streams and seeing what we are left with.


That was all probably a bit hard to follow, so let me summarize:

  • There is a discrepancy between what we think the vesting contract should have available to pay out and what it is saying should be paid out.
  • We can’t open any new streams because of this.
  • closing all streams should tell us whether there is an error with our data or with the contract logic.
    • If there is an error with our data then the contract is correct, but we are out of YAM to pay contributors.
    • If there is an error with the contract then it is likely that around 340,000 YAM is locked in the contract, and we are still out of YAM to pay contributors.

Part 2: Proposed solution

Here is our proposed plan:

In the next on-chain transaction transaction (April)

  1. We have already voted to remove the vesting portion of contributor pay for the time being, so our first step will be to close all open streams in the next on chain transaction. We were going to do this anyway.
  2. In creating this code, it should be possible to simulate what the vesting contract is going to end up with and how much is available to send out of the contract. We will then send all the available YAM from the vesting contract to the treasury. This YAM will continue to be used to pay contributors.

In the following on-chain transaction (May)

  1. What is remaining should be considered lost as the contract will not allow it to be removed. To make up for this, we propose minting exactly that amount (TBD based on simulations) and holding it in the treasury to pay contributors.

This proposal will not add to the circulating supply of YAM and the process will be clearly documented to provide transparency into the process.

This is a short term solution to solve this specific problem. Even doing this, there will not be very much YAM available to pay contributors (a few months at most). In the next few months, as part of the ongoing work to upgrade YAM, I, along with other contributors will work with the wider community to develop a plan for longer term issuance and funding for the DAO.

More details, including further specifications will be added as they become available.

In the mean time I will add some votes to get a temperature check on the minting portion, since that is the only part of this that hasn’t been approved in YIP-101

After closing the Vesting Pool contract, should the DAO mint YAM to match what is locked in the contract?
  • YES
  • NO

0 voters

To move this post forward, i dont think it fits as is as the context is before the previous onchain proposal so the current numbers are different to the time it was mentioned at comparing to what we have now, i will be adding below the last updated numbers values as of today and details for potential use into the snapshot proposal.

Updated numbers values:

  • balanceOf of the vesting pool contract:
    150476226907512840316258432832 (376389 YAM / 150476 BoU YAM)
  • totalUnclaimedInStreams of the vesting pool contract:
    148389944799913678899599751974 (370975 YAM / 148389 BoU YAM)

Passing proposal successfully would result with:

  1. Transferring from the vesting pool contract to the treasury 5215 YAM (2086 BoU).
  2. Minting whats left in the vesting pool contract (subtracting the 5215 YAM), mint 370975 YAM (148390 BoU).