# 📊Bonding Curves

## How it works

similiar to the Liquidity Book on LFJ, our curves are setup using **bins** to store token amounts and prices.

As more **BELL** is exchanged for a token, the bin will fill up until their is no more tokens in that bin, then it will go to the next non empty bin.&#x20;

Token prices per bin goes up 20% incrementally. This is a step-wise approach to the bonding curve problem. Compare that to moonshot or pumpdotfun whose bonding curves follow the a distinct curve.

This allows Bellum to cater to multiple pricing strategies.&#x20;

&#x20;

<figure><img src="/files/wsYfGbiD8oz7JdaDopUi" alt=""><figcaption><p>Curve types seen on the create page of Bellum Exchange</p></figcaption></figure>

1. First one in the list is comparable to a **linear** pricing model, where the price per token increases linearly.
2. The second is familiar to a **carrying capacity** curve. Where initially the price goes up fast, but levels out the further along the bins it gets.
3. The third is similar to pump dot fun's model of an **exponential** curve.
4. The last is similar to a **cubic** function where the price goes up fast and consolidates in the middle, then goes up fast again.&#x20;

## Mathematical Formulas

### **Price Calculation for Each Bin**:

Calculate the price for the bin using the formula:

$$
price=basePrice×(100 + (i×20​)) / 100
$$

### Calculate Last Non-Zero Bin Price

Determine the price for the last non-zero bin using:

$$
lastNonZeroPrice=basePrice×(1+\tfrac{(length−1)×20​} {100})
$$

### Market Cap Calculation

This is the market cap at the last bin. This is the value of the token when migrated to Trader Joe.

$$
requiredMarketCap=totalDistribution×lastNonZeroPrice
$$

### Fraction Validation

This is the fraction of the total supply that we want added to the bins.

$$
cumulativeValue=\displaystyle\sum\_{i=u}^{n - 1}​lists\[i]×price\_{i}
$$

$$
fraction=10,000 × \tfrac{requiredMarketCap}{cumulativeValue + requiredMarketCap}
$$


---

# Agent Instructions: 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://doc.bellum.exchange/bonding-curves.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.
