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` labelHighA valid High severity issueRewardA payout will be made for this issue
Consider the following scenario, where the relayerFee == 0.
alice deposits 10 asset in epoch A, minted as 10 share, alice calls enlistInRollover to add to the rollover queue.
In epoch B, alice profits 1 asset, while in mintRollovers, it burns alice's 10 shares, and mint 10 shares for alice.
Actually, it should mint shares for alice's profits, i.e., it should mint 11 shares.
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` labelHighA valid High severity issueRewardA payout will be made for this issue
cccz
high
Carousel.mintRollovers will mint less shares to users, resulting in the loss of users' assets
Summary
Carousel.mintRollovers does not mint the user's profits from the last epoch as shares
Vulnerability Detail
When minting shares for users in Carousel.mintRollovers, it does not take into account the user's profit portion.
Consider the following scenario, where the relayerFee == 0.
alice deposits 10 asset in epoch A, minted as 10 share, alice calls enlistInRollover to add to the rollover queue.
In epoch B, alice profits 1 asset, while in mintRollovers, it burns alice's 10 shares, and mint 10 shares for alice.
Actually, it should mint shares for alice's profits, i.e., it should mint 11 shares.
Impact
The user loses his profit.
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L361-L437
Tool used
Manual Review
Recommendation
Change to
Duplicate of #163
The text was updated successfully, but these errors were encountered: