Gradual Dutch Auctions

04.04.2022|FrankieDan RobinsonDave WhiteAndy8052

Introduction

This paper introduces the Gradual Dutch Auction, 1 or GDA, a mechanism that enables efficient sales of assets that do not have liquid markets.

GDAs solve a similar problem to TWAMM, but do not rely on the existence of liquidity providers willing to make markets on pairs of assets.

GDAs work by breaking up a sale into a sequence of Dutch auctions—a type of auction that start with a high asking price that is gradually lowered until a buyer makes a bid. GDAs allow you to purchase multiple of these auctions at once in a gas-efficient manner.

We provide an outline for both discrete GDAs, which are useful for selling NFTs, and continuous GDAs, which are useful for selling fungible tokens. We also include a Python notebook modeling the mechanism’s behavior, as well as a reference Solidity implementation.

Discrete GDA

Motivation

Imagine Alice would like to sell a collection of 10,000 NFTs. She is unsure what a fair price for her art pieces would be, so she does not want to sell them at a fixed price.

Instead, she might choose to sell them all in a single Dutch auction—starting with a high asking price, and gradually lowering it until all the NFTs are sold. However, such an auction can be suboptimal: there may not be enough interest from buyers to purchase all pieces at the same time.

Instead, Alice could auction off one NFT at a time. For example, she might start a new Dutch auction every minute for a new piece in her collection. This will give the market more time to find a fair price for her art.

Discrete GDAs are an extension of this idea, but support gas-efficient bulk purchases of multiple sub-auctions thanks to their mathematical properties.

Mechanism

Discrete GDAs are suitable for selling NFTs, because these have to be sold in integer quantities. They work by holding a virtual Dutch auction for each token being sold. These behave just like regular dutch auctions, with the ability for batches of auctions to be cleared efficiently.

In a discrete GDA, every auction starts at the same time, with each successive auction having a higher starting price. The price of each auction is given by some price function,

pn(t)p_n(t)
, where
nn
is index of the auction, and
tt
is the time since its start.

Various price functions can be used with GDAs. One particular well-behaved formulation is given by:

pn(t)=kαneλtp_n(t) = k \cdot \alpha^ne^{- \lambda t}

Here, the price for every auction decays exponentially according to some decay constant

λ\lambda
. The starting price of each auction increases by some fixed scale factor
α\alpha
. And the starting price of the first auction is given by some initial price
kk
.

Calculating Batch Purchase Prices

Given the above price function, we can efficiently compute the cost of purchasing a batch of auctions.

Imagine that Bob wanted to purchase some quantity

qq
of tokens. To do this, he would purchase the
qq
cheapest auctions. If
TT
seconds have passed since the auctions began, and
mm
total NFTs have been sold so far, the total price
PP
of purchasing
qq
tokens is given by:

P(q)=n=mm+q1pn(T)P(q) = \sum_{n=m}^{m + q - 1} p_n(T)

For the case of the above price function,

P(q)P(q)
can be computed efficiently. As shown in the appendix, the formula for
P(q)P(q)
is:

P(q)=kαm(αq1)eλT(α1)P(q) = \frac{k \alpha^m(\alpha^{q} - 1)}{e^{\lambda T}(\alpha -1)}

We can plot the quantity of tokens being purchased in a single order against their cumulative price to obtain the following figure:

Continuous GDA

Motivation

Having sold her NFTs, Alice now might want to sell some fungible tokens. One option would be for her to use the discrete GDA mechanism described above, to sell her tokens in fixed-sized lots.

However, Alice might not want to make all her tokens available for sale immediately, as is the case with discrete GDAs. For example, she might be running a protocol that sells emissions at some constant rate, say, 360 tokens per day.

Instead of using a discrete GDA, she could instead choose to sell her tokens in a series of standard dutch auctions. She could run one 360-token auction per day, one 15-token auctions per hour, or one 0.25-token auctions per minute. Again, there is a trade-off between price impact and gas efficiency, based on the number of auctions she holds.

Continuous GDAs work by taking this process to the limit, where the time interval between auctions approaches 0. This means that sales are split into an infinite sequence of auctions, each selling an infinitesimal amount of the token.

As it turns out, we can still compute the purchase price for any quantity of tokens in a gas-efficient manner.

Mechanism

Continuous GDAs work by incrementally making more of an asset available for sale, at a constant emission rate,

rr
. For example, like we stated above, Alice might be interested in selling 0.25 tokens per minute.

Emissions are broken up over an infinite series of virtual auctions. These auctions are started at an even rate over time, with each auction begining at the same price.

The price of each auction is given by some price function,

p(t)p(t)
, where
tt
is the time since its start. Just like in discrete GDAs, many different price functions can work. One such function is:

p(t)=keλtp(t) = k \cdot e^{- \lambda t}

Like the previous example, price decays exponentially according to some decay constant

λ\lambda
, while
kk
controls the starting price.

Calculating Purchase Prices

Say that Bob wanted to purchase some quantity

qq
of the token being sold by Alice. In order to buy that many tokens, he needs to purchase every auction started over a period of
qr\frac{q}{r}
seconds. Since prices decrease over time, he bids on the oldest available auctions.

If the oldest available auction is

TT
seconds old, the total price
PP
of purchasing
qq
tokens is given by:

P(q)=TqrTp(t)dtP(q) = \int^{T}_{T-\frac{q}{r}} p(t)dt

This means that we can compute the total purchase price in a gas-efficient manner as long as computing the integral of the price function is cheap.

The total price of purchasing

qq
tokens using the above price function can be calculated efficiently on chain. As shown in the appendix, this price is given by:

P(q)=kλeλqr1eλTP(q) =\frac{k}{\lambda} \cdot \frac{e^{\frac{\lambda q}{r}}-1}{e^{\lambda T}}

From which we obtain the following price curve:

Code

We’ve included a Python notebook modeling GDAs and a reference Solidity implementation.

Conclusion

GDAs are a useful mechanism for selling both fungible and non-fungible tokens that do not have liquid markets. While this paper derives a few useful price functions, we believe many more could be used in different contexts. We hope GDA will be useful in a variety of applications beyond those described in this paper.

If you’re a builder interested in implementing some of these concepts, please reach out to us at @FrankieIsLost, @danrobinson, @_Dave__White_ @andy8052 on Twitter. We’d be thrilled to hear from you.

Appendix

Derivation of Discrete GDA with Exponential Price Decay

P(q)=n=mm+q1pn(T)P(q) = \sum_{n=m}^{m + q -1} p_n(T)
P(q)n=mm+q1kαneλtP(q) \sum_{n=m}^{m + q -1} k \cdot \alpha^ne^{- \lambda t}
P(q)keλTn=mm+q1αnP(q) ke^{-\lambda T}\sum_{n=m}^{m + q -1} \alpha^n
P(q)kαm(αq1)eλT(α1)P(q) \frac{k \alpha^m(\alpha^{q} - 1)}{e^{\lambda T}(\alpha -1)}

Derivation of Continuous GDA with Exponential Price Decay

P(q)TqrTp(t)dtP(q) \int^{T}_{T-\frac{q}{r}} p(t)dt
P(q)TqrTkeλtdtP(q) \int^{T}_{T-\frac{q}{r}} k \cdot e^{-\lambda t}dt
P(q)kλ(eλ(Tqr)eλT)P(q) \frac{k}{\lambda}\cdot \left( e^{-\lambda(T - \frac{q}{r})} - e^{-\lambda T} \right)
P(q)kλeλqr1eλTP(q) \frac{k}{\lambda} \cdot \frac{e^{\frac{\lambda q}{r}}-1}{e^{\lambda T}}

Footnotes

  1. Also known as Australian Auctions.

Disclaimer: This post is for general information purposes only. It does not constitute investment advice or a recommendation or solicitation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision. It should not be relied upon for accounting, legal or tax advice or investment recommendations. This post reflects the current opinions of the authors and is not made on behalf of Paradigm or its affiliates and does not necessarily reflect the opinions of Paradigm, its affiliates or individuals associated with Paradigm. The opinions reflected herein are subject to change without being updated.

Copyright © 2024 Paradigm Operations LP All rights reserved. “Paradigm” is a trademark, and the triangular mobius symbol is a registered trademark of Paradigm Operations LP