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 Nov 24, 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
The adapter checks the staking limit using a closed condition <=, which results in a deposit equal to the minimum deposit being rejected. However, this is not accurate behavior for the integrated protocol.
The minimum deposit amount for a user attempting to deposit into the KelpDAO protocol will always be rejected.
Code Snippet
Tool used
Manual Review
Recommendation
The condition should be changed to an open <.
Additional info:
Medium severity because in the function documentation _stake, it is described that limits should be checked to prevent DoS. Since only the update is audited and not the entire protocol, it is difficult to assess the specific DoS, but it should be assumed that checking the limits should be accurate and consistent with the integrated protocol.
File: napier-uups-adapters/src/adapters/kelp/RsETHAdapter.sol
64: /// @notice Kelp allows ETH, ETHx, stETH or sfrxETH via LRTDepositPool.65: /// @dev Kelp has a limit on the amount of ETH that can be staked.66: /// @dev Need to check the current staking limit before staking to prevent DoS.67: function _stake(uint256stakeAmount) internaloverridereturns (uint256) {
sherlock-admin2
changed the title
Rhythmic Shamrock Eel - Incorrect staking limit check in RsETHAdapter
PNS - Incorrect staking limit check in RsETHAdapterMay 24, 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
PNS
medium
Incorrect staking limit check in
RsETHAdapter
Summary
The adapter checks the staking limit using a closed condition
<=
, which results in a deposit equal to the minimum deposit being rejected. However, this is not accurate behavior for the integrated protocol.Vulnerability Detail
https://github.com/sherlock-audit/2024-05-napier-update/blob/c31af59c6399182fd04b40530d79d98632d2bfa7/napier-uups-adapters/src/adapters/kelp/RsETHAdapter.sol#L77
The issue arises because the integrated protocol considers the minimum deposit as acceptable.
https://github.com/Kelp-DAO/LRT-rsETH/blob/e75e9ef168a7b192abf76869977cd2ac8134849c/contracts/LRTDepositPool.sol#L200C51-L200C69
Impact
The minimum deposit amount for a user attempting to deposit into the KelpDAO protocol will always be rejected.
Code Snippet
Tool used
Manual Review
Recommendation
The condition should be changed to an open
<
.Additional info:
Medium severity because in the function documentation
_stake
, it is described that limits should be checked to prevent DoS. Since only the update is audited and not the entire protocol, it is difficult to assess the specific DoS, but it should be assumed that checking the limits should be accurate and consistent with the integrated protocol.Duplicate of #46
The text was updated successfully, but these errors were encountered: