The DSCEngine contract defines the getTokenAmountFromUsd function, which
implement a division. however, the division by 0
check is missing, which will cause an error if encountered.
the division by zero may happen if the price provided by the pricefeed is 0;
the division will cause a runtime exception, and the transaction that triggered the division by zero will be reverted.-> transaction will fail & any changes made to the state of the contract during the transaction will be rolled back.
Manual Review
It is recommended to implement a validation mechanism, which will make
sure that division by 0 scenarios are handled properly.
Consider adding a second price feed oracle.
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.