The Lifinity Protocol is a decentralized exchange that aims to improve capital efficiency and reduce impermanent loss. It achieves this promise by implementing certain strategies such as concentrating liquidity, using oracles for proactive market making, and implementing a rebalancing mechanism. Lifinity Exchange is community-driven and targets to provide a more efficient and effective way for users to trade cryptocurrencies.

First, let’s briefly emphasize some boring stuff… Scary, huh? No worries, Lifinity makes it simple ☺ 

AMMs, or Automated Market Makers, have become a popular infrastructure in the DeFi space. Now you may wonder what DeFi is. Don’t worry, that is not something super different than traditional finance. Defi or Decentralized Finance refers to a movement to use blockchain technology and cryptocurrencies to create a more open, transparent, and accessible financial system. DeFi aims to enable people to access financial services without the need for traditional intermediaries such as banks or credit card companies, which can be slow, costly, and difficult to use. Instead, DeFi uses smart contracts and decentralized networks to create and enforce financial contracts, allowing people to lend, borrow, trade, and transact with each other directly. DeFi has the potential to revolutionize the way we think about and use financial services. However, it has limitations such as capital inefficiency, impermanent loss, and high fees. To see how AMMs work, you can watch this video. The Lifinity team proposes a solution that addresses these issues through the use of concentrated liquidity, a proactive market making strategy using an oracle, and a rebalancing mechanism. By concentrating liquidity, the market becomes more efficient for liquidity providers(LPs) and less costly for traders. The use of an oracle helps to reduce impermanent loss, and the rebalancing mechanism allows for the pool balance to regress to the bonding curve while also generating profit. Looks complicated?... If yes, please don't give up here and read further until I give you a simple example below. I know it’s not easy to understand the mechanics behind the Impermanent Loss. You can watch this video and learn how IL is related to arbitrage. It’s a good analogy to use apples and potatoes, that’s why I will repeat it here the same example in the last video. Imagine we have a grocery shop (the DEX), selling apples and potatoes (our token pair in the pool). When someone is buying or selling too much of one item the balance changes and the price of items are changing accordingly. Please remember this example of a grocery store for the next chapter.  See? Easy peasy ☺

Proactive Market Making

Proactive market making is a technique used in decentralized finance protocols to minimize the risk of Impermanent Loss, which can occur when liquidity is concentrated in a single pool.

The technique involves using an oracle to continuously provide updated prices for the assets being traded in the pool, allowing the protocol to adjust the prices of the assets in the pool proactively and avoid stale prices that could be exploited by arbitrageurs. Do you remember our example with the grocery store? Now, the arbitrageur is a guy who buys, let’s say apples from our store, and sells it somewhere else with a higher price for profit. In this example, an oracle functions like a billboard in a big market hall, where we can read all the prices traded in the market. As we know what prices are offered elsewhere for an apple, we can adjust our prices in our grocery store so that the arbitrageur cannot get a profitable trade. This helps protect liquidity providers from incurring Impermanent Loss, which can occur when the price of an asset in the pool moves away from the price at which the liquidity was originally deposited. The use of an oracle, such as the Pyth Network on the Solana blockchain, also makes it difficult for front-running to occur because the oracle provides price updates in every slot, approximately every 0.5 seconds.

Rebalancing Mechanism

The rebalancing mechanism in this protocol aims to minimize the risk of Impermanent Loss and maximize profit by adjusting the liquidity of the pools. This adjustment occurs on every trade and/or change in the price of asset x, as determined by the oracle. If x makes up less than 50% of the total value of the pooled assets, the market maker will decrease liquidity for buyers of x and increase liquidity for sellers of x in order to regain balance and incentivize traders to sell against the pool while discouraging them from buying. This helps to ensure that the pool balance regresses to the bonding curve. The rebalancing mechanism also allows for the concentration of liquidity beyond what is typical in other concentrated liquidity protocols, as it makes it more difficult for the price to fall outside of the desired range.

Rebalancing Scenarios

Let’s consider the possible scenarios that can occur in practice. The pool balance only changes when users trade with the pool or the oracle price changes. The combination of the two can generate a profit or a loss for liquidity providers. Below are the four possible scenarios and how the protocol handles them: 

The price of x increases when x comprises more than 50% of the pool 

The price of x decreases when x comprises less than 50% of the pool 

The price of x increases when x comprises less than 50% of the pool 

The price of x decreases when x comprises more than 50% of the pool 

Scenarios 1 & 2 are in favor of liquidity providers since they generate a profit or reverse the Impermanent Loss that constant product market makers would incur. The rebalancing mechanism effectively buys the dip when prices fall and takes profit when prices rise. 

These are the most likely scenarios since the oracle price tends to move faster than the price on other Decentralized Exchanges (DEXs) and arbitrageurs cannot profitably trade against our pools. Conversely, 3 & 4 are scenarios that work against liquidity providers. They are less likely to occur since the oracle price usually moves ahead of other DEXs. In the case that it does happen, however, the protocol will adjust its liquidity to minimize further Impermanent Loss.

Some kinky stuff…

The base trading fee for each pool on Lifinity is determined by the team with the goal of maximizing profitability. This fee may change frequently due to changes in liquidity from other DEXs. In addition, Lifinity adjusts the base trading fee based on market volatility to optimize spreads and prevent front running. In DeFi, the spread is the difference between the bid price and the ask price of an asset, and it is a measure of the liquidity and market depth of the asset. Front-running is a trading strategy in which a trader takes advantage of advance knowledge of a trade or order to profit from it. This can occur, for example, if a trader is able to see the details of a trade or order through their access to a Decentralized Exchange's order book or matching engine, or if they are able to see the details of a trade or order through their access to the blockchain itself. Front-running can be seen as a form of market manipulation, as it allows traders to profit at the expense of other market participants, and it can undermine the fairness and transparency of DeFi markets. Currently, this volatility is monitored using an off-chain bot, but the team plans to eventually implement this function on the blockchain.

Currently, Liquidity Providers receive 85% of the trading fees, while the remaining 15% is retained as a protocol fee. In the future, Lifinity plans to set target liquidity levels for each pool and adjust the distribution of trading fees accordingly, with the goal of optimizing liquidity.

Did Someone Say Tokenomics Innovation?

Like many DeFi protocols Lifinity has also its own token. LFNTY is the governance token of the Lifinity Protocol. It can be used to increase or decrease exposure to the Lifinity platform. VeLFNTY is another token that allows users having voting power and access to protocol revenue. It is earned by locking LFNTY for a certain period of time, and it cannot be transferred or displayed in standard wallets. It has two states: locked and unlocking. XFNTY is a tokenized version of 4-year locked veLFNTY and is a standard SPL token. It can be freely converted to and from 4-year locked veLFNTY at a 1:1 exchange rate, but it must be converted back to veLFNTY in order to begin receiving protocol revenue. Lifinity's tokenomics innovations include a protocol that continually obtains liquidity for all token pairs available on the DEX.  There is an improved veToken model with options for decaying, linear unlocking, native tokenization, and a system that allows protocols to bribe veLFNTY holders in order to cheaply secure permanent liquidity. Additionally, the share of fees received by LPs is dynamically adjusted in order to target the optimal level of liquidity, and tokens are launched using a veIDO.

UH-OH… Now Who Are The MMaaS & Laas Brothers?

‘’ Prepare for trouble! And make it double! To protect the Defi from devastation! To unite all the liquidity within our nation! To denounce the evils of front-running bots and price spreads! To extend our reach to the stars above! MMaaS! LaaS! Team Lifinty blasts off at the speed of light! Surrender now, or prepare to fight!

Meowth! That's right! ’’

(Taken from Pokemon’s infamous Rocket Team motto and brutally modified.)

Lifinity offers two services for protocols looking to improve liquidity for their tokens: Market Making as a Service (MMaaS) and Liquidity as a Service (LaaS). These services require a custom oracle to be set up for Lifinity to market maker for the protocol's tokens. In MMaaS, the protocol provides the assets that Lifinity uses to market make and Lifinity keeps the trading fees, while the protocol retains any market making profit. In LaaS, Lifinity provides the assets used for market making and takes on the price risk in exchange for compensation from the protocol in the form of the protocol's chosen asset based on the volume generated.

After talking about all the technical things above let’s dive into other cool things. Well maybe some of them are not so cool but yeah, you will like it.

Then… What Is Flare NFT?

10,000 animated non-fungible tokens (NFTs) called Flares were sold by Lifinity on Dec 27, 2021. The proceeds from the Flare sale were deposited into Lifinity's liquidity pools. All revenue generated from trading fees and royalties is used for buybacks and reinvestment. If the price of Flares falls below 50% of their mint price, they will be repurchased using the pooled funds. In addition, 1% of the total supply of Lifinity's LFNTY tokens is reserved for Flare holders.

Features

Let’s explore the app and talk about some of its features:

Dashboard: Here you can see general metrics of Lifinity (volume, fees etc.) You can see these metrics daily, weekly or monthly. Also, you can see the cumulative volume and cumulative fees. Furthermore, you can also see the circulating supply and the distribution period of locked tokens. A trick for you: you can navigate the cursor on the charts to see metrics of the specific date you want. Now if this is not cool, I don’t know what is!  Swap: You can swap between any listed tokens you want. Just connect your wallet and swap it! Lifinity will show you the best route to trade on various protocols (e.g. ORCA) without visiting them. Choose it and you are good to go. Pools: A wide range of pools to earn rewards... You can click on stats and see the statistics for each pair.

NFT: You can click on the NFT tab and it will redirect you to the Flare page and bang! You can stake/lock your Flare NFT and earn LFNTY tokens. IDO: Here you can join IDOs with just a click.

Reward: You can see your staking rewards depending on your action.

What’s More?

The team is actively taking care of the community. You can follow them on Twitter, Discord and Medium. They actively organize AMAs and gather with the community quite often. They are open to any suggestion and comments. You can also listen to their podcasts, where they talk about various topics. 

Rewards: Starting from December 24th, 2022, they announced that rewards will be distributed in USDC. That is dope! You don’t get affected by any price fluctuation. Discord: One cool part about the Discord server is they have a very detailed page with every useful link about the project. For example, you want to read the litepaper? Bang! It’s there. You want to buy Flare NFT? Bang! You can go and find it in your favorite marketplace. Moreover, it is important to be able to check the DAO treasury, veIDO funds wallets and be able to check it out whenever you want to. You can find the links on Discord’s #links channel. Click it and read all the numbers on Solscan. Don’t forget to visit the Discord server.

Conclusion

Lifinity brings a new breath to Defi. They have found a good solution using proactive market making to prevent price manipulation by bots. In addition, they have beautifully combined the concept of utility in NFT with Defi using Flare NFT.

References: 

Lifinity Website

Lifinity Medium

Lifinity Litepaper

Lifinity Twitter

Whiteboard Crypto

Disclaimer: Cryptocurrencies are speculative, complex, and carry significant risks. They are highly volatile and sensitive to secondary activities. Performance is unpredictable, and past performance is not a guarantee of future performance. Consider your own circumstances and seek your own advice before relying on this information. Also, you should verify the structure of any product or service (including legal status and relevant regulatory requirements) and consult the relevant regulators' websites before making any decision.