In the function getOraclePrice()
price
is forcefully being converted to uint which will cause the price to highly inflate. As stated in the docs DittoETH can support pegged assets for fiat currencies, cryptocurrencies (long and short) and commodities. In order for users to issue pegged assets
so lets take a condition that the price from the chainlink is negative which can actually happen as you can see from this issue so if the price is negative then forced conversion of the int price to uint
will cause highly inflated price.
Here is the POC
And here is the result
uint256: 115792089237316195423570985008687907853269984665640564039457584007913129294258
As you can see that the price is highly inflated
Wrong price can highly effect the protocol and will cause
There is a reason why chainlink prices are in int
type so don't explicitly convert int
type to uint
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.