# Bins

In Shape Liquidity, we use bins to divide up the price into bins that can contain tokens from the pair. When a pool is created, the bin size is fixed for that pair. Bin sizes can be as big as you like or as small as 1 which is \~0.10% wide<br>

<figure><img src="https://2889101437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNlgl7ttywm5Xh8uj9vm%2Fuploads%2F0gWaVyFrmgbsW5VXcIhS%2Fimage.png?alt=media&#x26;token=a57f6626-7126-441c-9316-7c6ea1d4699f" alt=""><figcaption><p>Basic bin concept</p></figcaption></figure>

## Bin Size to Percentage

We use bin size to define how wide all the bins are in the pool.&#x20;

A Bin size of 1 means each bin is roughly \~0.10% wide, Bin Size of 2 means \~0.20% wide and so on.. 10 = \~1.00% wide, bin size of 100 = \~10.00%&#x20;

## What Bin Size should I pick for my pair?

Here are some guidelines:

* Different bin sizes determine how concentrated the liquidity is in a pool.
* A good default Bin Size = 20-50 (2 - 5% wide).
* Typically bin size should mirror how volatile the pair is.
* If the price of your pair of tokens is relatively stable (low volatility) then we suggest picking a low number like 1-10. Example low volatility pairs:&#x20;
  * LSU\_A vs LSU\_B
  * XRD vs LSU
  * FLOOP\_Mainnet vs FLOOP\_Babylon  etc
* If the price of your pair of tokens moves around a lot (high volatility) then we suggest picking a larger bin size like 50-100. Examples of high volatility pairs:
  * Meme tokens
  * Highly speculative tokens or those you anticipate could move a lot

## Tokens in Bins

Imagine we have a pair **TokenA vs TokenB**

* All the bins *above* the active bin can only contain TokenA
* The bin that contains the current spot we call the *active bin.* This bin could have a mix of both tokens A and B
* All the bins *below* the active bin can only contain TokenB

Let's say the current **price** is 1 TokenA = 4.850 Token B and the **Bin Size** = 10 (so 1% wide bins)

Here's a bin diagram:

<figure><img src="https://2889101437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNlgl7ttywm5Xh8uj9vm%2Fuploads%2FLTCtdJaNbLboaQGwH0l8%2Fimage.png?alt=media&#x26;token=bfea01e1-1378-48c0-b768-a62e5ab2970a" alt=""><figcaption></figcaption></figure>

## Are tokens in every bin?

Tokens are only in bins that liquidity providers have put them in! Otherwise the bins are empty and serve no purpose.\
\
Here's a real example of the liquidity bins in the CAVIAR/XRD pool which has a Bin Size = 20, which means each bin is 2.00% apart. (you can verify in the diagram!)

<div data-full-width="true"><figure><img src="https://2889101437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHNlgl7ttywm5Xh8uj9vm%2Fuploads%2FK2K9t0OBtpVZqODlgNKK%2Fimage.png?alt=media&#x26;token=1a94fc11-db7a-4405-a43e-8070bec586ac" alt=""><figcaption></figcaption></figure></div>

Some things we can infer from this:

* All the Bins (or bars here) to the RIGHT of the spot price will ONLY hold CAVIAR tokens
* All the Bins to the LEFT of the spot price bin will ONLY hold XRD tokens
* Looking at the shape, liquidity providers have concentrated their tokens (XRD and CAVIAR) around \~0.2400
* Also it's quite concentrated in this pool in the 0.20 - 0.28 range then afterwards there is a lot less tokens on either side
