Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Ocean_Sky - If Price falls to zero, liquidations will be frozen #402

Closed
sherlock-admin opened this issue Jun 11, 2023 · 0 comments
Closed
Labels
Non-Reward This issue will not receive a payout

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Jun 11, 2023

Ocean_Sky

medium

If Price falls to zero, liquidations will be frozen

Summary

Liquidation function won't work if the price falls to zero.

Vulnerability Detail

Zero is unacceptable value when retrieving price from chainlink oracle. So if the price falls to zero, the liquidation process won't be triggered or simply "frozen" (all calls will revert). If this happens, collateral assets won't be liquidated and the protocol will be insolvent.

Similar case issues:
sherlock-audit/2023-02-blueberry-judging#161
sherlock-audit/2023-02-gmx-judging#156

Impact

Liquidations may not be possible at a time when the protocol needs them most. As a result, the value of user's asset may fall below their debts, turning off any liquidation incentive and pushing the protocol into insolvency.

Code Snippet

https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/oracle/PriceOracle.sol#L60-#L72
https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/pool/IronBank.sol#L1065-#L1092

Tool used

Manual Review

Recommendation

Provide safeguard mechanism to avoid this from happening.

Duplicate of #433

@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jun 19, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Jun 25, 2023
@sherlock-admin2 sherlock-admin2 added Non-Reward This issue will not receive a payout and removed Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Reward A payout will be made for this issue labels Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Non-Reward This issue will not receive a payout
Projects
None yet
Development

No branches or pull requests

2 participants