DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

No incentives to be the first user to operate when a new epoch has started

Summary

No incentives to be the first user to operate when a new epoch has started

Vulnerability Details

Whenever a user is to stake tokens, unstake tokens or claim tokens, the _checkEpochRollover() function is called via the checkEpochRollover modifier. This functions checks if a new epoch has started and updates some global state variables in that case, which means that only one user needs to do it. As it is logic, updating multiple variables in the storage involves higher gas fees to be paid, what will discourage every user to be the first user to operate in a new epoch.

Impact

Users are incentivized not to be the first one to operate when a new epoch comes into play (due to higher gas fees required), what could make the protocol not to work as intended.

Tools Used

Manual review

Recommendations

There is no clear way of solving this issue, but a logic one could be giving some tokens to the first user operating in a new epoch. This way everything changes: users are incentivized to be the first one to operate and help the protocol keep its normal activity.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.