User can buy zeno bond token by interacting in auction cotract, but when the buy
function called, the calculation is not considering the decimals when calculating the price. This resulting the price would be really high for normal amount of zeno token, or really small amount of zeno token for an affordable price.
here when calling buy
, user need to specify the amount that later would be minted to the user.
but the cost
calculation does not account the decimal difference between these two token.
if the price of 1 zeno token at the time of calling is 10 USDC, the getPrice
would later return 10e6
if the user intend to buy 1 zeno token, then the amount would be 1e18
thus making the cost calculation really big :
there is no way user can paid such big cost in USDC
the only way for reasonable amout is to buy 1 wei amout of zeno:
this resulting to buying a fraction amount of zeno bond token, which when we consider about composability and ERC20 standard, we should be using the decimals of the said token so we dont come into precision loss in other DeFi ecosystem.
user can only buy small amount of zeno token with reasonable price, which also can be considered dust amount and prone to precision loss when interacting with other defi ecosystem.
manual review
calculate the cost by dividing the decimals of zeno token:
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.