šŸŸ¢Infinity NFT

Xfai V0 Protocol Infinity NFT (INFT)

Introduction

Infinity NFTs are a novel cryptoeconomic primitive used within the Xfai decentralized exchange (DEX). INFTs enable an additional way to passively earn fees on Xfai, by permanently locking XFIT, Xfai's token. To mint an INFT, end-users have to permanently lock liquidity into the Xfai DEX.

In the traditional liquidity provisioning approach in Xfai, end-users provide two-sided liquidity in exchange for a liquidity token. Liquidity token holders accrue fees from one pool and can redeem the accumulated fees and underlying liquidity at any time. INFT holders on the other hand accumulate fees from every pool on the Xfai DEX, but cannot redeem their underlying liquidity.

Infinity Staking

To mint an INFT, end-users require to permanently stake liquidity to the Xfai DEX. The amount of fees that an INFT accrues is based on its share value, which is determined by the amount of liquidity staked and the time of staking. For more information on how INFT share value is calculated, see the Theory section of this page. Once an INFT is minted, it can be used to earn passive fees on the DEX and may be traded or used in other ways as desired.

The INFT smart contract uses the XFIT token as the underlying unit of exchange to determine the share value of minted INFTs. To mint an INFT, end-users can either lock XFIT directly, or lock any other Xfai hosted ERC20 token. In the case of other Xfai hosted ERC20 tokens, any liquidity is converted into XFIT tokens using the Xfai DEX. That is, XFIT is always used either directly, or indirectly for INFT minting.

Besides minting new INFTs, end-users can also "boost" the share value of an existing INFT. Infinity boosting functions the same way as infinity staking, but it does not mint a new INFT. instead it simply increases the share value of an existing INFT.

Harvesting

INFTs accumulate fees from every pool on the Xfai DEX. If fees within a pool are harvested, the INFT's share value for the given pool decreases. That is, if the share value of an INFT in one pool becomes zero, it does not affect the share value of the INFT in other pools.

Theory

An INFT has a share, the value of which gets determined by the amount of XFIT tokens locked:

s(Ī”i)=uĪ”jrINFT+Ī”js(\Delta_i) = \frac{u \Delta_j}{r_{INFT} + \Delta_j}

Where s(Ī”i)s(\Delta_i) represents the share value of an INFT for a given amount of Ī”i\Delta_i tokens, uu represents a system-wide constant, Ī”j\Delta_j represents the amount of XFIT tokens jj that one permanently locks for a given amount of Ī”i\Delta_i ERC20 tokens, and rINFTr_{INFT} represents the contract's reserve of locked XFIT tokens.

If we look at the equation for INFT share calculation, we can see that the amount of shares that one can receive for a given amount of staked tokens decreases non-linearly, the more underlying tokens have already been staked. This design choice incentivizes users to stake earlier. Once an INFT holder harvests their fees from a given pool, their share within that pool decreases, and the shares of the other INFT holders increases. Because of the non-linear function used to issue shares, and the share reducing mechanism used when harvesting fees from a pool, we can imagine fee allocation to behave very much like a queue. earlier INFT holders get on average more fees. Once they "exit", i.e. harvest from a given pool, the share value of the other INFT holders for that pool increases. Harvesting fees from one pool does not influence an INFT holder's share within another pool.

Developer resources

To see how to perform infinity staking on a smart contract level, read the Infinity Staking Implementation subsection of the developers documentation.

Last updated