Flare Finance

FlareX: 50/50 Liquidity Pools

Decentralized Finance (DeFi) has taken the crypto and blockchain space by storm over the past few years. We have seen smart contract-enabled blockchains reach valuations worth $100s of billions for their native assets like Ethereum and Binance Smart Chain. The Flare Network is looking to capitalize on this growing sector within cryptocurrency by devising the first-ever federated byzantine agreement, smart contract blockchain to accommodate for unprecedented scaling of DeFi and other smart contract applications. Enter Flare Finance into the fold working to build out a comprehensive set of dApps to be utilized by the Flare Community. Flare Finance will be providing six unique applications plus a yield aggregator and governance staking pool to satisfy the appetite for DeFi of XRP, Litecoin, Dogecoin, and Stellar holders alike.

One of the first and most common forms of DeFi was pioneered by Uniswap as a liquidity provisioning application through the use of an algorithm called an Automated Market Maker (AMM). FlareX will be the manifestation of dual-token liquidity pools in the Flare Finance ecosystem. Each liquidity pool listed on FlareX will require liquidity providers to stake two assets at a 50/50 split in value into their respective liquidity pool. As far as we currently know, there are only seven liquidity pools pre-determined to be listed on FlareX. These listing are as follows:

  • YFLR/YUSD
  • YFIN/YSUD
  • FLR/YUSD
  • FXRP/YUSD
  • FDOGE/YUSD
  • FLTC/YUSD
  • FXLM/YUSD

It is possible that the Flare Finance team will announce additional liquidity pools prior to the launch of their ecosystem. Additionally, for providing liquidity to one of these pools, the user will be entitled to a share of the fees generated by the pools. FlareX fees are set at 0.30% of each transaction’s notional value. Additionally, 10% of this 0.30% will be diverted to the team and APY Cloud bringing the liquidity providers earnings per swap to 0.27%. For example, our user is providing liquidity to the FXRP/YUSD pool. There is $10M staked in this pool evenly distributed between FXRP and YUSD. Our user has provided $100K (1% stake in pool) of this liquidity and a trade of $1M FXRP is made for YUSD. The fee from this trade would be $3K (0.30% * $1M) with $2.7K (0.27% * $1M) being delivered to all the liquidity providers of the pool. As our user has a 1% stake in this pool, they would earn $27 (1% * $2.7K) in fees from this trade. For purposes later in this post, to provide $1M in liquidity our user would have had to stake 100K FXRP tokens ($100K stake * 50% split / $0.50 price) and 50K YUSD stablecoins ($100K stake * 50% split / $1.00 price). We are assuming a price of $0.50 per XRP for our later example.

Fees earned from liquidity providing on FlareX are auto-compounded back into the pool the user is staked in. All fees earned from a liquidity pool are denominated in the two assets in the pool. Therefore, if our user is providing liquidity to the FXRP/YUSD pool, then they would expect to earn fees in FXRP and YUSD. Additionally, fees are paid in the asset that a user is swapping from. In the above example, the trader would have paid their $3k fee in FXRP tokens.

By providing liquidity to a FlareX pool, the user receives liquidity pool (LP) tokens in return. These LP tokens represent the user’s value staked in a given liquidity pool on FlareX. Whenever a user would like to exit their position in a liquidity pool, then they can return some or all of the LP tokens to the pool to be burned in exchange for that value in the pool. LP tokens can also be utilized in the FlareFarm application to earn the primary governance token of Flare Finance called YieldFin (YFIN). FlareFarm uses a fair token distribution model to allow participants to earn YFIN from the Flare Finance ecosystem. Unlike fees that are auto-compounded through FlareX, users are able to withdraw YFIN at any time and make use of it in whichever way they see fit.

It is important to note that as of now the only way to earn YFIN from the FlareFarm is to either provide liquidity to one of the seven listings above or directly stake YFLR in the single-token pool on FlareFarm. However, this is subject to change dependent on the Flare Finance team pre-launch or Flare Finance governance post-launch.

FlareX + FlareFarm - Incentives

Anatomy of FlareX Liquidity Pools

FlareX is building off of the successful model Uniswap has set forth for the industry. This means AMMs will underpin each of its liquidity pools. We can utilize our example above to explain how this works. We will say that the XRP price is currently trading at $0.50. Therefore if there is $10M in value staked in the FXRP/YUSD pool the asset allocation would be 10M FXRP tokens ($5M staked / $0.50 price) and 5M YUSD stablecoins ($5M staked / $1.00 price). Now that we know the composition of the pool at a given point in time, we can apply a theoretical $1M swap from FXRP to YUSD to realize the effects this has on the liquidity providers.

Whenever someone swaps from one asset to another within a liquidity pool, the count of each asset in the pool changes. In order to facilitate this trade of $1M FXRP for YUSD, the trader will send 2M FXRP tokens ($1M swap value / $0.50 price) to the pool in return for 1M YUSD stablecoins ($1M swap value / $1.00 price). Additionally, the trader will pay $3k in fees with FXRP tokens not involved in the trade. It is important to note that we are excluding slippage calculations from this example for ease of understanding.

Now that we know that FXRP tokens are being placed in the pool and YUSD stablecoins are being removed from the pool, we can calculate the new token balances. The FXRP/YUSD pool had 10M FXRP tokens and 5M YUSD stablecoins. After this swap, there are 12M FXRP tokens (10M + 2M)  and 4M YUSD stablecoins (5M – 1M) in the pool. The implied price of FXRP/YUSD in the pool is now $0.33 (4M YUSD stablecoins / 12M FXRP tokens). This is a rather massive change in the composition of the liquidity pool. Assuming the value staked in the pool has not changed, our users stake in the pool would now be for 120K FXRP tokens (1% stake * 12M FXRP tokens) and 40K YUSD stablecoins (1% stake * 4M YUSD stablecoins) plus an additional $27 in FXRP tokens accrued from fees. As we can see from the starting stake our user had above, if they were to exit the pool after this trade, they would have ~20% more FXRP and ~20% less YUSD. This would result in value totaling ~$79,627 ($39.6K FXRP + $40K YUSD + $27 FXRP fees) that can be redeemed from the pool. 

If our user had simply just held the 100K FXRP tokens and 50K YUSD stablecoins in their wallet, the total value of those two assets would be ~$83.3K ($33.3K FXRP + $50K YUSD). As you can see, our user staking would have been better off just holding these two assets than staking them in the liquidity pool for this one trade and then exiting. This is where the dreaded term impermanent loss occurs. Impermanent loss is just the opportunity cost of either holding two assets versus staking them in a liquidity pool. Sometimes holding two assets fairs better and sometimes staking them in a liquidity pool returns better. In this situation, the user staking has suffered a -4.6% ([$79,627 staking value – $83.3K holding value] / $79,627 staking value) or $3,673 ($79,627 staking value – $83.3K holding value) loss in value compared to having just held the two tokens. 

The beautiful thing about impermanent loss is that like its name indicates the loss is not permanent until you exit the pool. Users choosing to provide liquidity to FlareX will also have fees and YFIN being generated on a daily basis to counteract this. Therefore, if a user accrues enough staking rewards by the time they exit, then it is very possible that the reward amount cancels out any impermanent loss and actually puts the user at a gain over just holding the two assets. Also, this is a very extreme situation where the price of FXRP/YUSD declined rapidly due to one trade in the the liquidity pool as the value staked was not deep enough to prevent serious slippage from occurring. 

Also, if we assumed that the overall market price actually had not moved down to $0.33 for XRP, then there would be many professional traders looking to capitalize on the arbitrage opportunity presented here. If XRP is trading against some stablecoin on Binance for $0.50 still, then arbitrage traders would start swapping for the discounted FXRP price available via this specific liquidity pool until it is no longer profitable for them to do so. Rather quickly over time, these arbitrage traders would start swapping YUSD for FXRP at the discounted rate, which would result in more YUSD stablecoins being put into the pool and FXRP tokens being removed. This is how liquidity pools rebalance themselves in order to keep up with order book exchange pricing of assets. Eventually, the FXRP/YUSD asset composition would reach an equilibrium with the outside world. 

Arbitrage trading can help to greatly reduce impermanent loss incurred from liquidity pool swapping in a situation like this. However, if the change in FXRP/YUSD price within this pool reflected the overall market sentiment around the price, then there would not be much arbitrage to conduct and our liquidity staker would have suffered the impermanent loss described above. However, the user does not have to leave the liquidity pool and could wait for a more favorable FXRP/YUSD price ratio to exit the pool thus minimizing any perceived impermanent loss. 

Considerations for Providing Liquidity on FlareX

On their face, liquidity pools can seem rather intimidating for your average user to partake in. This is why it is important to understand the possible effects of staking your assets in a liquidity pool. By understanding the underlying mechanics, we can feel more comfortable with utilizing this amazing break through in DeFi and know how to mitigate the negative side effects like impermanent loss.

Impermanent Loss

  • higher positively correlated assets typically are the best crypto/crypto pairings for mitigating impermanent loss
  • crypto/stablecoin pairings typically are the most likely to suffer impermanent loss; unless there is a high negative correlation between the assets of a crypto/crypto pool
  • stablecoin/stablecoin pairings are the least likely to suffer impermanent loss as the price ratio theoretically should never change
  • staking your assets generates fees and potentially other rewards from liquidity pools, which counteracts impermanent loss
  • impermanent loss is incurred whenever the price ratio between two assets diverges after entering into a pool no matter the direction
  • the greater the divergence in the starting price ratio the more impermanent loss is incurred

Slippage

  • the lower the value of liquidity in a pool; the more likely slippage can negatively effect liquidity providers
  • higher value and volume pools typically can prevent significant slippage

Earnings

  • asset pairings will come with different rewards and incentives for providing liquidity
  • higher liquidity pool volume means more fees accrued
  • user stake percentage determines how much in fees each staker earns per trade
  • more time spent in a liquidity pool normally equates to more earnings

Timing

  • market tops are generally the best time to enter crypto/stablecoin pools
  • market bottoms are generally the worst time to enter crypto/stablecoin pools
  • if two assets in a pool have a high positively correlated price ratio, then timing is much less important to mitigate impermanent loss as the price ratio will be relatively stable

Aside from the considerations above, we are not touching on how to hedge impermanent loss incurred from liquidity pools as of yet. Options are one of the best tools to hedge impermanent loss; but, with the Flare Network being nascent, there are currently no derivative products to utilize with FlareX. However, I would expect to see these in the future especially with Flare’s focus on institutional-grade DeFi. However, users can employ a cost average strategy for entering liquidity pools especially during times of high volatility in token asset prices. We will cover this in the future. Please comment below with questions, research, or opinions.

*** The examples above are all theoretical in nature and used to demonstrate the effects of a trade on a given liquidity pool. I am not a financial or tax advisor. Individuals should conduct their own research before utilizing any financial products described on our website. 

FlareX – Liquidity Pool Videos