Back in February, our Grants Committee approved Component for a grant to build a simulation tool for liquidity positions on Perp v2. Following the launch of Component’s yield token compounding for Element Finance, the beta is now live for PerpSim and the team are currently seeking feedback for their second product.
Are you interested in building on top of Perpetual Protocol? Get started now by filling out the grants application form or by checking out the new requests for proposals!
PerpSim is a simulation tool for Perp v2 that was created to help DeFi investors make data-driven decisions by backtesting and visualizing their liquidity positions. The tool is currently in beta and helps level the playing field by crunching all the relevant data and presenting it in an easy-to-understand way for liquidity providers (LPs).
In this guide, we will provide a walkthrough and give you an overview of the various features offered by PerpSim, including backtesting, providing liquidity and managing positions.
As you’ll see when you head over to PerpSim and connect your wallet, the interface serves as a companion to Perp’s official UI. You can deposit funds, create new liquidity positions, and claim Pool Party rewards directly from this alternative frontend dedicated to LPs.
Let’s look at how LPs can benefit from the features offered by PerpSim.
For users with existing liquidity positions, they can see whether they are in range and the predicted fees they can expect to earn with PerpSim. Additional information about existing liquidity positions will soon include the current impermanent loss as well as any fees and rewards earned.
New liquidity positions can be opened by simulating a position and then clicking on the Add Liquidity (highlighted below). When opening a new position, it shows the liquidation price to help LPs judge their risk level more accurately.
Note that to use PerpSim to enter liquidity positions, you’ll need to sign a one-off delegate approval transaction, which allows the app to provide liquidity on your behalf.
To start backtesting liquidity positions on Perp v2 and estimate the profitability of LP’ing based on historical data, select a price range by dragging the orange and yellow sliders or using the price min/max fields on the top right-hand side.
The chart to the top also displays the liquidity profile of the market in blue, indicating the market depth at each price point and how concentrated the liquidity is.
After setting a price range, enter the number of tokens for your liquidity position or use the total investment amount field. The percentage of your buying power used, the level of leverage and your position’s liquidation price will then be displayed, as shown below:
Once you’ve specified your position, PerpSim calculates the LP’s return on investment (ROI), annual percentage return (APR), as well as other important metrics like impermanent loss and max drawdown. These metrics are shown by the historic backtesting table for various time ranges, which can be changed via the dropdown menu.
The table above shows what the example liquidity position would have earned over different time ranges. For the past month of data, the position would have earned $84.25 in fees and $97.76 in Perp rewards*, with a near 100% time in range and a maximum drawdown of $164.77.
*Note that the amount displayed for ‘Perp Rewards’ assumes the tokens were sold immediately once they become claimable every week.
PerpSim will also add simulations for liquidity positions around one week after the beta launch. Users will see how their positions are expected to perform in the future based on a stochastic motion, displaying the predicted ROI, APR, fees earned and Perp rewards.
The simulations will display volatility and drift for each asset, where you can enable the drift function to forecast whether the asset’s future price will appreciate or depreciate, depending on its recent behavior.
Here’s a sneak peek of what this upcoming feature will look like:
The green and orange horizontal lines represent the user's position on the candlestick chart, serving as an easy way to visualize how recent price movement might have brought their position in or out of range and how that movement may have affected impermanent loss.
There are also two curved lines that are the expected upward (green) or downward (red) price movements based on Brownian motion derived from the asset’s volatility and drift, where the likelihood that the position remains within these bounds is 66%.
Component’s latest release (which will eventually be open sourced) means that LPs no longer need to calculate the math by themselves and can benefit from a tool that shows all the important metrics they care about in one place!
Try the PerpSim beta now to manage and visualize your liquidity positions all within a familiar interface that Perp users already know and love. The Component team is also seeking feedback from LPs, which you can submit via our Discord server.