How does being a LP work?

Good to know: A LP is a liquidity provider. LPs are users that provide their assets to the protocol to be utilized by traders who want to perform swaps and open/close perpetual futures positions.

The Pool

On TsunamiX, a market, and its tradable assets, are held in a pool of assets called TLP - or TsunamiX Liquidity Pool.

Unlike traditional AMM liquidity pools which contain only two tokens (of which one is stable and one is volatile), TLP contains a diversified index of blue-chip volatile & stable assets.

In a pool like TLP, arbitrary assets with arbitrary weights are defined ahead of time and updated based on market conditions or manual intervention. This pool will also target roughly equal weights of stable and volatile assets - but it will be diversified in the types of stable and volatile assets it holds within the pool based on relative liquidity depth and other risk factors.

Let's take an example where TsunamiX starts with a pool of BTC, ETH, and USDC.

  • We set the pool's target weights to be 25% BTC, 25% ETH, and 50% USDC.

  • Let's assume the price of BTC is $100 USD, ETH is $50 USD, and USDC is $1.

  • TsunamiX would then instantiate the pool with:

    • 1 unit of BTC ($100)

    • 2 units of ETH ($100)

    • 200 units of USDC ($200)

By doing so, we are ensuring the actual weights of the pool at the time of intantiazion is equivalent to the target weights of 25/25/50.

Another important thing to note about the TLP basket is that it does not use price curves similar to other AMMs, which essentially define the price of one asset as the ratio of two assets in the pool. Instead, TsunamiX uses Pyth price oracles to get real-time price feeds from centralized exchanges, on which it executes orders.

Oracles allow TsunamiX to offer 0% price impact regardless of trade size but require the assets we support to have deep liquidity on centralized exchanges in order to prevent manipulative trading that hurts the TLP pool.

Swaps

When a user swaps an asset, TsunamiX uses price oracles to look up the price of the asset the user wants to swap from and the price of the asset the user wants to swap to.

Then the protocol determines the deltas of the weights of the two assets being traded.

This is important because TsunamiX punishes traders who move the actual weights away from the target weights with additional fees and rewards traders who move assets toward the target weights with reduced fees.

TsunamiX calculates the change in the actual weight of the from asset and the change in the actual weight of the to asset that would result from the transaction. Once the protocol has the two weight deltas, the protocol then takes the delta that impacts the protocol worse and uses that worse delta to determine the spread fee to charge to a trader.

Returning to the original basic TLP example above,

Let's say a trader wanted to swap from 100 USDC to 2 ETH (~$100)

  • User is depositing 100 USDC into TLP & withdrawing 2 ETH

  • This would cause the USDC weight to increase, and ETH weight to decrease

    • USDC weight would go from 50% to 75%

    • ETH weight would go from 25% to 0%

  • TsunamiX charges a spread fee based on the weights being pulled away from it's targets in order to disincentivize this trade & preserve the balance of the pool.

  • Trader decides to pay spread fee and new weights are now:

    • 25% BTC, 0% ETH, 75% USDC

  • TsunamiX would then automatically offer near 0 swap fees for users looking to trade ETH to USDC - since it would bring the pool back to it's targets.

Note that this example does not account for margin trading liquidity, rather it is simply meant to highlight the ways in which the pool adjusts its incentives and creates arb opportunities in order to maintain its target weights over time.

Depositing And Withdrawing

We use the nomenclature of minting to represent depositing assets into a pool and receiving an LP token as a result. Similarly, we use the nomenclature of burning to represent returning an LP token to the protocol and redeeming an asset, of the redeemer's choice, from the liquidity pool.

When you mint LP tokens, you can do so by providing a whitelisted asset to the pool; however, keep in mind that minting and burning both function similarly to a swap. When you mint/burn LP tokens, you will affect the actual weights in the pool.

Ex: A pool has both target and actual weights of 50% WBTC, 50% USDC. An LP decides to mint LP tokens by providing a lot of WBTC and shifts the actual weights to say 90% WBTC, 10% USDC, they will incur a spread of close to 60 basis points.

If one were to burn LP tokens at this point and take USDC out of the pool, moving the distribution to 95% WBTC, 5% USDC in the process, they would experience a spread of even closer to 60 basis points as they take such an action.

Charging a spread fee to a minter/burner of LP tokens is incredibly important as minting or burning TLP is essentially synonymous with a swap.

Risks

As an LP, you are betting that traders lose more often than they win. Fortunately, this is historically correct to assume over the long run. The odds of traders losing when you take the funding rate and position fees into account is even higher.

The value of LP tokens in a given pool should reflect the market price for crypto assets within that pool with dampened volatility. This dampened volatility comes from the fact that the pool is comprised of half stables and half native crypto assets.

If the pool of assets does have any unoccupied amount of a particular asset, traders cannot swap to that asset, nor can they take out leveraged positions with that asset.

Inflows to the value of LP tokens come as traders lose, not including fees. Fees are paid out separately to LP tokens in the form of liquid MNT. All fees are converted in kind to MNT and can be claimed at any point in time from a TsunamiX vault contract that stores MNT.

LP Risk Scenario #1

If an unhealthy position isn't liquidated in time and the collateral cannot cover the loss from the position, the LPs would eat the loss collectively.

LP Risk Scenario #2

Ex: If there is a large sudden market upswing, long traders will be in profit, and since most traders go long, the LPs will experience an unrealized loss in such a moment.

LP Risk Scenario #3

Ex: There is a smart contract exploit that occurs in one of the money markets that TsunamiX uses to generate excess yield for LPs.

LP Risk Scenario #4

Ex: TsunamiX is unable to accurately quote prices to traders and traders are able to make a risk-free profit at the expense of LPs.

Last updated