Acrobatic Charcoal Turkey
Medium
Funds can become stuck in the contract due to a lack of validation on the maximum fixedSideCapacity
value.
The README states the following:
Withdrawal is limited because there is a maximum stETH withdrawal amount of 1000 stETH. This means that if a withdrawal exceeds 1000 stETH, it is split into multiple withdrawal requests and placed in these arrays with undefined length. This happens in the function calculateWithdrawals. Given this situation, we have set the fixedSideCapacity to 100,000 ETH. This ensures that any transaction involving withdrawals from the Lido Liquid Staking protocol will be sufficiently sized to fit within a single Ethereum block.
However, there is no restriction within the code to validate that fixedSideCapacity
<= 100,000 ETH.
In the worst-case scenario, this could lead to all the stETH in the contract becoming stuck and unclaimable.
Missing validation in the initialize()
function:
https://github.com/sherlock-audit/2024-08-saffron-finance/blob/main/lido-fiv/contracts/LidoVault.sol#L276-L309
fixedSideCapacity
is set to a value > 100,000 ETH.
- The vault is started with more than 100,000 ETH.
- Users deposit more than 100,000 ETH to the Fixed side.
- The vault operates as expected until the end.
- After the end, when the
withdraw()
function is called, it reverts due to exceeding the block gas limit.
- README requirement violation.
- Loss of funds.
Not needed.
Add a max fixedSideCapacity
value validation to the initialize()
function.