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
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.
Placing Bids: Auction participants are free to bid their desired amount and price over the auction period.
Sorting Bids: Once the auction is completed, all received bids are arranged in a specific order:
First, they're sorted by their bid price from the highest to the lowest.
If there are any bids at the same price, those are further sorted based on the bid amount, from the smallest to largest.
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:
In the first iteration, tokens are distributed only to the topmost bid at its offered price.
In the second iteration, tokens are distributed to the top two bids but at the price of the second bid.
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.
This process repeats until all tokens are distributed. The price at which all tokens are first fully distributed becomes the final clearing price.
Distributing Tokens:
At the final clearing price, tokens are distributed from the highest to lowest bidders.
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:
1
2
20
2
4
11
3
5
11
4
3
2
5
7
0.5
6
5
0.3
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