DefiLab Uniswap V3 Simulator: The Playground

Defi Lab
3 min readMay 3, 2021

--

The simulation tool we designed here at Defi-Lab.xyz is divided in two sections.

The first section, that was discussed in this previous post, is called the classroom and it shows the performance of Uniswap V3 versus different strategies from a strict mathematical point of view.

The second section is called the playground and allows to make several hypothesis on how the market will behave and determine how any given Uniswap V3 strategy performs in these conditions, including a precise calculation of the fees to be collected.

The forecast performed by the tool is dependent on the input parameters entered and are strictly based on the subjective view of how the market will perform in the period analysed.

The results of the simulation should not be viewed as an investment advice from defi-lab.xyz.

The Playground

Selection Criteria:

As base of the analysis we need to define the initial investment, the token pair to be analysed and the price range of the Uniswap V3 strategies to study.

In addition to these basics specifications we need to make hypothesis regarding the market behaviour in the period that we plan to invest for.

Specify your forecasted parameters in this section

As we can see in the above picture the following data are required:

  • Holding days = Number of days we plan to invest for.
  • Forecasted price at the end of the period = price of the token at the end of the period
  • Number of days spent in price range of strategy 1 (in %) = percentage of time spent between the lower and the higher price bound in the holding period.
  • Number of days spent in price range of strategy 2 (in %) = percentage of time spent between the lower and the higher price bound in the holding period.
  • Uniswap V2 fee APR = base percentage fee earned in V2 pool. Fees are dependent on Trading volume and liquidity provided for a specific liquidity pool. this value varies from pool to pool and could be different in different days, however some websites provide historical values based on Uniswap V2 (example apy.vision)

Charts:

Asset value including estimated fees at end of holding period for different forecasted prices

The main chart shows the estimated value of your investment (including fees) at the end of the holding period at different price levels for the different selected Strategies.

The following charts compare the two Uniswap V3 strategies with the selected comparison strategies, determining the extra profit or loss (including estimated fees) for each price level .

Performance of Uniswap V3 Strategy vs other selected strategy

These charts can be used to analyse the effect of the “impermanent loss”. These charts highlight the effect of fees to offset the extra risk taken concentrating liquidity between a certain price range.

--

--

Defi Lab
Defi Lab

Written by Defi Lab

Test your Uniswap V3 strategies with our strategy simulator at htts://defi-lab.xyz

Responses (2)