typecasting price returned by chainlink to uint256 could possibly underflow
The price
value returned by the chainlink oracles is a signed integer and therefore in an unlikely however possible scenario could return a negative value which would underflow when cast to a uin256 in the following function
it is recommended to check for such a case to reduce impact in case of an attack on chainlink. assuming that this does in fact happen it could result in users being able to mint and use marginally more tokens than they should otherwise be able to while not being able to be liquidated.
it would also stop others from minting any more tokens as the total supply might reach to or close to the max number allowed by uint256 and so any new minting would be reverted.
Given the likelihood of this happening is low, the impact is MEDIUM.
Manual Review
consider checking whether the value of the price
variable is below zero or not and revert if so.
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.