Kelp vault allows staking of amounts that will be less than minimum required to be redeemable
Summary
When Kelp::_startCooldown() calls WithdrawManager.initiateWithdrawal to initiate a withdrawal from Kelp, a check is made on the balance amount that is passed to ensure it is over the minimum withdrawal amount. However during the staking process there is no check to ensure that the final staked amount exceeds this minimum amount, meaning it is possible for users to stake a number of assets that will not be able to be withdrawn.
However this amount could be increased in the future, which would increase the locked funds amount.
Impact
The Kelp staking flow contains no checks to ensure that the amount being staked by a user will be withdrawable by being larger than the minimum that is enforced in Kelp during withdraw. This can lead to a user's stake being unwithdrawable and those funds being locked until more funds are added. While the current amount is worth around $0.5, with Ether price increases or the minimum increasing this issue's impact will increase.
BiasedMerc
Medium
Kelp vault allows staking of amounts that will be less than minimum required to be redeemable
Summary
When
Kelp::_startCooldown()
callsWithdrawManager.initiateWithdrawal
to initiate a withdrawal from Kelp, a check is made on thebalance
amount that is passed to ensure it is over the minimum withdrawal amount. However during the staking process there is no check to ensure that the final staked amount exceeds this minimum amount, meaning it is possible for users to stake a number of assets that will not be able to be withdrawn.Vulnerability Detail
Kelp::_startCooldown()
When a user wants to initiate a withdrawal from Kelp,
WithdrawManager.initiateWithdrawal
will be called: WithdrawManager.initiateWithdrawalThe passed amount needs to be larger than the
minRsEthAmountToWithdraw
for the passed asset. ForstETH
this minimum share amount is:However this amount could be increased in the future, which would increase the locked funds amount.
Impact
The Kelp staking flow contains no checks to ensure that the amount being staked by a user will be withdrawable by being larger than the minimum that is enforced in Kelp during withdraw. This can lead to a user's stake being unwithdrawable and those funds being locked until more funds are added. While the current amount is worth around $0.5, with Ether price increases or the minimum increasing this issue's impact will increase.
Code Snippet
Kelp::_startCooldown() WithdrawManager.initiateWithdrawal
Tool used
Manual Review
Recommendation
Ensure that the amount of of RsETH that is staked is above the minimum withdrawal amount, to ensure that user's funds are not locked/ unwithdrawable.