The DEX is one of the most popular features of Counterparty. However, there are situations where it does not work well (or not at all). Token auctions will address several of these cases, such as:
- Asset is rarely traded. Therefore the seller does not know where to place ask price.
- Seller owns 100 GAMECRYSTALS, exactly what’s needed to level up. Seller is only interested in selling all or nothing.
- A card designer wants to sell a card bundle
- Asset issuer wants to sell the issuance right (also called asset ownership)
- Tokens are for sale against BTC but seller requires XCP compensation in case they buyer does not fulfill his BTCpay promise
An auction will require these parameters
lot_assets- one or several assets for sale
lot_quants- corresponding quantities
bid_asset- buyer must pay with this asset
bid_min- lowest allowed price
bid_incr- new bid must be at least this much higher than previous
deadline- if no bids, expire the auction after this # of blocks
hammer_wait- after valid bid, wait this many blocks until hammer falls (auction ends)
btcpay_wait- if BTC involved, wait for BTCpay this many blocks after auction ends
xcp_deposit- if fail to make BTCpay on time, the counterpart will receive this XCP compensation
Alice sells her entire collection of Pepe cards. She puts them all in one auction lot at minimum price 100 XCP. Bob makes a valid 100 XCP bid, and the system waits 60 blocks (~10 hours) for a higher bid. After another 45 blocks Charlie places a new bid, one increment higher, at 110 XCP. Another 60 blocks passes and no new bids are recorded. Alice’s Pepe lot is transferred to Charlie for 110 XCP.
Alice has 10,000 XCP for sale. She’s chatting with a potential buyer and places the XCP for sale against BTC. To keep the exchange rate risk (fluctuating price risk) at a minimum she sets the
deadlineat 6 blocks and
hammer_waitat 0 blocks (i.e. the first minimum bid gets it now). The
btcpay_waitshe sets a bit higher, otherwise the buyer would be at risk of not making it on time, so it is at 20 blocks. In case the XCP price drops in the meanwhile and they buyer thus have the option of dropping out, she demands a 200 XCP deposit.
Alice owns the asset name
Charlie. She has no idea what it’s worth, nor does she have any plan of ever using it herself. She puts if for sale at 1 XCP with a very high deadline (virtually forever). The
hammer_waitis 432 (~3 days) to give more people a chance to bid up the price. It turns out that Charlie makes a bid very quickly. After 3 days have passed, no other bid is recorded, and Charlie gets the
Charliename for 1 XCP.