-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Description:
A logic flaw in the epoch and locking mechanism can cause deposited rewards to be permanently locked and unclaimable in two scenarios:
-
Initial Epoch Issue: Rewards deposited via
depositReward()during epoch0are stored inepochReward[0]. However, thelock()function always begins locking fromcurrentEpoch() + 1(epoch1). Consequently, rewards for epoch0have no corresponding lock positions and are irretrievable. -
Empty Previous Epoch Issue: For any epoch
n, if there are zero active lockers from the previous epoch (n-1), then rewards deposited for epochnwill also be unclaimable, as there is no eligible stake to distribute them to.
Recommendation:
- Prevent
depositReward()from being called in epoch0. - Add a validation check to ensure there is existing eligible stake (
lockersfrom epochn-1) before accepting rewards for epochn.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels