In the unlikely event that the price of an asset reaches zero, there is no way to liquidate the position, because the getTokenAmountFromUsd
function will revert.
The usage of off-chain oracle prices in DSCEngine.sol
that can lead to a possible division by zero (an exception that will result in a reverted transaction):
Positions won't be liquidatable, at an extremely critical moment that they should be liquidatable. Losses and fees will grow and DSC system will become insolvent.
Manual review
Provide a mechanism for positions to be liquidated even if the price reaches zero or goes negative.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.