Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Invalid

Users are discouraged from participating in Zeno auctions since they are not really auctions

Summary

Current auction implementation harms early bidders, disincentivizing users from participating

Details

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

function buy(uint256 amount) external whenActive {
require(amount <= state.totalRemaining, "Not enough ZENO remaining");
uint256 price = getPrice();
uint256 cost = price * amount;
require(usdc.transferFrom(msg.sender, businessAddress, cost), "Transfer failed");
bidAmounts[msg.sender] += amount;
state.totalRemaining -= amount;
state.lastBidTime = block.timestamp;
state.lastBidder = msg.sender;
zeno.mint(msg.sender, 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:

  1. totalRemaining = 100 Zeno, auction starts

  2. Alice purchases 49 Zeno at startingPrice and pays 49 * 100 = 4900 USDC, bidAmounts[Alice] = 49

  3. Some time passes and Bob purchases the other 51 Zeno tokens at half starting price, pays 51 * 50 = 2550 USDC, bidAmounts[Bob] = 51

  4. 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.

Impact

Logic error

Mitigation

Store bids as the actual money spent on the bid, not the zeno received

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!