You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
OCE_ZVE.forwardEmissions() will forward freshly deposited balance alongside decayed one
Summary
Freshly pushed funds into OCE_ZVE.sol locker can be prematurely forwarded with currently decaying ones through forwardEmissions()
Vulnerability Detail
forwardEmissions() function catches the current ZVE balance of the OCE_ZVE locker and calls _forwardEmissions where it checks the decay rate and distributes the emissions.
If the function is called right after new funds are pushed into the locker, a portion of the fresh deposit will be immediately sent out despite not having decayed as the rest. It is profitable to wait for decay to accumulate and call the function right after new funds are pushed.
Impact
Unexpected behaviour / Unfair distribution of rewards
1 comment(s) were left on this issue during the judging contest.
panprog commented:
medium, dup of #282. This issue describes slightly different scenario, but the core reason is the same - lack of emission reset, which makes new deposits forward some portion from previous update time, and using forwardEmission to reset it is not always possible, because it requires minimum of 100e18 token to forward.
sherlock-admin2
changed the title
Curved Taffy Trout - OCE_ZVE.forwardEmissions() will forward freshly deposited balance alongside decayed one
AMOW - OCE_ZVE.forwardEmissions() will forward freshly deposited balance alongside decayed one
May 11, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
AMOW
medium
OCE_ZVE.forwardEmissions()
will forward freshly deposited balance alongside decayed oneSummary
Freshly pushed funds into
OCE_ZVE.sol
locker can be prematurely forwarded with currently decaying ones throughforwardEmissions()
Vulnerability Detail
forwardEmissions()
function catches the current ZVE balance of the OCE_ZVE locker and calls_forwardEmissions
where it checks the decay rate and distributes the emissions.If the function is called right after new funds are pushed into the locker, a portion of the fresh deposit will be immediately sent out despite not having decayed as the rest. It is profitable to wait for decay to accumulate and call the function right after new funds are pushed.
Impact
Unexpected behaviour / Unfair distribution of rewards
Code Snippet
Tool used
Manual Review
Recommendation
Implement
forwardEmissions()
call withinpushToLocker()
so lastDistribution counter will reset and start a new decay.Duplicate of #282
The text was updated successfully, but these errors were encountered: