Batch Auction Mechanics

A deep-dive into the mechanics of Gnosis Batch Auctions, the smart contracts used by the Bio.xyz Launchpad.

Batch auctions are a mechanism of selling tokens to a community that helps to raise funding and gives a fair token price to all token participants. Instead of time-based price changes like traditional auctions (for example, a Dutch Auction) the price is determined by bidders' demand for tokens at different prices. This page discusses how batch auctions 1) raise funds, 2) price the token.

Step-by-Step Guide to Gnosis Batch Auctions

  1. Total Auctioned Tokens: Consider a collection (or pile) of tokens that a BioDAO wants to be auctioned off - to help raise money for and distribute governance of the DAO.

  2. Placing Bids: Auction participants are free to bid their desired amount and price over the auction period.

  3. Sorting Bids: Once the auction is completed, all received bids are arranged in a specific order:

    1. First, they're sorted by their bid price from the highest to the lowest.

    2. If there are any bids at the same price, those are further sorted based on the bid amount, from the smallest to largest.

  4. Finding the final clearing price: The final clearing price is the price that exhausts the supply of all Auction Tokens. To find that final clearing price, the distribution of tokens is simulated at different potential clearing prices. This simulated distribution follows a specific method:

    1. In the first iteration, tokens are distributed only to the topmost bid at its offered price.

    2. In the second iteration, tokens are distributed to the top two bids but at the price of the second bid.

    3. In each iteration, we consider all bids up to and including the next highest price. If multiple bidders have bid at this price, all of them are included. The distribution for that iteration then uses the price of this latest group of bidders.

    4. This process repeats until all tokens are distributed. The price at which all tokens are first fully distributed becomes the final clearing price.

  5. Distributing Tokens:

    1. At the final clearing price, tokens are distributed from the highest to lowest bidders.

    2. Once all tokens have been distributed, distribution stops, even if a user bid above the final bid price.

Example Walkthrough

Consider 15 tokens are being sold by a BioDAO in a batch auction. At the end of the auction, bids are received as follows:

Clearing Price Calculation

The Clearing Price is the highest BidPrice where the following is true:

i=1>nnBidAmountiBidPricei=SellVolume>TotalAuctionedTokens\sum_{i=1->n}^{n} \frac{BidAmount_i}{BidPrice_i} = SellVolume > Total Auctioned Tokens

i: A particular bidder

BidAmountiBidAmount_i: The total bid amount of for a given bidder above the BidPrice

BidPriceiBidPrice_i: The simulated clearing price during each iteration

SellVolumeSellVolume: The total amount of tokens that would be distributed at the simulated clearing price

TotalAuctionTokensTotalAuctionTokens: The total number of tokens being sold in the auction (15 in this example)

Iteration 1 -> BidPrice = 20

SellVolume=220=0.1<TotalAuctionedTokens=15SellVolume = \sum \frac{2}{20} = 0.1 < Total Auctioned Tokens = 15

Only Bid #1 is at or above the BidPrice of 20. Because only 0.1 tokens would be distributed if this were the clearing price, it cannot be the final clearing price.

Iteration 2 -> BidPrice = 11

SellVolume=211+411+511=1<TotalAuctionedTokens=15SellVolume = \sum \frac{2}{11}+\frac{4}{11}+\frac{5}{11} = 1 < Total Auctioned Tokens = 15

Bids #1-3 are at or above the BidPrice of 11. Because only 0.1 tokens would be distributed if this were the clearing price, it cannot be the final clearing price.

Iteration 3 -> BidPrice = 2

SellVolume=22+42+52+32=7<TotalAuctionedTokens=15SellVolume = \sum \frac{2}{2}+\frac{4}{2}+\frac{5}{2}+\frac{3}{2} = 7 < Total Auctioned Tokens = 15

Bids #1-4 are at or above the BidPrice of 2. Because only 7 tokens would be distributed if this were the clearing price, it cannot be the final clearing price.

Iteration 4 -> BidPrice = 0.5

SellVolume=20.5+40.5+50.5+30.5+70.5=42>TotalAuctionedTokens=15SellVolume = \sum \frac{2}{0.5}+\frac{4}{0.5}+\frac{5}{0.5}+\frac{3}{0.5}+\frac{7}{0.5} = 42 > Total Auctioned Tokens = 15

Bids #1-5 are at or above the BidPrice of 0.5. Because 42 tokens would be distributed if this were the clearing price, and this is greater than the TotalAuctionedTokens, 0.5 becomes the final clearing price.

Final Outcome -> ClearingPrice = 0.5

TotalAuctionedTokens = 15

Bidder 1: Receives 20.5=4\frac{2}{0.5}=4 tokens, 11 tokens left

Bidder 2: Receives 40.5=8\frac{4}{0.5}=8 tokens, 3 tokens left

Bidder 3: Should receive 50.5=10\frac{5}{0.5}=10 tokens, but there are only 3 tokens left, so Bidder 3 receives an those 3 Auction Tokens, and the remainder as a refund. To calculate the refund, we must refund that did not go towards an allocation in Auction Tokens 103=7{10 }-3=7. At a clearing price of 0.5, Bidder 3's refund is 70.5=3.57 * 0.5 = 3.5, and spends 53.5=1.55-3.5=1.5 bid tokens.

Bidder 4: Receives no Auction Tokens, only a refund of 3.

Bidder 5: Receives no Auction Tokens, only a refund of 7.

Bidder 6: Receives no Auction Tokens, only a refund of 5.

The total amount of funding received by the DAO is 2+4+1.5=7.52+4+1.5=7.5 bid tokens.

Last updated

Logo