By hardcoding PRECISION = 18
, the protocol assume all tokens have 18 decimals places, this could create a denial of service for tokens that have different of amount decimals.
If a user deposits 1 WBTC (1e8), the USD value for this collateral is 0.0000001 dollars, which doesn't represent the actual market value of WBTC.
Due to this low amount of USD value, the health factor for this user is 0.00000005, which will not allow the user to use DSCEngine::mintDsc
or DSCEngine::depositCollateralAndMintDsc
to mint tokens.
Manual verification.
Don't hardcode the precision, instead dynamically query the token contracts for the amount of decimals to properly handle the precision.
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.