Attacker will DoS `LidoVault` up to 36 days which will ruin expected apr for all parties involved
The LidoVault contract allows anyone to trigger a withdrawal request by transferring as little as 100 wei of stETH, which can force the protocol into Lido's bunker mode and lock all funds for up to 36 days. This denial-of-service attack prevents fixed and variable depositors from withdrawing and earning expected interest.
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2024-08-saffron-finance-judging/issues/105
Found by
0x73696d616f
Summary
The parameters of each LidoVault are tuned such that fixed depositors get an upfront premium and variable depositors in return get all the yield produxed by the fixed depositors' deposits.
However, the protocol does not account for the fact that Lido may be DoSed for up to 36 days if it enters bunker mode. Assuming the return is 4% a year, users are losing approximately 4 * 36 / 365 == 0.4 %, which goes against the intended returns of the protocol.
Additionally, an attacker may forcefully trigger this by transferring only up to 100 wei of steth, which will make the protocol request an withdrawal and be on hold for 36 days.
The protocol should allow users to withdraw by swapping or similar, taking a much lower amount such as 0.12%, described here.
Root Cause
In LidoVault:712, anyone may transfer just 100 wei of steth and DoS the protocol, so fixed, variable and the owner can not withdraw their funds for up to 36 days.
Internal pre-conditions
None.
External pre-conditions
Lido enters bunker mode, which is in scope as it happens when a mass slashing event happens, which is in scope
The Lido Liquid Staking protocol can experience slashing incidents (such as this https://blog.lido.fi/post-mortem-launchnodes-slashing-incident/). These incidents will decrease income from deposits to the Lido Liquid Staking protocol and could decrease the stETH balance. The contract must be operational after it
Attack Path
- Vault has already requested all withdrawals, but they have not yet been claimed, so funds are in the protocol but it does not hold stEth anymore.
- Attacker transfers 100 wei of steth, triggering the request of this 100 steth.
- All funds are DoSed for 36 days.
Impact
36 days DoS, which means the protocol can not get the expected interest rate calculated.
PoC
Look at the function LidoVault::vaultEndedWithdraw() for confirmation.
Mitigation
Firstly, an attacker should not be able to transfer 100 wei of steth and initiate a request because of this. The threshold should be computed based on an estimated earnings left to withdraw for variable depositors and fixed depositors that have not claimed, not just 100.
Secondly, it would be best if there was an alternative way to withdraw in case requests are taking too much.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/saffron-finance/lido-fiv/pull/30
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The vault initiates a withdrawal request whenever it receives any stETH, with no minimum threshold, allowing an attacker to force a withdrawal with a tiny amount.
Impact
The protocol suffers a 36-day denial of service, preventing users from withdrawing funds and earning the expected interest rate.
What the attacker needed
Lido is in bunker mode; Vault has already requested all withdrawals; Attacker can transfer 100 wei of stETH
The fix
The protocol team fixed this issue by changing the threshold for initiating a withdrawal request and possibly adding an alternative withdrawal method.
How it was found
- The vault has already requested all withdrawals but they have not been claimed, so it holds no stETH.
- The attacker transfers 100 wei of stETH to the vault, triggering a withdrawal request for that amount.
- All funds are locked for 36 days due to Lido's bunker mode.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A vault is a smart contract that holds users' cryptocurrency. The attack works because the vault automatically starts a withdrawal from Lido (a staking service) when it receives even a tiny amount of stETH. If Lido is in a slow mode called 'bunker', that withdrawal can take 36 days, during which nobody can get their money out.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.