To Lifinity and beyond! A deep dive on Lifinity
This article discusses Lifinity, an AMM on Solana. It talks about everything from its critical products to its function and future expectations. Sit back and enjoy this deep dive!
Introduction
Decentralized Exchanges, or DEXes, are a vital pillar in the DeFi space and emerged due to the centralization of many of the most popular exchanges called Centralized Exchanges. DEXes allow you to trade crypto without any central authority to facilitate the trade.
What was started by EtherDelta in 2016 allowing you to trade crypto on Ethereum, was only grown exponentially after Uniswap came into the picture and introduced its AMM Model in 2018.
Even though Dexes are relatively small in terms of volume to centralized exchanges like Binance or Bybit etc., they still account for over $15 billion in Total Value Locked or TVL and a weekly volume of over $8 billion!
With the whole FTX collapse, decentralized exchanges saw an increase in volume and the trend is likely to continue as more and more people realize the security of self-custodying your funds.
One such DEX is Lifinity on Solana which has a TVL of approx. $4 million and has facilitated over $48 million in trading volume this month. They do this by using their own Automated Market Maker called the Proactive Market Maker or PMM. Before we dive into what Lifinity is all about, let’s take a step back and understand what AMMs are and why did Lifinity even go about building their own AMM model.
If you want to learn what AMMs are, you can learn it here.
Problems with first-gen AMMs
The first-gen AMMs had two significant problems. Impermanent Losses or IL and slippage.
Slippage is the price impact of trade, whether buying or selling tokens. Most first-gen AMMs are created so that the liquidity is distributed evenly across the curve from 0 to infinity leading to mismanagement.
Impermanent Loss, or IL, is the difference in value that results from providing liquidity in an Automated Market Maker (AMM) compared to holding those assets in a wallet over time. It happens because of price divergence from the price at where you provided liquidity at.
These two problems are tackled by hybrid AMMs that combine multiple traditional models like Curve AMM or build new models like Lifinity, Sigmadex, etc.
How is Lifinity different?
Lifinity uses a Proactive market making model along with concentrated liquidity and rebalancing mechanism to reduce impermanent losses and slippage. Let’s understand what PMM does and how it helps you!
Concentrated Liquidity
It refers to the concentration of liquidity within a range of prices to help reduce slippage as opposed to CPMM, which delivers liquidity across the entire price range of 0 to infinity. While there are multiple ways to do it, Lifinity does this by simply multiplying x and y with L, which is the amount of leverage resulting in the constant k increasing. It results in a concentration of liquidity within a specific price range, as the capital is focused around the higher value of k. The resultant formula changes from x*y=k to x*y = c*k = K(The new constant)
Proactive Market Making
In first-generation AMMs, the token price is adjusted to the same price as other exchanges by entities known as Arbitrageurs.
An arbitrageur profits from price discrepancies across exchanges and aims to keep the price differences as close to 0 as possible.
Compared to that, the Proactive market-making model actively seeks out opportunities to provide liquidity to the market rather than simply sitting in a pool and waiting to react to incoming orders. Lifinity uses Pyth Network oracles to know the token's real-time price and available liquidity in the pool, which helps concentrate liquidity at a specific price range to significantly reduce IL.
It is also possible that this IL could even turn in their favour and provide them gains by using this knowledge to act profitably on it.
Rebalancing Mechanism
The last thing that makes Lifinity what it is is its rebalancing mechanism. While the above two do a great job of efficiently market make, it removes the simplicity of the CPMM models having a 50/50 weight of each asset in the liquidity pool. This property is added to the pools by adjusting liquidity after every trade.
You can read more about their V1 Pools here.
Updates along the way
Lifinity made a few changes to their DEX and worked with Marinade Finance to bring permissioned pools for their mSOL-USDC pool.
Let's jump into what each one of them was!
The first change Lifinity made was introducing their proactive stable pools in April of 2022 to enhance the profitability of their DEX. It was a slight enhancement to their DEX based on the fact that protocols have a rotational order for stable pools or pools that have both assets as stablecoins (Eg: USDT-USDC). It is because if one protocol is used to execute a stable pool trade, it would have slightly less liquidity than other protocols on that side of the trading pair, which makes it less efficient than others and hence won't be the best route.
So to tackle this challenge, Lifinity started quoting a price slightly better than the best price for the pool side that has more than 50% of the weightage in the pool. It allows Lifinity to, in theory, capture 50% of the trading volume by always quoting the best price for one side of the pool.
The second change was bringing Volatility-adjusted fees to their DEX. Lifinity brought about this change because, for the SOL-USDC pair, the primary competitor for them was the MMs on Serum which would adjust their spreads according to market volatility. This spread adjustment helped them adjust the charges they asked their traders.
Initially, Lifinity only had a constant fee they charged irrespective of the market's volatility. The way they tackled this is if there is an increase in volatility, then their model would detect that and ask for more considerable fees to compensate for the higher chance that prices would continue to be volatile. The volatility is decided by using an off-chain oracle developed in-house.
It helped them across three regions; it helped to reduce IL, increase their trading fee revenue, and make front-running them more difficult.
You can read all about it here.
Permissioned Pools
The final update before launching the v2 version of their pools was bringing Market making and Liquidity as a service.
It started as a solution for tackling the liquidity issues with other pairs for SOL apart from SOL-USDC. To tackle this, they implemented a non-algorithmic means of incentivizing providing Liquidity for such pairs on their DEX.
Market Making as a Service
MMaaS, as they call it, is a service for other protocols to provide the assets to Lifinity, which they would use to make markets and retain any trading fees while the protocol keeps the market making profits or MMP. Lifinity provides an infrastructure to the protocol to create custom pairs while the protocol takes the price risk of the asset.
However, one drawback is that not all projects have their treasury denominated in SOL or stablecoins like USDC but have it in their native token. For those protocols, Lifinity offers another service.
Liquidity as a Service
In LaaS, Lifinity takes on the price risk of the assets and provides the assets to be used for market making. At the same time, the protocol compensates Lifinity with any asset they have in its treasury.
This compensation amount is based on the volume generated by Lifinity for the trading pair to ensure that the incentives are only paid for the realized utility of this service. This amount is calculated by finding out the USD value of every trade which is nothing but Price*Volume. The projects are deemed to transfer a certain percentage of this volume to Lifinity after the end of a pre-selected period. The exact percentage to be transferred depends from one project to another as each protocol has its price and IL risks, and the projects will know this beforehand.
Some targeted protocols for such services are protocols developing their native token like UXD, USDH etc. or protocols with their staked SOL tokens like mSOL, stSOL, scnSOL etc.
You can read all about this update here.
Lifinity and Marinade Finance
Lifinity proposed LaaS offering to Marinade Finance on June 16, which was then modified and re-proposed on July 11 to create a liquidity pool for mSOL-USDC with $1 Million in Liquidity, for which Marinade will provide them with 2 million MNDE tokens in a grant. During the first year of this partnership, Lifinity will lock the MNDE tokens and any profits they receive in MNDE tokens.
However, this was a closed or permissioned pool, implying that only Lifinity could provide Liquidity in this pool, and it won’t be available to the public. The reasoning behind this is that their model had a rebalancing mechanism, and too much Liquidity in the pools increases the difficulty of rebalancing, leading to an increase in IL. So, having the protocol provides the optimal amount of Liquidity was the solution Lifinity had come up with.
On September 12, a user of CryptoBatman reopened this discussion and offered two proposals (16 and 17) that the permissioned pool be opened to the public. The user thought that this pool wasn’t acting in the best interests of the Marinade Community and suggested that Lifinity was using this to increase their voting power which could lead to a concentration of control.
On September 21, Lifinity opened their mSOL-USDC pools to the public because of this discussion and Proposal 17, which was Lifinity-specific, was passed in favour of this change.
Lifinity V2
Just before Q3 2022, Lifinity introduced version 2 of their AMM model, the Delta Neutral Market Maker or DNMM. They decided to switch from V1 to V2 due to multiple reasons. Their model was designed to maximize the market-making profit or MMP. While it was highly profitable in the first few months, it came to break even in its totality. Lifinity believed this was due to an increase in arbitrageurs and their aggressiveness leading their liquidity pools to return to a 50/50 balance pool much more quickly.
Their DNMM model helps eliminate these problems and let's look at how it works. The way current AMMs work results in impermanent losses for LPs, and their DNMM model looks to alter the rebalancing target, which was initially 50/50 weighted pools. DNMM adjusts its target balance of assets based on changes in the price of one of the assets. Instead of targeting a specific ratio, it targets the initial amount of the base asset. It rebalances to a 50/50 ratio at a new price when the base asset's price changes by a predetermined amount. It helps maintain stability in the asset pool and potentially reduces the risk of losses due to price changes.
An essential factor to pay attention to is that the rebalancing event in v2 is independent of the prices of the assets and allows Lifinity to delay its rebalance for every little price change.
However, there is a catch. The Delta Neutral part of their DNMM model is optional and depends on whether it is worth it for Lifinity as going delta neutral has its own costs like funding fees, borrowing interest, etc.
After testing its performance, Lifinity saw that for the SOL-USDT pool, v2's MMP outperformed HODL and CPMMs.
Note: This was done in a testing environment and doesn’t prove whether V2 would be able to perform better in a real environment. However, Lifinity is confident that even in challenging market conditions, V2 would outperform V1.
All that is good, but how does Lifinity generate revenue?
Without diving too much into their tokenomics, for which they have uploaded a 6-part blog, Lifinity generates revenue by two significant mechanisms; Trading fees and Market Making profits. Let’s understand each one of them.
Trading Fees
Lifinity differs from other DEXs since it doesn’t seek maximum liquidity but seeks optimum liquidity. If a pool is sufficiently tiny, adding liquidity will allow it to capture a much higher share of volume. However, there is a point after which any additional liquidity added to it only dilutes the rewards of existing LPs without increasing volume by an absurd amount.
It also differs from other protocols due to owning the liquidity that it offers. Let’s understand Protocol-owned liquidity or POL and how it works in this case. Protocol-owned liquidity referred to the assets owned by the DEX and added to the platform's liquidity pools.
They achieve this by using veLFNTY, which is LFNTY tokens locked for a variable period. Lifinity uses veLFNTY to buy LP tokens from users by providing veLFNTY at a lower price than the market. veLFNTY is the governance token for Lifinity allowing voting powers and additional benefits and rewards.
Now that we understand this, let's go back to the revenue. Lifinity aims to reduce excessive liquidity in its pool and does it in two ways.
The first method is determining approximate liquidity where maximum trading fees are generated. It is done by looking at market data such as volume, size of other protocols' pools etc. The lower the current liquidity is compared to the target liquidity, the higher the rewards will be.
The second method incentivizes LPs to deposit more when Lifinity has less owned liquidity. It helps to bootstrap liquidity to new and early pools, and as the POL increases, LPs would be incentivized to withdraw their liquidity due to the lower share of fees they capture.
While LPs benefit from Lifinity, it also comes with certain restrictions that are removed when you become a veLFNTY holder. It is done because of the profits they make from market making.
Market Making Profits or MMP
MMP, similar to IL, is calculated by finding the difference in the value of the pool's assets if they had been just held. Lifinity does not take MMP from liquidity providers (LPs). However, If the MMP for the protocol-owned liquidity (POL) in a pool is greater than the target liquidity and is also positive, Lifinity will consider this MMP as revenue.
Revenue
Revenue is in the form of LP tokens. Let's call one token a buyback token and the second a reward token, as they both serve different purposes.
As the name suggests, Lifinity would use the buyback tokens to buy LFNTY, which would be used to acquire more liquidity by selling it as veLFNTY. However, this will only be for the first year, and after that, only 80% of the buyback token will be used for this, and Lifinity will use the rest to fund any further developments of the project.
The reward token will be distributed to veLFNTY holders based on their percentage share.
Capital raised: A look into the veIDO and Flares
Lifinity didn’t have any funding rounds, and they funded the project through their veIDO. Unlike normal IDOs, veIDO is the process of Lifinity selling their veLFNTY tokens and entities that participate in this get to choose how long their lockup period for LFNTY should be, which affects how many tokens they receive as well. As stated above, locking for longer means getting a more significant discount on your buy-in price for veLFNTY. Only those with a 0 lockup period would get LFNTY tokens, while the rest would get veLFNTY tokens.
They capped their raise at 30 million USDC, giving them a fully diluted valuation of around 150-300 million USDC depending on the period for which LFNTY tokens were locked. This cap to their raise was put in place to efficiently utilize the liquidity available and optimize their trading fees earned per LP token.
They managed to raise over 9.6 million USDC with a starting market price of LFNTY being 0.83 USDC.
Out of the capital raised, the first 500K USDC went to match an equivalent amount of LFNTY from their treasury for bootstrapping their LFNTY-USDC pool to ensure that their token has been liquid since its beginning. Of the capital left, 20% will be going to Lifinity for further development of the project, while 80% will be going towards POL and rewarding their veLFNTY holders.
It was one way for Lifinity to raise capital for themselves. The second way, as stated above, was launching Flares, which is tied to the services that Lifinity provides. Let’s understand them a bit more.
Lifinity is an NFT project designed by Lifinity and was minted on December 26, 2021, with a mint price of 1.5 SOL and was sold out in 2 hours! The purpose of this NFT was to combine NFTs with DeFi and work on two significant pointers:
Raise capital to seed their pools with liquidity
And Create value for the NFT holders
First and foremost, raising capital to seed their pools with liquidity. All proceeds from the sale of Lifinity flares would go to Lifinity’s SOL-USDC pool and will always remain there. These NFTs would allow the holders to get a share of the trading fees and market-making profits from Lifinity. It works by using half of the funds generated from the Flares’ sale to buy back the Flares at the floor price, and Lifinity would reinvest half of it in the liquidity pools. Finally, Flares bought back are governed by Flare holders; they can collectively choose to do with them as they please.
If things go south and the floor price of Flares drops below 50% of the mint price, Lifinity would buy back all the Flares below that price using funds from the pool.
Initially, the Flare holders would be noted down on a random snapshot every week and airdropped LFNTY tokens; however, Lifinity changed their model to a stake and claimed one. Lifinity also gave flare holders an option to get veLFNTY with a 4-year lockup period during this change.
What is the role of community in this?
As said above, holding veLFNTY gives you voting powers as Lifinity follows a Decentralized Autonomous Organization or DAO governance structure. DAOs are an organizational structure with no central authority based on community voting and power, allowing them to operate democratically and transparently.
Each shareholder having veLFNTY has voting powers, depending on how long their lockup period is. They have voting power to decide which pools get the protocol-owned liquidity or POL, and other protocols can pay them to vote for their pools. This process is known as bribing.
An arbitrageur is a type of trader that profits off the price discrepancies across exchanges, keeping the price differences across various exchanges as close as possible and ideally at 0.
It helps in multiple things.
Firstly, it motivates the token holders to provide liquidity to their pools, thereby earning yield on their voting power. Lifinity plans to allow veLFNTY holders to vote on how to distribute the LFNTY that will be sold as veLFNTY for liquidity provider (LP) tokens among the available pools. The gauge weights for each pool, determined pro-rata by vote count, will determine the share of emissions allocated. Other protocols may offer bribes to veLFNTY holders to influence the voting and increase the chances of their pools receiving a larger share of emissions.
The way it works is Lifinity will set up emission gauges, which are essentially measures of how much of a token should be released for its liquidity pools. The weight of these gauges, or the proportion of the released token, will be determined by veLFNTY holders. These holders will vote on which pools they want the emissions to go to, and the votes will be counted pro rata, meaning each vote will be weighed equally. Lifinity will then determine the gauge weight for each pool based on the votes it receives. Other protocols may try to influence the voting process by offering bribes or incentives to veLFNTY holders to encourage them to vote for their pools.
Secondly, Lifinity acquiring LP tokens is beneficial for other protocols because it means that the protocol can secure permanent liquidity for their token and lock up a portion of the circulating supply. Additionally, since Lifinity concentrates its liquidity, other protocols will not need to acquire as much to provide the same level of liquidity as they would through LP tokens of constant product AMMs.
Third, obtaining liquidity through this method is more cost-effective than using protocols such as Olympus that offer POL-as-a-service.
You can read how here.
Lastly, protocols can use another strategy to buy veLFNTY and vote for their pool. This approach has the advantage of requiring a one-time upfront cost to purchase veLFNTY, which can then be used to continuously vote for their pool instead of constantly bribing other veLFNTY holders.
Also, note that the Lifinity team will decide on 10% of emissions. Certain liquidity pools, like BTC-USDC and ETH-USDC, are essential for profitability but may not receive bribes.
Future outlook
Regarding the Solana ecosystem, when asked Durden during a Twitter space back in late November, he stated that while the recent events in Solana have caused some uncertainty and fear among the community, it is essential to remember that they have not changed the fundamental aspects of the Solana ecosystem that make it so attractive. Despite the FUD created around them, the network, performance, and developer ecosystem are all still strong and thriving. It is vital to keep a long-term perspective and not get caught up in short-term fluctuations or fear.
Vitalik even regarded it in his recent tweet about the Solana ecosystem.
Apart from that, Durden is also excited about Firedancer, a second validator client built by Jump Crypto, which aims to improve the performance of the Solana network by 10x. Implementing multiple validators in different languages will make the network more robust. If one fails, users can switch to the other and prevent the network from turning off. It is good to see Solana preparing to capture the next wave of users with the release of firedancer and the development of the Saga phone, which is another massive step toward adoption.
When it comes to Lifinity, According to Durden during Community AMA on Dec 30, 2022, Lifinity is mainly focused on expanding to more pools and introducing new assets in v2. They have been working on ways to borrow assets and perform market-making without exposing themselves to price risk.
The team is also working on new developments they have yet to announce.
Flares have been making good progress, and Lifinity is constantly looking to expand its operations by providing liquidity for borrowing against flares and trading flares.
Conclusion
To conclude, Lifinity is a DEX on the Solana blockchain that seeks to create a new approach to liquidity provision. By offering a new way for protocols to permanently acquire liquidity for their token pairs, Lifinity hopes to create a more sustainable and profitable model for DEXs. This approach, known as Protocol Owned Liquidity (POL), involves the sale of Lifinity's token, veLFNTY, in exchange for LP tokens. The distribution of veLFNTY among pools is decided through a voting process that allows other protocols to bribe veLFNTY holders to vote for their pools. In addition, 10% of veLFNTY emissions are reserved for allocation by Lifinity's team.
Lifinity aims to provide a more equitable distribution of profits among token holders and create a more profitable DEX through its unique approach to liquidity provision.
References:
Lifinity’s Medium
Marinade Finance’s forum
Lifinity’s Twitter
DeFi Llama for On-Chain analytics
Community AMA by Lifinity
Disclaimer: The statements and details above are informational only, and subject to change. Nothing above should be construed as financial, legal, or investment advice.