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
strict equality check in LidoVault::deposit function prevents vault from starting.
Summary
The LidoVault::deposit function has a condition where strict equality check, which prevents the vault from starting.
Vulnerability Detail
In LidoVault.sol:382 and LidoVault.sol:383 lines uses strict equality checks
let us assume fixedSideCapacity is 1000 ether.
users started depositing their ETH in this contract.
If fixedETHDepositTokenTotalSupply becomes 999.999 eth
Now user has to deposit 0.001 eth in order to satisfy these conditions fixedETHDepositTokenTotalSupply == fixedSideCapacity && variableBearerTokenTotalSupply == variableSideCapacity.
But he can't deposit 0.001 eth because minimumDepositAmount is 0.01 eth.
So, the strict equality conditions fails and prevents the vault from starting.
The text was updated successfully, but these errors were encountered:
sherlock-admin4
changed the title
Swift Rouge Grasshopper - strict equality check in LidoVault::deposit function prevents vault from starting.
vizay9652 - strict equality check in LidoVault::deposit function prevents vault from starting.
Sep 30, 2024
vizay9652
Medium
strict equality check in
LidoVault::deposit
function prevents vault from starting.Summary
The
LidoVault::deposit
function has a condition wherestrict equality
check, which prevents the vault from starting.Vulnerability Detail
In
LidoVault.sol:382
andLidoVault.sol:383
lines uses strict equality checksfixedSideCapacity
is 1000 ether.fixedETHDepositTokenTotalSupply
becomes 999.999 ethfixedETHDepositTokenTotalSupply == fixedSideCapacity && variableBearerTokenTotalSupply == variableSideCapacity
.minimumDepositAmount
is0.01 eth
.Code Snippet
https://github.com/sherlock-audit/2024-08-saffron-finance/blob/main/lido-fiv/contracts/LidoVault.sol#L382-L383
Tool used
Manual Review
Recommendation
use tolerance
The text was updated successfully, but these errors were encountered: