Lifinity v2: DNMM Delta Neutral Market Maker

Published on: 29.09.2022
Lifinity v2: DNMM

Lifinity v2: DNMM Introducing the Delta Neutral Market Maker

Lifinity v2: DNMM Despite the bear market since our veIDO, Lifinity has to date facilitated over $1B in total volume without any liquidity mining, all while generating a profit that has been distributed to token holders and used to buy back tokens. Never satisfied with our current earnings, the Lifinity team has continued searching for ways to improve our profitability.

Today we are pleased to announce Lifinity v2 — a major upgrade to Lifinity’s market making algorithm with wide-reaching benefits!

Before we examine this next step in Lifinity’s evolution, let’s consider Lifinity’s overarching goals, how v1 has performed in the current landscape, and the challenges we encountered that have incited the development of v2.

Lifinity aims to maximize the profit it generates from market making. This translates into maximizing trading fees and market making profit (MMP) simultaneously. This is a difficult multivariate optimization problem in which changes to improve one can negatively affect the other, and the causal relationships are not obvious since they can be obfuscated by confounding variables such as the fluctuations in volume or the luck of a trade’s timing.

Due to DEX’s capital efficiency, they have always fared well in terms of trading fees. MMP was also a valuable source of profit in Lifinity’s first few months, but it is now approximately breakeven. While it is impossible to pinpoint the exact reasons for the change in our MMP. They believe a major contributor is an increase in the number and aggressiveness of arbitrageurs on Solana. The pools now revert to a 50/50 balance much more quickly than they used to even during periods of high volatility, making it more difficult to delay rebalancing and avoid IL.

This has motivated us to develop a more resilient market making algorithm and make our MMP positive again. The improvements we made have additional benefits that enable Lifinity to better control the protocol’s exposure to the price of assets and expand the set of trading pairs that it can profitably provide liquidity for.

Currently, the pools aim to rebalance their reserve ratios to 50/50. A consequence of this is that the amounts of each asset that balance a pool evenly depends on their prices. Consider a perfectly balanced SOL-USDC pool containing $1M worth of assets. USDC is pegged to $1, so the pool will contain 500k USDC. But the amount of SOL in the pool will depend on its price. The pool will contain 5k SOL if SOL is worth $100, while it will contain only 2.5k SOL if SOL is worth $200. Thus, as the price of SOL changes, the pool will target a different amount of SOL.

Incidentally, this can be viewed as the reason why pools incur IL. IL is any loss resulting from buying and selling compared to when the assets are instead just held. As the price of assets change, the pool changes the amount of them that it holds relative to when they were first deposited. In particular, AMMs generally buy assets as they become less valuable and sell assets as they become more valuable, both of which are unfavorable for liquidity providers (LPs).

The delta neutral market maker (DNMM) looks to disrupt this dynamic by altering the rebalancing target. Instead of targeting a particular ratio between a pool’s two assets, the DNMM targets the initially deposited amount of the base asset (as if we had just held the asset). When the price changes by a predetermined amount (e.g. 5%), the target amount of the base asset is updated and the pool rebalances to a 50/50 ratio at the new price.

The key difference in v2 is that the rebalancing target is independent of asset prices until a rebalancing event. Instead of rebalancing to a 50/50 ratio for every little change in price (as we currently do), the DNMM allows us to delay rebalancing rather than be at the whim of the oracle and arbitrageurs. In practice, this will mean that the protocol is continually converting the base asset (SOL, BTC, ETH, etc.) obtained from fees to the quote asset (USDC, USDT, UXD, etc.).

Rebalancing is essentially a profit-taking or dip-buying event. The frequency with which we rebalance (i.e. the size of the price change that triggers a rebalancing event) will affect a pool’s MMP, so this will be a parameter that we need to optimize for each pool. The aim is to harvest volatility by buying low and selling high but not do so too frequently since it increases the risk of IL (more frequent = closer to the v1 model). Notably, if we assume that the size and timing of trades are identical, v2 will outperform a CPMM in terms of IL and v1 in terms of MMP regardless of the rebalancing frequency.

The DNMM was named as it was to convey its full potential, but in fact the delta neutral part is optional. The mechanism explained above deals with IL risk, but price risk is a separate matter. IL is not incurred if assets are just held, but of course the value of the assets can change, resulting in a profit or loss.

Since AMMs are required to hold assets to be able to market make for them, LPs are forced to have long exposure. And in Lifinity’s case, the LP is often the protocol itself. Through its unique property of targeting a fixed amount of an asset, however, there are a number of ways in which the DNMM enables us to neutralize price risk.

If we hold an asset and simultaneously short its perp, we will have net zero exposure to its price. This is what UXD, one of our MMaaS partners, does to issue a stablecoin backed by volatile assets. We would have to choose between using a centralized but cheaper platform such as FTX or a decentralized but pricier platform such as Mango.

Pros:
・Opening and closing positions is relatively cheap

Cons:
・Funding rates can be volatile
・Capital inefficient due to overcollateralization
・Liquidation risk

If we borrow an asset and market make with it, we will have net zero exposure to its price. There are many lending protocols to choose from, each with their own set of supported assets and fee structures.

Pros:
・Wider selection of assets than perps

Cons:
・Origination fees can be expensive and prohibit frequent adjustments
・Capital inefficient due to overcollateralization
・Liquidation risk

The logic for eliminating price risk is the same as for lending protocols, but in this case Lifinity would offer a fixed APR that it would pay for borrowing an asset (with deposits capped) and it would not provide any collateral.

Pros:
・Extremely capital efficient since users provide the capital
・Pools can be created for any asset

Cons:
・Requires depositors to trust Lifinity
・May require Lifinity to offer high APRs to attract sufficient capital

The above strategies are possible precisely because the DNMM targets a fixed amount of an asset. If the amount of the asset in a pool were constantly fluctuating (as it does when a pool targets a 50/50 ratio as in v1), the perp position or amount of the asset borrowed would have to be adjusted continuously, resulting in higher complexity and greater fees.

Going market neutral comes with costs (funding rates, trading fees, borrowing costs, less capital efficiency, etc.), so for any given asset we will have to carefully consider whether it is worth it. For example, they will likely not consider it necessary to go delta neutral for major assets such as SOL, BTC, and ETH. The ability to eliminate long exposure is particularly useful for assets with much less of a Lindy effect and/or have long-term structural sell pressure.

They performed a test of the DNMM to see whether it could maintain balance during a volatile market and rebalance smoothly when the target pool balance is updated.

The test was performed on a SOL-USDT pool with $100k of deposits. The pool was not integrated with Jupiter and it was difficult to capture all of the available arbitrage trades (arbitrage bots are very competitive!), so they ran a bot that mimicked them. In other words, the pool balance was adjusted as if it had been arbitraged whenever an opportunity arose. This essentially tested the worst case scenario in terms of toxic flow.

The following results exclude trading fees and only look at MMP, as our main objective was to determine how the DNMM’s impermanent loss profile compared to CPMMs and holding.

On net, v2’s MMP outperformed both holding and CPMMs.

Before the first rebalancing, the pool performed the same as holding and slightly better than CPMMs. This is expected since the pool targets the same pool balance as holding while CPMMs experienced some IL from selling an appreciating asset.

After the first rebalancing, the pool performed significantly better than both holding and CPMMs. Price declined soon after the rebalancing, so v2 took profit where the other two did not.

After the second rebalancing, the pool performed slightly worse than holding but slightly better than CPMMs. After buying back at the lower price, price continued to decline, leading to holding outperforming.

While v2 prove successful in the test, the real challenge will be unidirectional market environments. Price essentially moves only up or only down over prolong periods. This what v1 face as SOL decline from ~$180 to the current price of ~$30 yet has been able to outperform both CPMMs and holding. Given our test results and our expectation of v2 outperforming v1 for the reasons explained in previous sections, they are confident that v2 will perform better than v1 even in challenging market conditions.

Once v2 integrate with Jupiter, they will begin to migrate the v1 pools to v2 gradually. Starting with v2 SOL-USDC pool will run with the v1 SOL-USDC pool to analyze their relative performances. If satisfactory, we will deprecate the v1 pool and migrate our other v1 pools to v2 pools as well. They’ll start by using fix intervals for the rebalancing thresholds.

Lifinity the first proactive market maker on Solana designed to improve capital efficiency and reduce impermanent loss.

Lifinity’s DEX innovations:

  • Concentrated liquidity combined with lazy liquidity provision; no need to adjust positions
  • Reduces or even reverses impermanent loss by using an oracle as the main pricing mechanism
  • Generates a profit from market making through delayed rebalancing of pools
Lifinity’s tokenomics innovations:
  • The protocol continuously acquires liquidity for all token pairs the DEX provides liquidity for
  • Improved veToken model with optional decaying, linear unlocking, and native tokenization
  • Protocols are able to bribe veLFNTY holders to cheaply secure permanent liquidity
  • LPs’ share of fees is adjusted dynamically to target the optimal level of liquidity
  • Token launch via a veIDO

Lifinity also has a collection of NFTs called Flares:

  • 10,000 animated NFTs
  • All Flare sale proceeds were deposited into Lifinity’s liquidity pools
  • All revenue from trading fees and royalties are used for buybacks and reinvestment
  • If Flares fall below 50% of their mint price, they are bought back with the pooled funds
  • 1% of the LFNTY token supply is reserved for Flare holders

Website Twitter |

Source

REQUEST AN ARTICLE

Market Stats:
BTC Dominance: 59.38%(+0.11%/24h)
ETH Dominance: 12.81%(-0.13%/24h)
Defi Market Cap: $65.83B(-2.94%/24h)
Total Market Cap: $2289.44B(-0.21%/24h)
Total Trading Volume 24h: $84.98B(+14.27%/24h)
ETH Market Cap: $293.34B
Defi to ETH Ratio: 22.44%
Defi Dominance: 2.75%
Altcoin Market Cap: $929.95B
Altcoin Volume 24h: $43.06B
Total Cryptocurrencies: 32048
Active Cryptocurrencies: 9935
Active Market Pairs: 87516
Active Exchanges: 761
Total Exchanges: 9517
BTC: 68737.85$(-0.1%/1H)
ETH: 2435.93$(-0.1%/1H)
AVAX: 23.2$(-0.47%/1H)
BNB: 558.77$(-0.25%/1H)
MATIC: 0.3$(-0.33%/1H)
FTM: 0.57$(-0.76%/1H)
ADA: 0.33$(-0.24%/1H)
DOT: 3.83$(-0.58%/1H)
UNI: 6.93$(-0.21%/1H)
CAKE: 1.59$(-0.69%/1H)
SUSHI: 0.61$(-0.4%/1H)
ONE: 0.01$(-0.97%/1H)