5. Effective Price Calculation
The Effective Price is NOT the current price or the price applied to the ongoing transaction. This price reflects the effect of the current transaction on the liquidity pool, showing how the pool's token volumes and weights have adjusted post-trade. Traders should not confuse the effective price with the rate they are paying during the swap; it is an indication of the price after the swap, used for understanding how the transaction will affect future trades.
5.1. Mathematical Foundations
The effective price is influenced by the token volume in the pool. Each transaction by Project Backers, where a TokenTraded is exchanged for a TokenAnchor, drives up the price of the TokenTraded. As a result, the effective price is highly sensitive to ongoing trading activity within the pool.
5.1.1 Standard Formula
Where
: Effective price of in terms of .
: Amount of being received from the pool.
: Amount of being input into the pool.
ā : Current volume of in the pool before the transaction.
ā : Current volume of in the pool before the transaction.
ā : Current weight of in the pool.
ā : Current weight of TokenAnchor in the pool.
This formula provides the real-time price at which can be bought or sold in terms of immediately after the transaction.
After each transaction, the LBP system recalculates the effective price using the most recent data on token volumes and weights. This ensures that the price reflects the current market conditions, providing transparency and fairness in trading.
The effective price calculation assumes that the trade size is small relative to the pool's total liquidity . As approaches a significant fraction of the pool's liquidity, the ratio becomes larger, and the effective price can deviate substantially from the spot price, leading to a non-linear increase in slippage and a corresponding reduction in the effective price.
5.1.2 Alternative Formula
Alternatively, the effective price of can be calculated by considering the ratio of to . This highlights the exponential nature of the function, which is influenced by the ratio of weights .
Where
: Ratio of to =
: Ratio of to =
: Ratio of to =
Due to the exponential relationship between effective price and the ratio n, the range of possible maximum effective prices for a typical LBP can be illustrated as follows:

5.2. Slippage and Its Impact on Effective Price
In an LBP, slippage is influenced by several factors, including the size of the trade relative to the pool's liquidity, the current token weights, and the dynamic adjustment of these weights. Larger trades tend to cause more significant changes in the pool's balance, leading to higher slippage.
A positive slippage value indicates that the trader received less of the output token than expected (or paid more for the input token).
5.2.1 Standard Formula
Slippage can be calculated as the percentage difference between the (the price before the trade) and the (the price after the trade):
5.2.2 Alternative Formula
Alternatively, slippage can be calculated by considering the ratio of to . This emphasizes the exponential nature of the function, which is influenced by the ratio of weights . This also highlights that higher liquidity (larger ) reduces the impact of individual trades on price, thereby minimizing slippage and contributing to the overall stability and fairness of the LBP.
Where
: Ratio of to =
: Ratio of to =
Due to the exponential relationship between slippage and the ratio , the range of possible maximum slippage can be expressed as follows:

Last updated