> For the complete documentation index, see [llms.txt](https://jester.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jester.gitbook.io/docs/tools/castellan/bonding-curve.md).

# Bonding Curve

The bonding curve system **automatically adjusts** token requirements for different membership tiers based on market conditions. Here's how it works:

**The key innovation is that token requirements adjust inversely to price:**

* **When token price increases → required tokens decrease**
* **When token price decreases → required tokens increase**

For example, if the token price doubles, **you’ll need fewer tokens** to maintain your tier.

### **🛡️ Built-in Protections**

To ensure **fair and stable adjustments**, the system also applies:&#x20;

✅ **Rate Limits:**

* **Daily max change: 2%**
* **Biweekly max change: 10%**

✅ **Grace Periods:**

* Verified users have **a 7-day grace period** before losing a tier.
* Users within **10% of the requirement** retain their tier (if eligible).

✅ **Dual Qualification:**

* Users can qualify **by either token count or USD value on holdings**.

✅ **Exponential Decay for Smooth Adjustments:**

* The system uses **exponential decay** to adjust token requirements gradually based on price changes.
* This ensures **no drastic jumps** when token price fluctuates.

✅ **Scaled Discounts:**

* Fee discounts increase **as your holdings grow**:
  * **Basic:** 15-25% discount
  * **Standard:** 30-50% discount
  * **Premium:** 60-75% discount
* **Role-based discounts override these** if they offer better rates.

### **🎯 Why This Matters**

This system ensures:&#x20;

✔ **Loyal holders are protected**\
✔ **Tier requirements adjust smoothly with price changes.**\
✔ **New users can still enter at reasonable token amounts.**

***

<figure><img src="/files/Rzu3CtiXNWJtlreyyXoJ" alt=""><figcaption></figcaption></figure>

#### Graph Breakdown

* **Dashed lines** represent **token requirements decreasing** when price **increases**.
* **Solid lines** represent **token requirements increasing** when price **decreases**.
* **Each color corresponds to a different membership tier** (**BASIC, STANDARD, PREMIUM**).
* The **black dotted line** marks the **target price ($1)** where token requirements stabilize.

***

## Formulas

### **When Token Price Increases (Requirements Decrease):**&#x20;

* As the token price **rises**, the number of required tokens **decreases** towards the **target minimum threshold** using **exponential decay**:

$$
T\_{new} = T\_{target} + (T\_{previous} - T\_{target}) \times e^{-k \times \left(\frac{P\_{current}}{P\_{target}}\right)}
$$

**Explanation:**

* **Tnew​** → The updated minimum token requirement
* **Ttarget** → The lowest possible token requirement for the tier
* **Tprevious** → The last recorded minimum requirement before price changes
* **Pcurrent** → The current token price
* **Ptarget**→ The price at which the tier requirement stabilizes
* **k** → A decay constant (default: **2**) that controls the rate of adjustment
* **ee**→ Euler’s number (**≈ 2.718**), ensuring smooth decay

🔹 **Result:** If the **token price doubles**, the requirement moves closer to **the target minimum** (e.g., BASIC tier moves from 2500 tokens toward 250).

### **When Token Price Decreases (Requirements Increase)**

$$
T\_{new} = \min \left( T\_{start}, T\_{previous} + (T\_{start} - T\_{previous}) \times e^{-k \times \left(1 - \frac{P\_{current}}{P\_{target}}\right)} \right)
$$

**Explanation:**

* **Tstart** → The initial token requirement before any price-based adjustments
* Other variables remain the same as in the first formula.

🔹 **Result:** If the **token price drops**, the system **increases token requirements gradually** but prevents extreme jumps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jester.gitbook.io/docs/tools/castellan/bonding-curve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
