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
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
In Vault.calculateStack() function the ratiosX96Value value is rounded down
Summary
The ratiosX96Value calculations are rounded in a way that is unfavorable to the protocol.
Vulnerability Detail
The ratiosX96Value is used as a denominator for calculations of user withdrawal amounts and, as such, should always be rounded in a way that is favorable to the protocol, in this case, up.
Impact
Withdrawal values will be rounded in favor of the user.
The text was updated successfully, but these errors were encountered:
sherlock-admin3
changed the title
Bitter Jetblack Finch - Consequent transfers of stETH, will result in DoS
In Vault.calculateStack() function the ratiosX96Value value is rounded down
Jun 28, 2024
github-actionsbot
changed the title
In Vault.calculateStack() function the ratiosX96Value value is rounded down
Square Mint Ape - In Vault.calculateStack() function the ratiosX96Value value is rounded down
Jul 6, 2024
sherlock-admin3
changed the title
Square Mint Ape - In Vault.calculateStack() function the ratiosX96Value value is rounded down
eeyore - In Vault.calculateStack() function the ratiosX96Value value is rounded down
Jul 15, 2024
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
eeyore
Medium
In
Vault.calculateStack()
function theratiosX96Value
value is rounded downSummary
The
ratiosX96Value
calculations are rounded in a way that is unfavorable to the protocol.Vulnerability Detail
The
ratiosX96Value
is used as a denominator for calculations of user withdrawal amounts and, as such, should always be rounded in a way that is favorable to the protocol, in this case, up.Impact
Withdrawal values will be rounded in favor of the user.
Code Snippet
https://github.com/sherlock-audit/2024-06-mellow/blob/main/mellow-lrt/src/Vault.sol#L530
https://github.com/sherlock-audit/2024-06-mellow/blob/main/mellow-lrt/src/Vault.sol#L487
https://github.com/sherlock-audit/2024-06-mellow/blob/main/mellow-lrt/src/Vault.sol#L495
Tool used
Manual Review
Recommendation
When calculating
ratiosX96Value
, use rounding up:Duplicate of #61
The text was updated successfully, but these errors were encountered: