Inside the Pool #1
Published in
1 min readAug 10, 2022
Problem statement and Key Features
Problem statement
Each liquidity management strategy has a set of parameters that must be chosen, such as:
- Amount of input liquidity.
- Number of positions.
- Distribution of concentrated liquidity between positions.
- Criteria of position rebalancing, etc.
Selection of optimal values for all parameters is a challenging task. One of widely used approaches to solving it is backtesting, i.e., evaluating a given set of parameters on historical data. Such evaluation can be done using Uniswap V3 evaluator that uses math, described in the Uniswap whitepaper for evaluating strategy’s profits.
Key Features
- Assessment of each strategy’s profits on for each position and the overall profit for all positions, including rebalancing.
- Support for arbitrary tokens and concentrated liquidity amounts.
- Calculation of earnings, fees and other strategies’ parameters according to Uniswap math and price information, derived directly from the blockchain.
- Support for the calculation for arbitrary data parts using the built-in SQL engine.
- The possibility to set independent parameters for each position, including rebalancing criteria.
- Taking into account resistance and support levels.