Comment on page

Advanced LP

Learn how LPs can provide liquidity with up to 50x leverage.
Advanced Perennial LPs may choose to LP directly into markets, rather than using the vault product that Perennial Labs has built on top of the protocol. This can be beneficial for the following reasons:
When providing liquidity directly to the markets you are able to be more efficient with your collateral by using leverage. Instead of making with X units of collateral, you can use leverage to multiply that amount. This nets an LP more fees & interest than LP'ing without leverage. However, this comes with liquidation risks. For professional LPs its relatively simple to ensure that you are hedged by watching the markets and rebalancing your collateral between venues as needed.
Lower "At-Risk" Collateral A side effect of LP'ing with leverage is that there is less "capital at risk" in the protocol's contracts. In the event of a bug/hack there is less collateral exposed to the issue than LP'ing without leverage.

Risk Management

When LPing with leverage extra care needs to be taken to ensure your position isn't liquidated. Normally, advanced makers will use external systems to monitor their position to calculate their exposure & the health of their leveraged LP.
Included in Perennial's Typescript SDK we have a number of helper functions that can do the heavy lifting when it comes to fetching and understanding your position. We also have an example script that can help you get started quickly. Once you have this data you're able to setup strategies to monitor and react to market changes.

Position Settlement & Hedging

Professional LPs will usually try to hedge their exposure when making a market. In Perennial's markets, a maker's exposure can change significantly within the space of 15seconds due to high leverage and fast settlement. So its crucial that makers have an understanding of settlement within the a given Perennial market. See the Settlement section for more info.
Practically there are two ways to approach hedging: Track every position change on a market by watching the Updated() event and reacting to those resulting changes, or waiting for the next settled market state, signified by PositionProcessed, before hedging.
The first option allows for a exposure to be calculated in "realtime" and gives the maker the opportunity to hedge as positions are submitted. The caveat here is that there are uncommon scenarios where the entire epoch is invalid, then the position changes are nullified and will need to be submitted again. To ensure settlement is achieved a maker can watch for PositionProcessed event.
The second option is to delay until the next market state is settled. This means the maker may have unhedged exposure for 10-20 seconds but they can be confident that the position changes have been finalized.

How to be an Advanced LP

Via the UI:
Using app you can use the Make page to configure your Advanced LP position.
Via the Contracts:
The other option is to write a contract or an integration to create your leveraged Maker position. The leveraged maker position is functionally similar to a long or short order, in that you have collateral and you are able to specify your position size. From there its up to you to calculate the liquidation range & maintain you enough collateral. See the Contract Integration section for more information on how to create orders.