# What is Lifinity?

Lifinity is 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
* 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 was distributed to Flare holders

{% hint style="info" %}
Our documentation explains the *what* of our protocol without getting into the *why*. To get the full picture, we recommend reading our [tokenomics series](https://medium.com/@lifinity.io/lifinity-tokenomics-series-part-1-liquidity-mining-and-protocol-owned-liquidity-a7dade99ecf4) and [Flares article](https://medium.com/@lifinity.io/lifinity-flares-a-merging-of-defi-nfts-1355e4c99416).
{% endhint %}


# Oracle

One of the main differentiators of Lifinity's DEX is its use of an oracle as the key pricing mechanism rather than relying primarily on a pool's balance of assets. This eliminates the reliance on arbitrageurs to adjust the price, reversing impermanent loss into profit for the market maker.

Lifinity uses its own custom oracle to ensure the highest accuracy with the lowest latency. We only trade when the oracle has successfully updated in the current slot and the confidence interval is sufficiently narrow, making our DEX extremely difficult to front run.


# Concentration

In the constant product model (x **⋅** y = k), liquidity is provided across the price range from 0 to infinity. In contrast, concentrated liquidity adds depth to a market by providing capital in a limited price range, thereby improving capital efficiency.&#x20;

There are several methods of concentrating liquidity, but Lifinity takes the simple yet unique approach of applying leverage to the value of k. This is achieved by simply multiplying k by the desired amount of concentration c, which determines the amount of liquidity provided:

$$
x ⋅ y = c ⋅ k = K
$$


# Rebalancing

Although concentration and the use of an oracle are sufficient for the protocol to efficiently market make, it lacks the simplicity of standard constant product pools where the total value of each asset in a pool are always equal. To add a similar property while maximizing profit, the protocol rebalances its pools by adjusting their liquidity.

This adjustment of liquidity occurs on every trade and/or change in oracle price according to the following formulae.

To increase liquidity for x:

$$
K\_{adjusted} = K ⋅ (x ⋅ p / y)^z
$$

To decrease liquidity for x:&#x20;

$$
K\_{adjusted} = K ⋅ (y / (x ⋅ p))^z
$$

where K is the total amount of liquidity, p is the price of x provided by the oracle, and z is the parameter that determines the magnitude of the adjustment.

For example, when x comprises 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 an effort to regain balance. This will incentivize traders to sell against the pool while discouraging them from buying, ensuring that the pool balance regresses to the bonding curve.


# Trading Fees

The trading fee for each pool is set manually by team with the aim of maximizing profitability. The optimal setting may frequently change due to shifts in factors such as liquidity on competing DEXs and market volatility.


# Liquidity

All pools are closed for deposits. All liquidity in the DEX is protocol-owned and backs the LFNTY token.


# MMaaS and LaaS

Lifinity offers two services to protocols looking to efficiently create robust liquidity for their tokens: market making as a service (MMaaS) and liquidity as a service (LaaS). These services are designed for protocols that require a custom oracle for Lifinity to be able to market make for their tokens.&#x20;

In MMaaS, projects provide the assets that Lifinity will use to market make and Lifinity keeps all trading fees while projects retain any market making profit (MMP).&#x20;

In LaaS, Lifinity provides the assets used for market making and takes on their price risk. In exchange, projects compensate Lifinity with whatever asset of their choosing based on the amount of volume generated.

{% hint style="info" %}
For a deeper dive on MMaaS and LaaS, please see our [Medium article on this topic](https://medium.com/@lifinity.io/introducing-market-making-liquidity-as-a-service-80d4d6df3b5f).
{% endhint %}


# v2

v2 is a major upgrade to Lifinity’s market making algorithm with wide-reaching benefits.

The key innovation behind v2 is that pools target the initially deposited amount of the base asset rather than a 50/50 ratio between the two assets. The target amount of the base asset is only updated when the price changes by a predetermined amount, at which point the pool rebalances to a 50/50 ratio at the new price.&#x20;

Additionally, through its unique property of targeting a fixed amount of an asset in the pool, v2 enables price risk to be neutralized by borrowing the base asset or shorting its perp.

{% hint style="info" %}
For a deeper dive on our v2, please see our [Medium article on this topic](https://medium.com/@lifinity.io/lifinity-v2-introducing-the-delta-neutral-market-maker-5e4e42107860).
{% endhint %}


# Tokens

### LFNTY

LFNTY is Lifinity's governance token.&#x20;

LFNTY's main function is as the point of entry/exit for those who want to increase/reduce their exposure to Lifinity.&#x20;

Mint address: LFNTYraetVioAPnGJht4yNg2aUZFXR776cMeN9VMjXp

### veLFNTY

veLFNTY is the token that grants users voting power and access to protocol revenue.&#x20;

Users can lock LFNTY for between 7 days to 4 years and receive veLFNTY in exchange. The amount of veLFNTY you receive is calculated as follows:

`veLFNTY received = (# of LFNTY locked) * (Lock period (days)) / 1460`

veLFNTY is not an SPL token and cannot be transferred. It does not display in standard wallets such as Phantom, but users can check their veLFNTY balance on our app.

veLFNTY will have two possible states: locked and unlocking. veLFNTY always begins in the locked state. While locked, the LFNTY contained within the veLFNTY remains inaccessible.

Users can transition their veLFNTY to the unlocking state at any time. In this state, the veLFNTY balance will begin to decay linearly over time and the locked LFNTY will similarly begin to unlock linearly over time.

veLFNTY can be relocked for longer than the time remaining until it fully unlocks. This does not affect the amount of LFNTY contained within the veLFNTY but would increase the user's veLFNTY balance.

Users can only have one veLFNTY account per wallet. When adding veLFNTY to an account that already has veLFNTY, the portion with the shorter lock period will be relocked to match the longer lock period.

### xLFNTY

xLFNTY is a tokenized version of 4-year locked veLFNTY and is a standard SPL token.&#x20;

Users can freely convert between 4-year locked veLFNTY and xLFNTY at a 1:1 exchange rate.

xLFNTY must be converted to veLFNTY in order to begin receiving protocol revenue.&#x20;

Mint address: xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu

{% hint style="info" %}
For the motivation behind this design, please see our [Medium article on this topic](https://medium.com/@lifinity.io/lifinity-tokenomics-series-part-2-token-locking-91108808b7b0).&#x20;
{% endhint %}


# Revenue

Lifinity’s revenue is the sum of protocol fees, trading fees generated by our protocol-owned liquidity (POL), and market making profit (MMP) that is withdrawn as profit.

MMP is the total profit and loss from market making and is measured by comparing the total value of a pool’s assets (excluding trading fees) to their value if they had not been traded and instead were just held. Currently, MMP is not withdrawn as profit and remains in the pools as liquidity.&#x20;

Fee revenue is used as follows:

* 70% is distributed to veLFNTY holders
* 20% is used for buybacks and/or to increase LFNTY-USDC liquidity
* 10% is used to fund ongoing development

{% hint style="info" %}
For the motivation behind this design, please see our [Medium article on this topic](https://medium.com/@lifinity.io/lifinity-tokenomics-series-part-4-revenue-bab238f23af5).
{% endhint %}


# veIDO

Instead of the common IDO method where only fully unlocked tokens are sold, we also sold vote-escrowed tokens. Since we sold veLFNTY rather than just LFNTY, investors were able to choose how long they wanted to lock their tokens, and this directly affected how many tokens they received; the more USDC they invested and the longer they locked, the more tokens they received.

The LFNTY allocated for the veIDO was distributed pro-rata according to a user’s weight:

`Weight = D / (1 - (1/2) * (L/1460))`,

where D is the USDC deposit amount and L is the number of days chosen to lock (maximum of 4 years = 1,460 days). The 1/2 specifies the max discount possible (i.e. 50%) relative to those who lock for zero days. The L/1460 determines how much of the max discount a user receives according to their chosen lock period.

We initialized our LFNTY-USDC pool with a starting price that those who locked for zero days bought at. This means all participants bought LFNTY (as veLFNTY) at or below its starting market price.

Our veIDO was capped at 30 million USDC, first come, first served.

Of the USDC raised, the first $500k was set aside to match an equivalent amount of LFNTY from the treasury for seeding our LFNTY-USDC pool. Of the USDC that remained, 20% went to fund the continued development of the protocol and 80% became POL deposited into Lifinity’s liquidity pools to generate revenue for veLFNTY holders.

Our veIDO took place on April 23, 2022 at 15:00 UTC. Participants were able to deposit USDC within a 24 hour period. Once deposited, users could not withdraw their funds.&#x20;

9,671,914.977248 USDC was raised in the veIDO with a starting market price for LFNTY of 0.839028 USDC.

![](/files/3ICmRwQmnxob1UMNBTVy)

{% hint style="info" %}
For the motivation behind this design, please see our [Medium article on this topic](https://medium.com/@lifinity.io/lifinity-tokenomics-series-part-6-ido-and-roadmap-e581dae90c0a).
{% endhint %}


# Allocations

There will be a total supply of 100,000,000 LFNTY tokens distributed as follows:

![](/files/uX844EKNNTc8af3X1wxe)

There is no VC allocation.

The [Flare holders’ allocation](https://medium.com/@lifinity.io/lifinity-flares-a-merging-of-defi-nfts-1355e4c99416) will be distributed through a stake and claim model over the course of a year following the veIDO.

The team’s allocation will vest over 4 years with a 6 month cliff starting from the veIDO.

Currently, the only planned use of the treasury is to grow our protocol-owned liquidity. Any other use will be voted on by veLFNTY holders.


# Introduction

Lifinity Flares are a collection of 10,000 animated NFTs with a twofold purpose:

1. Raise capital to seed Lifinity's pools with liquidity
2. Perpetually create value for NFT holders

The sale took place on Dec. 26, 2021 with a mint price of 1.5 SOL and sold out in 2 hours.

{% hint style="info" %}
For the full details regarding Flares, please see our [introductory Medium article](https://medium.com/@lifinity.io/lifinity-flares-a-merging-of-defi-nfts-1355e4c99416).
{% endhint %}

![](/files/ASx8s4r5qdrkYezLgmiK)


# Profit

The team has not taken profit from this project in any way.&#x20;

All of the funds raised from the sale were deposited into Lifinity’s DEX to generate trading fees and market making profit for holders. The Flares' liquidity was [bought out by Lifinity DAO](/flares/buyout), and Flare DAO now owns a large amount of veLFNTY.


# Buybacks

All the profit generated from Flare DAO's veLFNTY and all royalties from secondary marketplaces (5%) are used to buy back Flares by placing bids on Tensor at the floor price.

Flares also have a secondary buyback mechanism. If they ever fall below 50% of their mint price, they are bought back with the pooled funds (as opposed to profit generated). This mechanism has not yet been used.&#x20;

Flares that have been bought back are governed by Flare holders; they can collectively choose to do with them as they please.&#x20;


# LFNTY Allocation

1,000,000 LFNTY (1% of the total supply) was reserved for Flare holders and has been distributed as of May 16, 2023.

Flares could either be staked or locked to receive their portion of LFNTY.&#x20;

Staking allowed holders to earn a pro-rata share of the remaining LFNTY to be distributed over the course of 1 year. Holders could unstake at anytime.

Locking Flares granted holders their share of LFNTY as 4-year locked veLFNTY upfront. The Flare was locked until the end of the 1 year distribution period. The amount of LFNTY that was locked for veLFNTY was 1/10,000 of the LFNTY that was left to be distributed at the time that it was locked (e.g. if you locked 6 months after distribution had begun, you would have received 1/10,000 of 0.5%).


# Wallet Addresses&#x20;

Wallet address that receives royalties: \
<https://solscan.io/account/GmS7MqCNzo9kTQKYvJD7pDKoBNHwc7qyRAwvJUUxfRjr>&#x20;

Wallet address where 50% of royalties & trading fees are sent to execute buybacks: \
<https://solscan.io/account/A9DsyEuQP5J4fizYuWXKwgGebThNkFm9NEXFzBbeaEdr>&#x20;

Flare DAO wallet address: \
<https://solscan.io/account/G8L9xEBFVasbRJHw5TSVSNygdMDA8Y8UazzPksyXHLzT>

Flares in the Flare DAO treasury:\
[https://howrare.is/lifinityflares/?wallet=A9DsyEuQP5J4fizYuWXKwgGebThNkFm9NEXFzBbeaEdr](<https://howrare.is/lifinityflares/?wallet=A9DsyEuQP5J4fizYuWXKwgGebThNkFm9NEXFzBbeaEdr&#xD;&#xA;>)


# Buyout

On July 4, 2023, Lifinity DAO and Flare DAO voted for Lifinity DAO to buy out Flare DAO's liquidity in Lifinity's pools as well as their idle funds. They were purchased using LFNTY from Lifinity DAO's treasury, using LFNTY's intrinsic value at the time as the price. Flare DAO locked the LFNTY received for veLFNTY, which became its new source of revenue.&#x20;


