Current auction implementation harms early bidders, disincentivizing users from participating
Zeno auctions involve buying ticket-like token, Zeno, for a gradually decreasing price. After the auction ends all "tickets" can be redeemed at 1:1 ratio for USDC. The auction has a starting price (highest one) which gradually decreases to reserve price (lowest one). We will use the values in the tests - startingPrice = 100 USDC and reservePrice = 10 USDC
Once a user purchases zeno, they pay the spot price and are allocated a bid amount
However the bidAmounts[msg.sender] mapping is updated with amount of zeno tokens, instead of the price paid in USDC.
Let's run a simple example:
totalRemaining = 100 Zeno, auction starts
Alice purchases 49 Zeno at startingPrice and pays 49 * 100 = 4900 USDC, bidAmounts[Alice] = 49
Some time passes and Bob purchases the other 51 Zeno tokens at half starting price, pays 51 * 50 = 2550 USDC, bidAmounts[Bob] = 51
There is no more zeno to be purchased, end time passes and zeno is redeemable now
So what happened is: Bob came later than Alice, paid less USDC, was the highest bidder and received more from their redeem. Alice (and everyone else) is discouraged from participating in any auctions again as they are flawed.
Logic error
Store bids as the actual money spent on the bid, not the zeno received
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.