These are the containers that hold all the tokens in the AMM for this pair!

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

Bin Size to Percentage

We use bin size to define how wide all the bins are in the pool.

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%

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:

    • 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:

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!)

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

Last updated