Closed sherlock-admin2 closed 7 months ago
2 comment(s) were left on this issue during the judging contest.
takarez commented:
invalid
takarez commented:
invalid
Invalid based on sherlock admin breaking assumptions rule, see point 5.3
5.3 Pausing a collateral causes some users to be unfairly liquidated or any other action causing loss of funds. This is not considered a valid issue.
xiaoming90
medium
Positions are immediately liquidated after protocol resumes
Summary
Long traders whose positions become liquidatable during a pause will not be able to top up their margin to save their position or avoid liquidation. As a result, their positions are immediately liquidated after protocol resumes.
Vulnerability Detail
When the protocol is paused, the long traders will not be able to top up their positions if they are on the verge of falling below the liquidation margin. During the period when the protocol is paused, market fluctuation continues to happen and the price of the rETH might drop, leading to a loss to the long trader's positions. Some of the long positions will inevitably cross the liquidation margin and become liquidable.
As soon as the protocol is unpaused, these long traders' positions will be immediately liquidated by the keeper bots, with the only possibility to save their position being if the long traders front-running the keeper bots.
This situation unfairly disadvantages long traders as they became subject to liquidation through no fault of their own. Upon resuming the protocol, long traders will be immediately liquidated, unfairly disadvantaging the long traders and giving a huge advantage to the Liquidator.
https://github.com/sherlock-audit/2023-12-flatmoney/blob/main/flatcoin-v1/src/LiquidationModule.sol#L85
Impact
Long traders whose positions become liquidatable during a pause will not be able to top up their margin to save their position or avoid liquidation.
Code Snippet
https://github.com/sherlock-audit/2023-12-flatmoney/blob/main/flatcoin-v1/src/LiquidationModule.sol#L85
Tool used
Manual Review
Recommendation
To fix the game theory such that neither Long Traders nor Liquidators are unfairly favored after the protocol is resumed, there should be a grace period during which long traders cannot be liquidated. This grace period could be equal to the period that protocol was paused with a hard cap of a maximum number of hours, which provides even fairness to both long traders and liquidators.
Reference