The _get_token_amount_from_usd
function is designed to convert a specified USD amount into the corresponding amount of a given token, using the latest price data from an oracle. There is PRECISION
constant value only for WETH but not for WBTC.
In code there is not implementation for PRECISON
for the WBTC.
Is only value for WETH = 10^18 but not for WBTC = 10^8.
For WBTC tokens, the amount will be incorrectly inflated by 101010^{10} times the actual value. The protocol will be compromised, creating the potential for funds to be drained.
manual review
Please add PRECISION
value also for WBTC.
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.