Note: The original article was written by di0nix!

In this article, we will take a look at a new feature related to liquidity pools launched by Alcor: centralized liquidity. In simple terms, centralized liquidity allows liquidity providers to deploy their funds within a certain price range, thereby improving the efficiency of capital utilization. In this article, we will take a detailed look at what centralized liquidity is and how it works.

Say hello to our best ally: the Liquidity/Exchange Ratio Chart!

All my explanations will be based on this diagram. Once you understand this diagram, everything becomes simple! Let's start with a specific example: suppose we create a liquidity pool containing 24 WAXP and 12 EOS. The "exchange ratio" (token_ratio) represents the ratio of the number of these two tokens, which is 24:12, equal to 2.

图片

If someone wants to exchange now, giving 2 WAXP will get about 1 EOS, and vice versa (*). If another person wants to use WAXP to exchange EOS, to get 1 EOS, he will need to give 2.4 WAXP instead of 2! Why? Because after the first exchange, the exchange ratio of the liquidity pool changed from 2 to 2.4!

(*) In fact, giving 2 WAXP will receive 0.923 EOS. Remember that the product of the number of tokens before and after the swap must remain the same (24x12=288), so the number of EOS that must be kept in the pool is 288:26=11.077. Since the number of EOS before the swap was 12, the EOS received after the swap is 12-11.077=0.923!

图片

In the first exchange, to get 1 EOS, the required WAXP is 2.2, and the final exchange ratio is 2.4; in the second exchange, to get 1 EOS, the required WAXP is 2.6, and the final exchange ratio is 2.9; in the third exchange, to get 1 EOS, the required WAXP is 3.2, and the final exchange ratio is 3.6; in the fourth exchange, to get 1 EOS, the required WAXP is 4.0, and the final exchange ratio is 4.5; in the fifth exchange, to get 1 EOS, the required WAXP is 5.1, and the final exchange ratio is 5.9... As you can see, the more EOS lost in the pool, the more WAXP is needed to get 1 EOS.

With that in mind, we can now move on to the swap ratio/liquidity chart. Remember, you create the liquidity pool, so let’s say you sell your first EOS for 2.2 WAXP, your second EOS for 2.6 WAXP, your third EOS for 3.2 WAXP, your fourth EOS for 4.0 WAXP, and your fifth EOS for 5.1 WAXP. After the first EOS is sold, the swap ratio will be 2.4, after the second EOS is sold, the swap ratio will be 2.9, then 3.6, 4.5, and 5.9, as shown below:

图片

However, the above graph does not give an intuitive understanding of the situation: each rectangle is worth 1 EOS, but the area of ​​each rectangle is different! Then we can draw a slightly different graph, composed of straight and curved lines, each of which has the same area (as shown below):

图片

If someone uses the pool and wants to exchange EOS for WAXP, initially 1 EOS can be exchanged for 2 WAXP (meaning the liquidity pool will lose 2 WAXP), and then more and more, for the same reason as before; this is what will happen:

图片

If the exchange ratio increases, the liquidity pool loses EOS and gains WAXP; if the exchange ratio decreases, the liquidity pool loses WAXP and gains EOS.

The biggest weakness of traditional liquidity pools: most assets will be gathered into dust!

Yes! Let’s take a common example to understand why. Let’s assume that 1 WAXP is worth $0.30 and 1 EOS is worth $0.60: using an exchange, we can exchange 2 WAXP for 1 EOS and vice versa. In our liquidity pool, the exchange ratio is also 2 (2 WAXP for 1 EOS). In this case, there may be few people using our pool to exchange. But if the price of WAXP suddenly rises to $0.60, and the price of EOS remains at $0.60, then many people will use our pool because the first exchangers can exchange 1 EOS for 2 WAXP! How long will this situation last? Maybe until the exchange ratio is 1, that is, 1 EOS for 1 WAXP. Isn’t it great? But it is not.

图片

If you remember, we had 24 WAXP in our pool, and even though the price of WAXP went from $0.30 to $0.60, only 7 WAXP were exchanged, less than 30%. Unfortunately, the fees we charge are proportional to this 30%! What about the remaining 70%? It's been sealed away, as if it never existed!

Pooled Liquidity: Choose the scope where all assets will be available!

Compared to traditional liquidity pools, centralized liquidity pools are very simple. In short, you only need to set a maximum swap ratio and a minimum swap ratio for the liquidity pool! If the swap ratio is within this range, the liquidity pool will be fully converted to WAXP or EOS and will be 100% used! Below are 4 charts, one traditional liquidity pool and 3 centralized liquidity pools with different ranges:

图片

You can choose your desired swap ratio range without any restrictions, so you can independently choose in which range the pool will provide liquidity!

Open multiple positions? Of course you can!

Of course, you can also open multiple positions at the same time. For example, set a large position with a swap ratio range of 1-3, and a small position with a swap ratio range of 1.5-2.5. Others can open liquidity pools with different ranges than yours, but use the same asset pairs as you (WAXP and EOS in the example), and these will all be part of the same pool. To make it easier to understand, I use rectangles to represent these positions separately, and then combine them into the same chart.

图片

Therefore, liquidity pools using centralized liquidity look a bit like castles: they are a combination of positions of all liquidity providers, each with its two ends and total liquidity. Pros and cons of centralized liquidity Here are the pros and cons of centralized liquidity, I believe everyone will be interested. Pros:

  • Assets can be fully utilized and greater returns can be achieved for the same assets in the pool, especially by carefully choosing the future fluctuation range of the exchange ratio.

  • There are great advantages to using a centralized liquidity pool for swapping: because liquidity is centralized, even if you swap a large number of assets, the swap ratio will not change much (much less than a traditional pool). As the creator of the centralized liquidity pool, you will still get your fees, and others will be able to swap more assets at the current swap ratio!

  • You can provide liquidity for your project within the range you wish, choosing the maximum and minimum exchange value

shortcoming

  • Impermanent loss! If the swap ratio quickly exceeds the two extremes you choose, then you will suffer a loss for providing liquidity! Impermanent loss is the difference between the value of the assets that a liquidity provider has in the liquidity pool and the value of simply holding those assets.

Good luck to everyone in providing (pooled) liquidity!

*Friendly reminder: This article is for popular science purposes only and does not constitute any investment advice!