Going once... going twice... going DOWN! 📉
-
🏁 Operator starts auction with:
- Starting price (high)
- Ending price (low)
- Duration (1 minute)
-
⏳ Price decays linearly over time
-
🎉 First bidder wins!
-
🖼️ Winner's NFT becomes the selected ad
The price drops linearly from start to end. Here's how we calculate it:
currentPrice = startPrice - (totalPriceDiff * elapsed) / duration
Where:
- totalPriceDiff = startPrice - endPrice
- elapsed = current time - start time
- duration = 1 minute
Price
^
|
100| *
| *
75| *
| *
50| *
| *
25| *
+-----------------------> Time
0s 60s
-
🎯
AuctionStarted(startPrice, endPrice, startTime, duration)
- Fired when operator kicks off a new auction
-
💫
BidPlaced(bidder, amount, tokenId)
- Fired when someone places a winning bid
-
🏆
AuctionEnded(winner, amount, tokenId)
- Auction complete! We have a winner!
-
📢
WinningAdSelected(tokenId, title, content, imageURL, publisher, price)
- Details about the winning ad
- Check current price:
getCurrentPrice()
- Place a bid (must be >= current price):
placeBid(tokenId, bidAmount)
- 🏃♂️ First valid bid wins instantly
- 💸 Bid amount must be >= current price
- 🎨 Make sure your NFT exists before bidding
- 💰 Approve tokens before bidding
- ⏰ Auction lasts exactly 1 minute
- No bids? Operator can end auction with
endAuctionNoBids()
- Bid too low? Transaction reverts
- Auction ended? Wait for next one!
Happy Bidding! 🎉