GithubHelp home page GithubHelp logo

bughuntoor - If the multiple calls to `writeStakingRewards` cross a week's end, it will result in unfair distribution of rewards about 2023-11-convergence-judging HOT 9 CLOSED

sherlock-admin2 avatar sherlock-admin2 commented on July 26, 2024
bughuntoor - If the multiple calls to `writeStakingRewards` cross a week's end, it will result in unfair distribution of rewards

from 2023-11-convergence-judging.

Comments (9)

IAm0x52 avatar IAm0x52 commented on July 26, 2024 1

Escalate.

This should be a dupe of #178, since it is the same root cause of CVG cycles length drift.

It also requires that at least 7 days has passed since this update to roll the cycle forward in [L205](https://github.com/sherlock-audit/2023-11-convergence/blob/main/sherlock-cvg/contracts/Rewards/CvgRewards.sol#L205). The result is that the cycle can never be exactly 7 days long and the start/end of the cycle will constantly fluctuate.

#178 (quoted above) describes the result of these longer cycles on LockingPositionService and this issue outlines the impact it has on gauge rewards.

Note: since the requirement on calling checkpoint is that at least 7 days have passed since the last distribution, it would mean that the delta of the checkpoint and the end of the week will gradually decrease every week

This issue describes the exact same root cause behavior of cycles that are too long. Ultimately the root issue is the same and these should be considered dupes.

from 2023-11-convergence-judging.

walk-on-me avatar walk-on-me commented on July 26, 2024

Hello,

Thanks a lot for your attention.

After a deep review of the issues, we have to consider all of your issues as valid.

We indeed noticed that if we don't synchronize our CvgCycle with the WEEKS, we could have some issues of desynchronization in the long term if the CVG cycle is not triggered immediatly after 1 week.

For example :

  • #10 && #193, mention that if the distribution of $CVG occurs just before a WEEK and finished just after, some gauges will have less CVG distributed.
  • #14, mention that some user can get some free mgCVG for 1 WEEK less than other users
  • #101, mention that in the last cycle of a lock, an user cannot extend his lock during the time between the last WEEK and the nextCvgCycle.
  • #136 && #215, mention that in the last cycle of a lock, an user is locked for 1 more cycle than he planned
  • #178 , mention that extending a lock can be impossible
  • #59 , mention that during the mint of a position, the lock is done for one extra cycle on the veCVG

We are going to implement the solution for all of these issues that is to round our CVGCycle on the WEEK like veCVG is doing.
Regards,
Convergence Team

from 2023-11-convergence-judging.

sherlock-admin2 avatar sherlock-admin2 commented on July 26, 2024

Escalate.

This should be a dupe of #178, since it is the same root cause of CVG cycles length drift.

It also requires that at least 7 days has passed since this update to roll the cycle forward in [L205](https://github.com/sherlock-audit/2023-11-convergence/blob/main/sherlock-cvg/contracts/Rewards/CvgRewards.sol#L205). The result is that the cycle can never be exactly 7 days long and the start/end of the cycle will constantly fluctuate.

#178 (quoted above) describes the result of these longer cycles on LockingPositionService and this issue outlines the impact it has on gauge rewards.

Note: since the requirement on calling checkpoint is that at least 7 days have passed since the last distribution, it would mean that the delta of the checkpoint and the end of the week will gradually decrease every week

This issue describes the exact same root cause behavior of cycles that are too long. Ultimately the root issue is the same and these should be considered dupes.

You've created a valid escalation!

To remove the escalation from consideration: Delete your comment.

You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.

from 2023-11-convergence-judging.

nevillehuang avatar nevillehuang commented on July 26, 2024

@IAm0x52 agree, should be duplicate of #178, given also, the fix implemented for all this issues are the same indicated by sponsor.

from 2023-11-convergence-judging.

10xhash avatar 10xhash commented on July 26, 2024

there are scenarios possible where even if week/cvgCycle is synced the rewards distribution issue can occur although at low likelihood ( see #193 )

from 2023-11-convergence-judging.

Czar102 avatar Czar102 commented on July 26, 2024

Planning to make it a duplicate according to the escalation.

from 2023-11-convergence-judging.

Czar102 avatar Czar102 commented on July 26, 2024

Result:
Medium
Duplicate of #178

from 2023-11-convergence-judging.

sherlock-admin2 avatar sherlock-admin2 commented on July 26, 2024

Escalations have been resolved successfully!

Escalation status:

from 2023-11-convergence-judging.

IAm0x52 avatar IAm0x52 commented on July 26, 2024

Same root cause and fix as #178

from 2023-11-convergence-judging.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.