DIP - Auction Contract

This Dogeparty Improvement Proposal outlines how auctions can be implemented.

It has become popular to sell NFTs on auctions. With an upgrade to Dogeparty we can do this directly on the blockchain relatively easy, with low fees and no third party risk.

Seller initiates an auction lot. The protocol puts the lot on escrow. Bidder sends a dust amount of Doge to the seller to indicate intention to buy. The protocol waits N blocks for a higher bid. If no higher bid received, the winning bidder makes the payment within N blocks and the protocol transfers the auction lot over to him.

The auction lot is always the entire account balance - i.e. all tokens and asset ownerships. Once an auction is up, the address is frozen until the auction is over or cancelled.

The auction parameters are:

  • Starting price in Doge-satoshis
  • Step size; integer; 1-100 implies percentage, >100 implies Doge-satoshis
  • XDP escrow (optional); penalty if winning bidder doesn’t make the payment
  • Deadline; number of blocks; sets both hammer time and settlement time

Hammer time is the number of blocks to wait for a new higher bid. If none is made, the auction ends.
Settlement time is the number of blocks after auction ends in which the winner must make the settlement.

Hammer and settlement times are generally the same. Except the hammer time is minimum 0 (buy now) and settlement is minimum 30 (about 30 minutes). If the deadline parameter is set below the minimum, the hardcoded minimum overrules.

To place a bid you simply send a dust amount of Doge to the seller’s address. A magic number of 1.00100100 Doge is defined as a new bid. This number is chosen becuase

The bid will automatically become

  • the starting price if it’s the first bid
  • or the previously highest bid + 1 step

It’s also possible to place a bid xx steps above the starting price by sending 1.001001xx Doge where xx is a number 01-99. This makes sense if you want to prevent an expensive and tiring bidding war.

Example A: Auction lot has starting price 200 Doge and step size 50 Doge. Alice sends 1.00100100 Doge and gets the leading bid of 200 Doge. Bob sends 1.00100100 Doge and takes the lead at 250 Doge. Alice yet again sends 1.00100100 Doge and no new bids are made. Alice wins the auction at price 300 Doge.

Example B: Auction lot has starting price 1 Doge and step size 100%. Alice fears a bidding war if she places a low bid at 1 Doge. She sends 1.00100106 Doge to make a bid of 64 Doge (= 1*[1+100%]^6).

The winner of the auction makes the payment before the deadline and the protocol returns the auction lot in addition to any XDP escrow.

The payment must be made from the same address as the winning bid was made from. The deadline is in general the same as the hammer time but can never be less than 30 blocks.

If the winner fails to make the payment, the auction restarts. Any escrowed XDP goes to the seller as compensation.

The auction can have fours states

  • Open (no bids yet)
  • Active (bids registered, waiting new bids)
  • Won (waiting settlement)
  • Closed (has been settled or cancelled)

An Open auction can be cancelled anytime. If an Active or Won auction receives a cancel request, the request is set on hold. The auction is cancelled only in case the winning bidder fails to make the settlement.

The dispenser has one huge advantage; send Doge, get tokens directly in return. The auction requires at least two Doge transactions (and more if a bidding war develops).

However, a dispenser is risky when few tokens are left and the seller is unknown. This is not very suitable for high value NFTs. An auction, in contrast, requires no trust as the buyer can only lose funds if he messes up the settlement himself.

The other main difference is that bidding, although somewhat costly and time consuming, is a very popular tool for price discovery. There’s a reason why art is usually auctioned at Christy’s or Sotheby’s.

Now we have a chance to make a fully decentralized blockchain auction house … fully in line with Counterparty’s original vision if you ask me.

A. You own an ultra valuable vintage DOGE card. You want to stay anonymous, i.e. no one will buy from you unless the transaction is risk free. You open an auction at the market price of 50,000 DOGE with a deadline of 0. This is equivalent to ‘buy now’ or a dispenser with one essential difference. The buyer sends first 1.00100100 Doge and gets heads up from the protocol. He doesn’t need to risk a collision where another buyer front-runs him. He safely sends the 50,000 Doge and gets the special card in return.

B. You want to sell a token including its issuance right. You transfer both to a new address and set up an auction. Both are automatically included in the auction lot.

C. You registered a full set of names of sport clubs. All names are on one address, and you auction them all off in one lot.

D. You own a fairly low value name you regret registering. You set up a buy-now at 0.5 XDP in hope of recovering your fee.

E. You want to sell a large lot of XDP which would have pushed the market down quite a bit. You put up a lightning auction with deadline at just 5 blocks. The starting price is 5% below market, but if you are lucky some whale investors with the opposite problem will push the price above market.