The conversions between collateral amount and USD doesn't take care of the decimals of the collateral token. This leads to incorrect value associated with the collateral making some collateral worth more and some worth less thereby breaking the value of the coin.
The conversions between collateral amount and USD doesn't handle the different decimals associated with each collateral.
WETH has 18 decimals while WBTC has 8 decimals on Ethereum.
A user who deposits a collateral with lower number of decimals can only mint fewer tokens compared to a user who deposits a collateral with higher number of decimals even if both tokens amount to the same value. This will break the model of the system where it is assumed that the stablecoin tokens can be minted according to the underlying USD value of the collateral.
Manual Review
Factor in the decimals of the collateral by replacing collateral amount with
(collateral_amount * 10e18) / (10**collateral_decimals)
Eg:
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.