# liquidity pools and bonding curves

"Liquidity pools", "bonding curves" - don't worry if you're not used to those terms yet, we'll make sure they're crystal clear to you after reading our explanation below.

### A (liquidity) pool - what's that?

It is a smart contract that enables you to instantly swap between two assets (Uniswap, ...). On hadeswap, the liquidity pools available are \[NFT from collection X] <-> \[SOL], which means that anyone holding an NFT from collection X can instantly swap them for SOL, and vice versa.

Each pool uses a specific bonding curve to determine how the price of SOL will fluctuate in regards with the purchases/sales of NFTs happening. Respecting the demand <-> supply mechanics, the more an NFT is being bought, the more expensive it becomes. The opposite is also true, the more an NFT is being sold, the cheaper it becomes.

In an ideal setting, a pool contains a decent amount of both assets to enable users to have a very smooth trading experience so that they can swap back and forth between \[NFTs] and \[SOL]. It is however possible to create a pool with just one asset, be it \[NFTs] or \[SOL], which represent a one-sided pool to either [buy NFTs](/providing-liquidity-how-does-it-work/buy-nfts.md) or [sell NFTs](/providing-liquidity-how-does-it-work/sell-nfts.md)!

### Bonding curves, or how does the price behave

hadeswap currently allows liquidity providers to pick between two types of bonding curve: <mark style="color:blue;">linear</mark> and <mark style="color:blue;">exponential</mark> curves.

They behave differently in how the price adjusts when an asset (\[NFTs] or \[SOL]) is bought from or sold to a pool.

### Linear curve

With a linear curve, the price of an NFT is increased by a flat amount (<mark style="color:blue;">delta</mark>) every time an NFT is bought from the pool. In the same fashion, the price of an NFT decreases by that same <mark style="color:blue;">delta</mark> every time an NFT is sold to the pool.

{% hint style="info" %}
Example:

A liquidity provider sets up a pool with a <mark style="color:blue;">spot price</mark> *(=the starting price of the pool)* of 10 SOL and a <mark style="color:blue;">delta</mark> of 1 SOL.

Assuming enough liquidity is provided, the price of an NFT will increase to 11 SOL after an NFT is purchased from the pool. After a second purchase, the price will increase to 12 SOL, and so on and so forth. If at any point a sale occurs, the price of the pool will decrease by 1 SOL.
{% endhint %}

### Exponential curve

With an exponential curve, the price of an NFT is increased by a certain percentage (also called <mark style="color:blue;">delta</mark>) every time an NFT is bought from the pool. In the same fashion, the price of an NFT decreases equivalently every time an NFT is sold to the pool.

To calculate the decrease, convert the percentage to a decimal index (e.g. for 25%, the index would be 1.25) and divide the price by this number.

{% hint style="info" %}
Example:

A liquidity provider sets up a pool with a <mark style="color:blue;">spot price</mark> *(=the starting price of the pool)* of 10 SOL and a <mark style="color:blue;">delta</mark> of 25%.

Assuming enough liquidity is provided, the price of an NFT will increase to 12.5 SOL after an NFT is purchased from the pool (10 + (10\*25%)). After a second purchase, the price will increase to 15.625 (12.5 + (12.5\*25%) SOL, and so on and so forth. If at any point a sale occurs, the price of the pool will be divided by 1.25.
{% endhint %}

Now that you know exactly what a liquidity pool is and how bonding curves work, you're good to go to start your very own liquidity pool!

Are you interested in buying NFTs, selling NFTs or doing both at the same time to earn from the generated fees? Then keep on reading!


---

# 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://docs.hadeswap.com/providing-liquidity-how-does-it-work/liquidity-pools-and-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.
