Scan to download
BTC $72,887.57 +1.63%
ETH $2,242.16 +2.39%
BNB $606.09 +0.34%
XRP $1.36 +0.52%
SOL $84.81 +1.32%
TRX $0.3191 -0.28%
DOGE $0.0937 +0.73%
ADA $0.2541 -0.48%
BCH $444.38 +0.10%
LINK $9.08 +0.89%
HYPE $41.62 +5.08%
AAVE $93.55 +2.48%
SUI $0.9447 +0.89%
XLM $0.1549 -0.40%
ZEC $372.45 +0.80%
BTC $72,887.57 +1.63%
ETH $2,242.16 +2.39%
BNB $606.09 +0.34%
XRP $1.36 +0.52%
SOL $84.81 +1.32%
TRX $0.3191 -0.28%
DOGE $0.0937 +0.73%
ADA $0.2541 -0.48%
BCH $444.38 +0.10%
LINK $9.08 +0.89%
HYPE $41.62 +5.08%
AAVE $93.55 +2.48%
SUI $0.9447 +0.89%
XLM $0.1549 -0.40%
ZEC $372.45 +0.80%

Paradigm: An Overview of the Constant Rate Issuance and Sale Protocol (CRISP) for NFTs

Summary: When the sales speed of the NFT is too fast relative to the target price, we hope to quickly adjust the price. Conversely, we will gradually lower the price.
Paradigm
2022-01-26 17:56:33
Collection
When the sales speed of the NFT is too fast relative to the target price, we hope to quickly adjust the price. Conversely, we will gradually lower the price.

Authors: Dave White, Frankie, Justin Roiland

Original Title: 《Constant Rate Issuance Sales Protocol

Compiled by: Kyle, The Way of DeFi

Introduction

This article introduces the Constant Rate Issuance Sales Protocol (CRISP), a pricing mechanism designed to sell NFTs at a target rate over time.

If we want to sell 100 NFTs per day but can only sell 10, CRISP will gradually lower the "buy now" price. If we want to sell 100 NFTs per day but can actually sell 200, CRISP will quickly raise the "buy now" price with each new sale.

We provide a Python notebook to simulate the behavior of this mechanism, along with a reference Solidity implementation.

Motivation

Imagine you have an infinite supply of NFTs that you want to sell at a fixed rate—say, 100 per day.

You could design an auction system to achieve this goal. You could sell all 100 in one auction, or perhaps hold 100 different auctions, selling one NFT at a time.

However, the user experience of auctions can be quite clunky—auctions incur gas costs, and we want users to be able to purchase one of the NFTs at any time without waiting for the auction to end.

Mechanism

Overview

CRISP tracks the sales rate of NFTs and compares it to the target rate.

When the sales rate of NFTs is too fast relative to the target, we want to be able to adjust the price quickly. The faster the sales rate is compared to the target, the quicker we want to raise the price.

On the other hand, when the sales rate of NFTs is too slow relative to the target, we do not want to hastily lower the price. After all, at some point in the past, there was enough demand to support the current price. Therefore, over time, we will gradually lower the price.

Sales Rate

We use an Exponential Moving Average (EMA) to measure the sales rate.

EMA is an adjustment to the exponential moving average, commonly used in quantitative trading to measure the accumulation of a quantity over a recently weighted time window. It has low computational costs and requires minimal storage space.

CRISP specifically uses EMA to track the number of NFTs sold over a recent period defined by the sales half-life. A sales half-life of 100 means that sales from 100 blocks ago will only contribute 1/2 to the current EMA.

The EMA in block b is recursively defined as:
image

Where S_b is a variable representing the number of sales that occurred in block b.

Given two blocks b1 and b2, assuming no sales occurred between the blocks, we have
image

We can use the above formula to convert the target sales rate into a target EMA. Assuming our goal is to make 1 sale every n blocks, the target EMA should be
image

Raising Prices

If the current EMA is above the target, by definition, the sales rate is too high. Therefore, we want to charge more for the next NFT sale, as this (potentially) will reduce demand or at least increase revenue.

The faster we sell NFTs relative to the expected price, the quicker we update the price. Thus, we define a variable
image

Then set
image

Where the price increase rate controls the speed of the price's response to the difference between the target price and the observed price.

In this example, we model CRISP over a period of 200 blocks. Our goal is to make a sale every 100 blocks, using a sales half-life of 700 blocks. During the given period, we see a purchase every 50 blocks, which exceeds our target. This pushes the EMA up with each purchase, and the price responds accordingly.

Lowering Prices

When the current EMA is below the target, the sales rate is too low. Therefore, we want to charge less for the next NFT to make it a more attractive purchase.

However, we want to gradually lower the price over time, as we managed to reach the target rate at the previous price, and we do not want to lower the price more than necessary.

Assuming the last transaction occurred at block b1 with price{b1}, the price at block b2 is given by:
image

Where the price decay half-life controls the rate of decay.

Since we only want to decay the price when the sales rate is below the target, if the current sale is the first sale since the sales rate fell below the target, we start calculating the decay from the block when it was below the target, rather than from the time since the last sale.
image

In this example, we model CRISP over a period of 300 blocks. Again, our goal is to make a sale every 100 blocks. During the given time period, only one purchase occurs at block 200. We see the current EMA slowly decline over the first 200 blocks, but the price does not start to drop until around block 100, at which point the current EMA falls below the target. Since the EMA remains below the target after the purchase, the price does not increase.

Complete Example

A longer-term example of CRISP. Initially, the purchase rate is too high, so the price increases with each purchase. After a period without purchases, the price and purchase rate stabilize roughly.

Code

The Python notebook and Solidity implementation can be found at https://github.com/FrankieIsLost/CRISP.

Conclusion

We hope CRISP can unlock a range of cool and interesting NFT dynamics.

If you find any issues or think of any improvements, we would love to hear your feedback! You can reach us on Twitter at @DaveWhite, @FrankieIsLost, and @justinroiland.

Appendix

Converting target sales rate to target EMA: Proof

Assuming our goal is to make 1 sale every n blocks. Then, using formula (1), the EMA at the k^{th} sale block is
image

This is a geometric series that converges to
image

Thus, we can convert between the target sales rate and the target EMA.

warnning Risk warning
app_icon
ChainCatcher Building the Web3 world with innovations.