Web App

Auctions

Bid on CCT auctions, track bid history, finalize or cancel auctions.

Route: /app/auctions. English auctions for CCT: the seller escrows CCT, bidders escrow payment token, the highest bid wins when the timer ends.

What it shows

Each auction is a card: CCT Auction #id, seller, quantity (tonnes), starting price (a total payment token amount, not per tonne; onchain startPrice and bidAmount are totals in payment-token base units, converted with the token's decimals() read from the chain), current highest bid and bidder, a live countdown (ticks every second), and a role badge for your address. An auction's end time is an absolute timestamp that the contract requires to be between 1 hour and 30 days after creation.

Role badgeMeaning
Sellerseller == you
Highest BidderhighestBidder == you
OutbidYou appear in the BidPlaced history but are not the highest bidder

Controls: search (auction ID or seller address), filters All / Active / Ending Soon (under 24 h) / My Bids / My Auctions, Refresh, and Create Auction, which links to Sell Credits.

Actions

ActionWhoApprovalContract callNotes
Place Bid / Bid Higher / Increase BidAnyone except the sellerpayment token approve(marketplace, bid) for the exact bid if the freshly read allowance is lowerplaceBid(auctionId, bidAmount)The dialog asks for your total bid in payment token. The previous highest bidder is refunded automatically; if the payment token refuses that refund, it is credited to their pendingWithdrawals and they use Claim (see Marketplace).
Finalize & Claim CCT (winner) / Accept & Finalize (seller)Buttons shown to the winner and the seller once the timer endsnonefinalizeAuction(auctionId)Contract allows anyone to call it. Winner gets the CCT; seller gets the highest bid minus the fee (0.25 % default, snapshotted when the auction was created). If the seller cannot receive payment token the proceeds become claimable via claim(). With no bids the CCT returns to the seller.
Cancel AuctionSeller, only while there are no bidsnonecancelAuction(auctionId)CCT returned to the seller.

Client-side checks before sending: the bid must exceed the current bid and be at least the starting price. The seller never sees a bid action on their own auction, and the contract rejects it with Seller cannot bid (shown as "You cannot bid on your own auction").

Contract reverts

MessageCause
Auction not activeAlready finalized or cancelled
Auction endedplaceBid after endTime
Bid below start price / Bid too lowBid under the start price or not above the highest bid
Seller cannot bidThe auction's seller tried to bid on it
Price below minimum / Price above maximumcreateAuction with a starting bid per tonne outside the marketplace bounds
Duration too short / Duration too longcreateAuction with an end time outside 1 hour to 30 days from now
Auction not endedfinalizeAuction before endTime
Not auction creator / Auction has bidscancelAuction by a non-seller, or after a bid

Data sources

Onchain only. The list comes from AuctionCreated events in the last 20,000 blocks plus getAuction, filtered to isActive. An auction whose timer has expired stays listed (as ended) until someone calls finalizeAuction. Bid history is read from BidPlaced logs in the same window, loaded for every listed auction so the app can detect Outbid. No backend call.

States

StateBehaviour
Wallet not connected"Wallet not connected" empty state.
LoadingTwo skeleton cards.
No results"No auctions found" with a hint tailored to the active filter.
Contracts not configuredBanner in the shell; the list stays empty.

Run an auction · CarbonMarketplace reference