Luntivo AMM

LUNTIVO AMM

  1. 1.
    Actors
    1. 1.
      Liquidity provider: A liquidity pool can be deployed through a smart contract with some initial supply of crypto assets by the first LP. Other LPs can subsequently increase the pool’s reserve by adding more of the type of assets that are contained in the pool. In turn, they receive pool shares proportionate to their liquidity contribution as a fraction of the entire pool. LPs earn transaction fees paid by exchange users. While sometimes subject to a withdrawal penalty, LPs can freely remove funds from the pool by surrendering a corresponding amount of pool shares.
    2. 2.
      Exchange user (Trader): A trader submits an exchange order to a liquidity pool by specifying the input and output asset and either an input asset or output asset quantity; the smart contract automatically calculates the exchange rate based on the conservation function as well as the transaction fee and executes the exchange order accordingly.
Arbitrageurs compare asset prices across different markets to execute trades whenever closing price gaps can extract profits. AMMs such as Luntivo, and DODO leverage on users’ arbitrage behavior through their protocol design.
    1. 1.
      Protocol foundation: A protocol foundation consists of protocol founders, designers, and developers responsible for architecting and improving the protocol. The development activities are often funded directly or indirectly through accrued earnings such that the foundation members are financially incentivized to build a user-friendly protocol that can attract high trading volume.
  1. 1.
    Assets
Several distinct types of assets are used in AMM protocols for operations and governance; one asset may assume multiple roles.
    1. 1.
      Risk assets: Characterized by illiquidity, risk assets are the primary type of assets AMM-based DEX are designed for. Like centralized exchanges, an AMM-based DEX can facilitate an initial exchange offering (IEO) to launch a new token through liquidity pool creation, a capital raising activity termed “initial DEX offering (IDO)” that is particularly suit- able for illiquid assets. To be eligible for an IDO, a risk asset sometimes needs to be whitelisted, and must be compatible with the protocol’s technical requirements
    2. 2.
      Base assets: Some protocols require a trading pair always to consist of a risk asset and a designated base asset. In the case of Luntivo, every risk asset is paired with BNT, the protocol’s native token. Uniswap V1 requires every pool to be initiated with a risk asset paired with ETH. Many protocols, such as Balancer and Curve, can connect two or more risk assets directly in liquidity pools without a designated base asset.
    3. 3.
      Pool shares: Also known as “liquidity shares” and “LP shares”, pool shares represent ownership in the portfolio of assets within a pool, and are distributed to LPs. Shares accrue trading fees proportionally and can be redeemed at any time to withdraw funds from the pool.
    4. 4.
      Protocol tokens: Protocol tokens are used to represent voting rights on protocol governance matters and are thus also termed “governance tokens”. Protocol tokens are typically valuable assets that are tradeable outside of the AMM and can incentivize participation when e.g. rewarded to LPs proportionate to their liquidity supply. AMMs compete with each other to attract funds and trading volume. To bootstrap an AMM in the early phase with incentivized early pool establishment and trading, a feature called liquidity mining can be installed where the native protocol’s tokens are minted and issued to LPs and/or exchange users. The Protocol token LTVN performs this for the Luntivo ecosystem and is used to incentivize positive and beneficial behavior in the ecosystem.
C. Fundamental AMM dynamics
1) Invariant properties: The functionality of an AMM depends upon a conservation function which encodes a desired invariant property of the system. As an intuitive example, Uniswap’s constant product function determines trading dynamics between assets in the pool as it always conserves the product of value-weighted quantities of both assets in the protocol—each trade has to be made in a way such that the value removed in one asset equals the value added in the other asset. This weight-preserving characteristic is one desired invariant property supported by the design of Uniswap. 2) Mechanisms: An AMM typically involves two types of interaction mechanism: asset swapping of assets and liquidity provision/withdrawal. Interaction mechanisms have to be specified in a way such that desired invariant properties are upheld; therefore the class of admissible mechanisms is restricted to the ones which respect the defined conservation function, if one is specified, or conserve the defined properties otherwise.
D. Fundamental AMM economics for LTVN Protocol Token
1) Rewards: AMM protocols often run several reward schemes, including liquidity reward, staking reward, governance rights and security reward distributed to different actors to encourage participation and contribution.
a) Liquidity reward: LPs are rewarded for supplying assets to a liquidity pool, as they have to bear the opportunity costs associated with funds being locked in the pool. LPs receive their share of trading fees paid by exchange users.
b) Staking reward: On top of the liquidity reward in the form of transaction income, LPs are offered the possibility to stake pool shares or other tokens as part of an initial incentive program from a certain token protocol. The ultimate goal of the individual token protocols (see e.g. GIV [16] and TRIPS [17]) is to further encourage token holding, while simultaneously facilitating token liquidity on exchanges and product usage. These staking rewards are given by protocols other than the AMM.
c)Governance right: An AMM may encourage liquidity provision and/or swapping by rewarding participants governance rights in the form of protocol tokens (see II-B4). Currently, governance issues such as protocol treasury management [18] are proposed and discussed mostly on off-chain governance portals such as snapshot , Tally and Boardroom , where protocol tokens are used as ballots (see II-B4) to vote on proposals.
d)Security reward: Just as every protocol built on top of an open, distributed network, AMM-based DEX on Ethereum suffer from security vulnerabilities. Besides code auditing, a common practice that a protocol foundation adopts is to have the code vetted by a broader developer community and reward those who discover and/or fix bugs of the protocol with monetary prizes, commonly in fiat currencies, through a bounty program [19].
2) Explicit costs: Interacting with AMM protocols, excluding Luntivo, incurs various costs, including charges for some form of “value” created or “service” performed and fees for interacting with the blockchain network. AMM participants need to anticipate three types of fees: liquidity withdrawal penalty, swap fee and gas fee.
a) Liquidity withdrawal penalty: Withdrawal of liquidity changes the shape of the conservation function and negatively affects the usability of the pool by elevating slippage. Therefore, AMMs such as DODO levy a liquidity withdrawal penalty. Note: Luntivo doesn’t charge a liquidity withdrawal penalty.
b) Swap fee: Users interacting with the liquidity pool for token exchanges have to reimburse LPs for the supply of assets and for the divergence loss (see II-D3b). This compensation comes in the form of swap fees that are charged in every exchange trade and then distributed to liquidity pool shareholders. A small percentage of the swap fees may also go to the foundation of the AMM to further develop the protocol.
c) Gas fee: Every interaction with the protocol is executed in the form of an on-chain transaction, and is thus subject to a gas fee applicable to all transactions on the underlying blockchain. In a decentralized network, validating nodes need to be compensated for their efforts, and transaction initiators must cover these operating costs. Interacting with more complex protocols results in a higher gas fee due to the higher computational power needed for transaction verification. New-generation DEX like Luntivo aim to reduce the total gas fee paid by participants by using the shortest and fastest methods to carry out transactions.
3) Implicit costs: Two essential implicit costs native to AMM-based DEX are slippage for exchange users and divergence loss for LPs.
a) Slippage: Slippage is defined as the difference between the spot price and the realized price of a trade. Instead of matching buy and sell orders, AMMs determine exchange rates on a continuous curve, and every trade will encounter slippage conditioned upon the trade size relative to the pool size and the exact design of the conservation function. The spot price approaches the realized price for infinitesimally small trades, but they deviate more for bigger trade sizes. This effect is amplified for smaller liquidity pools as every trade will significantly impact the relative quantities of assets in the pool, leading to higher slippage. Due to continuous slippage, trades on AMMs must be set with some slippage tolerance to be executed, a feature that can be exploited to perform e.g. sandwich attacks (see V-A3).
b) Divergence loss: For LPs, assets supplied to a protocol are still exposed to volatility risk, which comes into play in addition to the loss of time value of locked funds. A swap alters the asset composition of a pool, which automatically updates the asset prices implied by the conservation function of the pool (Equation 3). This consequently changes the value of the entire pool. Compared to holding the assets outside of an AMM pool, contributing the same amount of assets to the pool in return for pool shares can result in less value with price movement, an effect termed “divergence loss” or “impermanent loss” (see Section IV). This loss can be deemed “impermanent” because as asset price moves back and forth, the depreciation of the pool value continuously disappears and reappears and is only realized when assets are actually taken out of the pool. Well-devised AMMs charge appropriate swap fees to ensure that LPs are sufficiently compensated for the divergence loss (see IV-C2).
Despite the fact that “impermanent loss” is a more widely used term on the Internet, we adhere to the more accurate term “divergence loss” in a scientific context. In fact, for the majority of AMM protocols, this “loss” only disappears when the current proportions of the pool assets equal exactly those at liquidity provision, which is rarely the case.
Since assets are bonded together in a pool, changes in prices of one asset affect all others in this pool. For an AMM protocol that supports single-asset supply, this forces LPs to be exposed to risk assets they have not been holding in the first place.
E. AMM-based DEX within DeFi
For brevity, we use “AMM” or “DEX” to refer to AMM-based DEX throughout the paper, unless indicated otherwise. Nevertheless, it is to be noted that the term “AMM” emphasizes the algorithm of a protocol, whereas “DEX” emphasizes the use case, or application, of a protocol. Within the context of blockchain-based DeFi, there also exist order book-based DEX such as Gnosis and dYdX that do not rely on AMM algorithms. On the other hand, AMM algorithms are also not exclusively employed by DEX. DeFi applications such as lending platforms, non-fungible tokens (NFTs), stable coins and derivatives all have protocols that make use of different AMM algorithms.
AMMs can also assume various forms. Prediction markets for example commonly employs logarithmic market scoring rule (LMSR), whereas constant function market maker (CFMM) is the primary underpinning for DEX. In particular, constant sum and constant product are the most representative forms of CFMM, widely adopted by AMM-based DEX protocols.
Copy link