Setting a new vesting factor with setVestingFactor
will change all unclaimed yield.
Although setVestingFactor
is intended as a "just in case" function for major changes, it is still a high priority for the audit. Calling this function will change the vesting factor but will only set lastMintTimestamp
if its value was 0 before.
The issue is that any unclaimed yield will change with the vesting factor. Yield is calculated based on the last claimed time and the current vesting factor.
Example:
The vesting factor distributes 0.96% per week (set for 2 years).
After 3 months, setVestingFactor
is called, changing the distribution to 1 year (1.92% per week).
Yield was not claimed in 1 week due to inactivity or not reaching MINIMUM_MINT
.
After the change, the new unclaimed yield instantly doubles from 0.96% to 1.92% as the distribution period shortens.
In the above example, changing the vesting factor without minting first will instantly double our yield. In simple terms it will make the generated yield time
claim at a higher rate
There could be a loss or gain for users and the protocol, depending on whether the factor increases or decreases.
Manual review
Check if _canDistribute
is true and call mint before changing the vesting factor. This will also set lastMintTimestamp
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.