-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
What's the issue?
Rewards should be unlocked when the target bondedRatio is reached OR 6 months has passed.
Current Implementation
This function checks if the cap date has reached, if yes it checks if 6 months has passed from the last time the capReachedDate has been updated (which can also be updated if the current bonded ratio falls below the target bonded ratio and gets back up again. So this means rewards are not unlock after 6 months from mainnet start, but 6 months after the last capReachedDate update.
function rewardsAllowed() public view returns (bool) {
if (capReachedDate == 0) {
return false;
}
return block.timestamp >= unbondingUnlockPeriod() + capReachedDate;
}
New implementation
So I'd suggest the following changes:
function rewardsAllowed() public view returns (bool) {
if (capReachedDate != 0) {
return true;
}
return block.timestamp >= unbondingStartDate() + unbondingUnlockPeriod();
}
This, in combination with the issue described in #10 will lead to a reward unlock that is far off of what was communicated to the community.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels