Closed sherlock-admin3 closed 3 months ago
While this is valid and we will fix it, it's also not clear that this can be used as an attack vector. Vault shares cannot be shorted so manipulating the price up does not create an obvious way for an attacker to profit.
Escalate, It is an informational finding that does not show an a clear attack. It falls into the future issues category of sherlock docs.
Escalate, It is an informational finding that does not show an a clear attack. It falls into the future issues category of sherlock docs.
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.
The report itself says that it opens up an attack vector for the future. Moreover, I don't see how this issue causes the loss of funds or qualifies for Med severity.
Planning to accept the escalation and invalidate the issue.
The report itself says that it opens up an attack vector for the future. Moreover, I don't see how this issue causes the loss of funds or qualifies for Med severity.
Planning to accept the escalation and leave the issue as it is.
Maybe my understanding is incorrect. If I am wrong, please correct me. Planning to accept the escalation——means not leaving the issue as it is, means the issue is a low/info issue.
@0502lian thank you, you’re correct
Result: Invalid Unique
The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/leveraged-vaults/pull/105
The Lead Senior Watson signed off on the fix.
xiaoming90
Medium
Value of vault shares can be manipulated
Summary
The value of vault shares can be manipulated. Inflating the value of vault shares is often the precursor of more complex attacks. Internal (Notional-side) or external protocols that integrate with the vault shares might be susceptible to potential attacks in the future that exploit this issue.
Vulnerability Detail
It was found that the value of the vault shares can be manipulated.
Instance 1 - Kelp
To increase the value of vault share, malicious can directly transfer a large number of stETH to their
KelpCooldownHolder
contract. In Line 78, the holder contract will determine the number of stETH to be withdrawn from LIDO viaIERC20(stETH).balanceOf(address(this))
. This means that all the stETH tokens residing on the holder contract, including the ones that are maliciously transferred in, will be withdrawn from LIDO.https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Kelp.sol#L78
When determining the value of vault share of a user, the
convertStrategyToUnderlying
function will be called, which internally calls_getValueOfWithdrawRequest
function.The
withdrawsStatus[0].amountOfStETH
at Line 126 will be inflated as the amount will include the stETH attackers maliciously transferred earlier. As a result, the vault share will be inflated.https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Kelp.sol#L126
Instance 2 - Ethena
Etherna vault is vulnerable to similar issue due to the due of
.balanceOf
at Line 37 below.Before starting the cooldown, malicious user can directly transfer in a large number of sUSDe to the
EthenaCooldownHolder
holder contract.https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Ethena.sol#L37
Thus, when code in Lines 87 and 99 are executed, the
userCooldown.underlyingAmount
returns will be large, which inflates the value of the vault shares.https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Ethena.sol#L77
Impact
Inflating the value of vault shares is often the precursor of more complex attacks. Internal (Notional-side) or external protocols that integrate with the vault shares might be susceptible to potential attacks in the future that exploit this issue.
Code Snippet
https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Kelp.sol#L78
https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Kelp.sol#L126
https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Ethena.sol#L37
https://github.com/sherlock-audit/2024-06-leveraged-vaults/blob/main/leveraged-vaults-private/contracts/vaults/staking/protocols/Ethena.sol#L77
Tool used
Manual Review
Recommendation
Instance 1 - Kelp
Consider using the before and after balances to determine the actual number of stETH obtained after the execution of
WithdrawManager.completeWithdrawal
function to guard against potential donation attacks.Instance 2 - Ethena
Pass in the actual amount of sUSDe that needs to be withdrawn instead of using the
balanceOf
.