The buy()
function allows users to purchase ZENO tokens using USDC. However, the function does not account for the difference in decimal precision between ZENO (18 decimals) and USDC (6 decimals).
This leads to incorrect cost calculations, causing users to overpay when purchasing ZENO tokens.
ZENO uses 18 decimals, meaning 1 ZENO = 10^18 wei
.
USDC uses 6 decimals, meaning 1 USDC = 10^6 wei
.
The function calculates cost = price * amount
without adjusting for decimal differences.
This results in incorrect payment amounts, leading to users being charged too much.
Users will pay 10^12 times more than expected due to decimal mismatch.
Manual Review
Adjust Cost Calculation for Decimal Mismatch
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.