Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borrowers cannot be liquidated because of cooldownExpiration #654

Closed
c4-bot-8 opened this issue Jan 30, 2024 · 2 comments
Closed

borrowers cannot be liquidated because of cooldownExpiration #654

c4-bot-8 opened this issue Jan 30, 2024 · 2 comments
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

Comments

@c4-bot-8
Copy link
Contributor

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

@c4-bot-8 c4-bot-8 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Jan 30, 2024
c4-bot-5 added a commit that referenced this issue Jan 30, 2024
@c4-judge
Copy link
Contributor

c4-judge commented Feb 2, 2024

Picodes marked the issue as duplicate of #312

@c4-judge c4-judge closed this as completed Feb 2, 2024
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Feb 17, 2024
@c4-judge
Copy link
Contributor

Picodes marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants