At Revert we’re focused on building actionable analytics for liquidity providers in AMM protocols.
We started out by building detailed feeds for existing LP positions. As LPs ourselves, we were in need of a proper way to track the performance of our positions against the originally invested assets, including rewards accrued by participating in the then incipient LP agricultural industry. In turn we built a dashboard to track these positions along with various analytics for the pools themselves. We believe these tools have helped Revert’s users make better, more informed decisions about their investments.
A Uniswap v3 position on Polygon
Today we’re excited to release the Initiator, our first tool that helps users initiate LP positions.
As the AMM landscape has evolved with the release of Uniswap V3, so too have the information needs of most LPs. Opening positions on concentrated liquidity AMMs requires making important decisions about price ranges, which can be greatly aided with historical data and analysis. Fees are a function of volume, time in range- and the amount of liquidity for a position and the rest of the pool. Where liquidity depends on the amount of capital and the concentration of said capital within a certain price range. All this is to say that running simulations on historical data can help us gain invaluable insights on how the captured fees may change based on the price range that LP selects.
initiatooooooooooor
When we set out to build the Initiator, we knew that we wanted it do to three things:
The main feature included the ability to tweak the different parameters a position is composed of, and receive immediate feedback on the effects, as well as being able to quickly switch between different fee tiers for any pair, or switch to a different pair and network altogether.
Backtesting before initiating
The end goal for the initiator is to build an an advanced interface for initiating positions across all AMM protocols; backtesting for uniswap v3 positions and pool metrics are just a start. We would love it if you’d give it a try and jump on our Discord with feedback! https://revert.finance/#/initiator
Although our tools are focused at advanced AMM users, it is worth reminding that backtesting can give us an accurate prediction of a position’s past performance, but it is no guarantee of future results.
Additionally, past price movements for the asset pair and selected range can give you a good idea of the “divergence loss” that the position would have incurred for that period, but — again — can not tell us of how the prices will move going forward.
With regards to “divergence loss”, an important not is that we let you choose between “HODL” (which refers to the originally invested assets) or either of the token values to benchmark the positions’s performance against. That is to say, perhaps you care about your PNL in terms of holding ETH instead of both assets; in that case, you can select “ETH” as your reference value. This came about after several user interviews in which we have learned that benchmarking against holding both assets outside of the pool — which is the industry standard- only covers a subset of different strategies used by LPs.
With the presentations out of the way, let’s talk about how the backtester works.
The first thing to thing to mention is that we’ve published the backtester code as a ClojureScript library under the MIT license.
There are currently at least two techniques that we know of for backtesting Uniswap v3 LP positions:
Given that speed requirements for this tool (as mentioned above), we ended up using technique #1 in the Initiator. After implementation, we tested our backtesting accuracy against a set of 1939 open Uniswap v3 positions on mainnet that match the following criteria:
We have found the backtest results to be very accurate when comparing against the actual performance of these positions — as shown below with most of our predictions sitting between 90% and 110% of the actual fees captured by each position.
There’s a few outlier positions with 100% of the time in range that seem to have relatively low accuracy compared to the rest of the set — this is, however, a visual effect given the concentration of positions at 100% in range. Below, we can see a histogram of the same accuracy metric: fees predicted / actual fees, but only considering positions that have been in range 100% of the time.
We are super excited about finally being able to release our initiator and look forward to learning how LPs make the most out of it. The Initiator itself is initiating, suggestions are greatly appreciated, and we will continue to iterate on the tool based on community feedback.