Price Impact; 10,000 BAL

Two examples of calculating price impact with the incorporation of swap fees in single asset deposit scenarios.

Now let’s assume we are depositing into the BAL/WETH 80/20 Pool with 10,000 BAL and no WETH. We will be charged swap fees on the portion of our investment which is “off-balance”. In this case 20% of our pool is not in the form of BAL, therefore that is the taxed portion. As referenced from the trading with swap fees section.

The calculation follows as:

The current pool traits are as follows:

  • Swap fee: 0.05%

  • BAL: 5,691,640

  • WETH: 6,194.1921

  • BPT: 2,891,789.44800306

Using the known amount for A(t) we can calculate the amount of pool tokens we will be issued for this deposit.\

We can see on the user interface completing this transaction will yield a price impact of 0.03% (0.18% for the larger interaction). What exactly does this mean for an investor? Well in short from price impact for trading we can note that the ratio between assets change as supply and demand shifts during an exchange. In this case we are essentially exchanging BAL for Pool tokens and in doing so Pool tokens are becoming more expensive in reference to BAL. This is a bit more complex than comparing prices of individual assets in a pool, but we will focus on the current example to start. The spot price of a pool token and effective price of a pool token are the variables we need to calculate to determine our price impact from an investment.

Pool token spot price (Assume A(t) = 1 BAL):

Next, we must calculate the ratio of the pool’s invariant before and after the exchange of 10,000 BAL.

Using the invariant ratio, we can determine the new total number of pool tokens and in the same stroke, calculate the amount of pool tokens which we received for the exchange.

Knowing the amount of BAL, we needed to invest and the pool tokens we received in exchange we can determine the effective price of a pool token to compare with our spot price:

Last updated