Presenting the Initiator

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:

  1. Give an accurate measure of the amount of fees we’d capture with any position based on a specific set of parameters, along with any loss incurred by price divergence
  2. Show volume and liquidity trends for the explored asset pairs
  3. Be blazing fast.

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

Diving In

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:

  1. Technique #1 relies on periodic pool snapshot data, such as that provided by the Uniswap v3's subgraph poolHourData entities. This technique is fairly accurate, though the accuracy will be correlated with the proportion of time that a position would have been in range given its selected price ranges. It also has the advantage of being pretty fast. It’s used by the great Uniswap v3 simulator by DeFi labs, and you can find out more about it here.
  2. Technique #2, used by ranges.fi and described by JNP, uses each individual swap executed within the backtesting period to simulate the proportional fees accrued. The results are of course very accurate, but the technique requires downloading a great amount of swaps for high volume pools, making it a much slower option between the two.

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:

  • Created in the last 30 days
  • Only have one deposit
  • Have zero withdrawals
  • Have been open for more than 48 hours
  • Stayed in range over 51% of the time since created

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.

Subscribe to Revert
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.