The Auction
contract has a critical issue with scaling amounts when users bid for ZENO tokens using USDC. Specifically:
ZENO: 18 decimals (standard ERC20 precision).
USDC: 6 decimals (common for stablecoins).
The buy
function does not correctly scale the amounts when transferring USDC and minting ZENO tokens.
The issue arises because the buy
function does not account for the decimal difference between ZENO (18 decimals) , USDC (6 decimals) and also doesnt handle price precison. Specifically the buy
function does not correctly scale the amounts when transferring USDC and minting ZENO tokens. As a result:
If the sale price is 10^6
(1 USDC) and the user bids 1
token only , the contract transfers 1e6
USDC but mints only 1 wei ZENO
(not 1e18)
During redemption, 1 ZENO
can only redeem 1 wei USDC
(not 1e6 ), which is incorrect due to the decimal mismatch.
Users receive far fewer ZENO tokens than they should for their USDC bids and can redeem dust USDC
Manual
Ensure the cost calculation accounts for the price precision:
Scale the USDC amount to match ZENO's 18-decimal precision before minting.
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.