borrowers cannot be liquidated because of cooldownExpiration #654
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-312
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/staking/StakingRewards.sol#L57-L140
Vulnerability details
Impact
borrowers cannot be liquidated because of cooldownExpiration
Proof of Concept
Step1: Alice adds some liquidity in WETH/WBTC pool as collateral by calling depositCollateralAndIncreaseShare().
Step2: Alice borrows some USDS via collateral added in step 1.
Step3: BTC/ETH price drops down and Alice's account can be liquidated.
Step4: Bob tries to liquidate Alice's account by liquidateUser(). In function liquidateUser(), we try to decrease Alice's share, which can fail, because block.timestamp is less than cooldownExpiration.
We cannot liquidate unhealthy accounts timely.
Tools Used
Manual
Recommended Mitigation Steps
Assessed type
DoS
The text was updated successfully, but these errors were encountered: