AMM

Overview

The figure above denotes the custom bonding curve that Xave Finance adopts for each liquidity pool in our AMM. When a swap transaction is executed, the corresponding proportion of tokens that remain within the liquidity pool after the swap is reflected on the black line above.

Swaps can occur in one of two β€œregions” of the bonding curve:

One region is the β€œbeta” region (points colored in yellow), where one token can be exchanged for another at expected real world rates (β€œFX accurate”). Within this region, traders will be charged a constant fixed fee paid to LPs, just as with any AMM. It is important to note that in the beta region, there is no price slippage and the total amount of assets in the pool obeys a linear relationship – a constant sum invariant behavior.

Outside this β€œFX accurate” beta region, however, trades will be priced depending on the LP ratio and no longer depending on the real world FX price. Additionally, the swap fees paid to LPs will be dynamic, wherein a trade that moves the token ratio away from β€œFX rate” or beta region will be charged a higher fee and a trade that moves the token ratio towards β€œFX rate” or the beta region will be charged a lesser fee.

Mechanism

When the liquidity composition crosses beyond the beta region, there will be price slippage. As seen from the diagram above, once the composition of tokens crosses point J the graph curves horizontally.

In this region we observe that the pool is largely weighted by Token B than Token A. Since the gradient of the slope determines the price of Token A in terms of Token B, this means that the price of Token A decreases between point J to K. Conversely, when the composition of liquidity is largely weighted by Token A than Token B (HI), the graph curves vertically and this means that the price of Token A generally increases between point I to H. Naturally, this provides an opportunity for arbitrage.

Theoretically, given the dynamically increasing trading fees as users trade further away from the beta region coupled with the arbitrage opportunity, users are likely to trade towards the region where there is no price slippage. However to further safeguard our liquidity pools from being completely drained, Xave Finance's AMM pools have a minimum and maximum allocation parameter which restricts trades from continuing beyond a specific point – Point H and Point K.

Stablecoin Liquidity Pools

For our stablecoin AMMs, we are utilising Chainlink price feeds in order to ensure that trades that are executed between the beta region will be traded at FX accurate rates thus mimicking the prices of currencies in traditional financial markets, at least for a certain threshold of the price range.​

XaveFinance incentivises liquidity provision and trading between

  • asset-backed stablecoins

  • synthetic stablecoins

  • and important pairings against ETH, WBTC, USDC, USDT and other "must have" cryptocurrencies

Last updated

Change request #104: