Batch Auction Mechanics

A deep-dive into the mechanics of Gnosis Batch Auctions, the smart contracts used by the BIO 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:

βˆ‘π‘–=1βˆ’>π‘›π‘›π΅π‘–π‘‘π΄π‘šπ‘œπ‘’π‘›π‘‘π‘–π΅π‘–π‘‘π‘ƒπ‘Ÿπ‘–π‘π‘’π‘–=π‘†π‘’π‘™π‘™π‘‰π‘œπ‘™π‘’π‘šπ‘’>π‘‡π‘œπ‘‘π‘Žπ‘™π΄π‘’π‘π‘‘π‘–π‘œπ‘›π‘’π‘‘π‘‡π‘œπ‘˜π‘’π‘›π‘ βˆ‘i=1βˆ’>nn​BidPricei​BidAmounti​​=SellVolume>TotalAuctionedTokens

i: A particular bidder

π΅π‘–π‘‘π΄π‘šπ‘œπ‘’π‘›π‘‘π‘–BidAmounti​: The total bid amount of for a given bidder above the BidPrice

π΅π‘–π‘‘π‘ƒπ‘Ÿπ‘–π‘π‘’π‘–BidPricei​: The simulated clearing price during each iteration

π‘†π‘’π‘™π‘™π‘‰π‘œπ‘™π‘’π‘šπ‘’SellVolume: The total amount of tokens that would be distributed at the simulated clearing price

π‘‡π‘œπ‘‘π‘Žπ‘™π΄π‘’π‘π‘‘π‘–π‘œπ‘›π‘‡π‘œπ‘˜π‘’π‘›π‘ TotalAuctionTokens: The total number of tokens being sold in the auction (15 in this example)

Iteration 1 -> BidPrice = 20

π‘†π‘’π‘™π‘™π‘‰π‘œπ‘™π‘’π‘šπ‘’=βˆ‘220=0.1<π‘‡π‘œπ‘‘π‘Žπ‘™π΄π‘’π‘π‘‘π‘–π‘œπ‘›π‘’π‘‘π‘‡π‘œπ‘˜π‘’π‘›π‘ =15SellVolume=βˆ‘202​=0.1<TotalAuctionedTokens=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

π‘†π‘’π‘™π‘™π‘‰π‘œπ‘™π‘’π‘šπ‘’=βˆ‘211+411+511=1<π‘‡π‘œπ‘‘π‘Žπ‘™π΄π‘’π‘π‘‘π‘–π‘œπ‘›π‘’π‘‘π‘‡π‘œπ‘˜π‘’π‘›π‘ =15SellVolume=βˆ‘112​+114​+115​=1<TotalAuctionedTokens=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

π‘†π‘’π‘™π‘™π‘‰π‘œπ‘™π‘’π‘šπ‘’=βˆ‘22+42+52+32=7<π‘‡π‘œπ‘‘π‘Žπ‘™π΄π‘’π‘π‘‘π‘–π‘œπ‘›π‘’π‘‘π‘‡π‘œπ‘˜π‘’π‘›π‘ =15SellVolume=βˆ‘22​+24​+25​+23​=7<TotalAuctionedTokens=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

π‘†π‘’π‘™π‘™π‘‰π‘œπ‘™π‘’π‘šπ‘’=βˆ‘20.5+40.5+50.5+30.5+70.5=42>π‘‡π‘œπ‘‘π‘Žπ‘™π΄π‘’π‘π‘‘π‘–π‘œπ‘›π‘’π‘‘π‘‡π‘œπ‘˜π‘’π‘›π‘ =15SellVolume=βˆ‘0.52​+0.54​+0.55​+0.53​+0.57​=42>TotalAuctionedTokens=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=40.52​=4 tokens, 11 tokens left

Bidder 2: Receives 40.5=80.54​=8 tokens, 3 tokens left

Bidder 3: Should receive 50.5=100.55​=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 10βˆ’3=710βˆ’3=7. At a clearing price of 0.5, Bidder 3's refund is 7βˆ—0.5=3.57βˆ—0.5=3.5, and spends 5βˆ’3.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