Skip to content

Auctions

Jona edited this page Jun 18, 2020 · 1 revision

Auctions

On top of selling them, the AtomicMarket also allows for auctioning assets.

Creating an auction

To create an auction, it first has to be announced used the announceauct action. Any supported token (found in the config) can be used for the starting_bid. The duration must be within the limits defined in the config.

You can list any number of assets in a single auction. However, all assets need to belong to the same collection, and need to be transferable. Also, the seller / creator needs to own all the assets.

Then, the seller / creator needs to transfer the assets to the AtomicMarket account using the AtomicAssets transfer action. The memo of the transfer must be auction.

Bidding on an auction

Bids are paid from internal balance of the buyer. Therefore, the bidder first needs to deposit the necessary tokens (More Details).

After depositing the required tokens, a bid can be placed using the auctionbid action.

If the auction has no previous bidders (current_bidder field is empty), the bid must be at least as big as the starting bid (stored in the current_bid field).
If the auction has a previous bidder, the bid must be bigger than the previous bid by at least minimum_bid_increase (stored in the config singleton). (new bid >= (1 + minimum_bid_increase) * current_bid)

If the auction would end in less than auction_reset_duration seconds (stored in the config singleton), the auction's end time is set to auction_reset_duration seconds in the future. This means that any last second bids reset the auction's remaining time to auction_reset_duration seconds.

The bid is deducted from the bidder's balance. If there has been a previous bid, the previous bidder's bid is refunded to their balance.

Claiming a finished auction

Claim as buyer / highest bidder

The highest bidder can claim the assets won using the auctionclaimbuy action.

Claim as seller / creator

The seller / creator of the auction can claim the tokens of the highest bid using the auctionclaimbuy action. As part of that, the marketplaces and the collection also get their cut (Fee structure).

After both the buyer and the seller of an auction claim their part, the auction is erased from the table.

Cancelling an auction

Auctions can be cancelled using the cancelauct action, but only if no bid has been placed on it yet. If the seller / creator already transferred their assets to the AtomicMarket account, they are transferred back.


Inactive auctions

When the assets_transferred field for an auction is false, that means that the assets for it have not yet been transferred to the AtomicMarket contract. The auction is therefore considered inactive and can not be bid on.