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 1, 2023. It is now read-only.
sherlock-admin opened this issue
Mar 27, 2023
· 0 comments
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
Carousel vaults without any deposits will lose emissions
Summary
Carousels that have emissions that end as null events, will cause one/both side(s) to lose emissions tokens.
Vulnerability Detail
When a Carousel is created, it can have emissions added to the epoch. Currently, when the epoch ends (with/out a depeg event), the depositors can claim their share of emissions. However, when there are no depositors for that epoch, emissions cannot be claimed. This is resolved as a null epoch. No one will have the epoch's tokens to burn and claim the emissions (done within withdraw()).
Impact
This is high impact because emission tokens will be lost in null epoch. Currently, there is no way to recover unclaimed tokens.
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
ltyu
high
Carousel vaults without any deposits will lose emissions
Summary
Carousels that have emissions that end as null events, will cause one/both side(s) to lose emissions tokens.
Vulnerability Detail
When a Carousel is created, it can have emissions added to the epoch. Currently, when the epoch ends (with/out a depeg event), the depositors can claim their share of emissions. However, when there are no depositors for that epoch, emissions cannot be claimed. This is resolved as a null epoch. No one will have the epoch's tokens to burn and claim the emissions (done within
withdraw()
).Impact
This is high impact because emission tokens will be lost in null epoch. Currently, there is no way to recover unclaimed tokens.
Code Snippet
Emission tokens are added:
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/CarouselFactory.sol#L132-L153
Emission tokens are calculated upon
withdraw()
. If there is a null epoch, no one will have that epoch's tokens, burns willrevert
, and thus emissions cannot be claimed:https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L154-L157
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L630-L636
Tool used
Manual Review
Recommendation
Consider allowing emissions to be reclaimed by treasury, or possibly, rolled over to another epoch.
Duplicate of #122
The text was updated successfully, but these errors were encountered: