BROTON'S BLOG

Yield Farming

Manuals
If you already got XPR in the Proton Wallet, you are just a few steps away from getting started to earn a return on your crypto. If not yet, you should read this first. 👆

You can also check out the infographics specially created to illustrate the key concepts of yield farming 📊


What is farming?


Yield Farming (a.k.a. liquidity mining) is a way of making passive income on your crypto, temporarily lending it to DeFi platforms like Proton Swap.

Lenders (liquidity providers) provide liquidity to decentralized exchanges (DEX) and enable users to make trades for a piece of commissions they pay for each transaction.

What is Proton Swap?


Proton Swap is an official Proton dApp (Decentralized Application) providing DeFI (Decentralized Finance) features to Proton users. It consists of four parts:

  • Swap (Decentralized Exchange for exchanging one cryptocurrency to another fast and secure)
  • Pools (Provide DEX with liquidity and enable liquidity providers to earn returns from swap fees)
  • Farms (Helps liquidity providers to earn high APY to attract more liquidity to the DEX)
  • Bridge (Connects Proton with other blockchains allowing to deposit, wrap and withdraw other cryptos)

How does farming works?


The farming process consists of two stages:

  1. Providing liquidity
  2. Directly the farming itself

You can not start farming without providing liquidity to the liquidity pools. Let's talk about everything in order...

Providing liquidity


By the way, providing liquidity is an independent way of earning passive income in fees that users pay for each trade on Proton Swap.

Go to the Pools section of Proton Swap. At the bottom of the page, you'll see a list of available pools, but consider that farms are not available for all the currency pairs. There are two farms open at the moment of writing: XUSDC-XPR and LOAN-XPR.


For our example, we choose the XPR/XUSDC liquidity pool and further the XPR-XUSDC farm. So, in the window above, we should select XUSDC and XPR, like on the screenshot below:


A liquidity pool always consists of two currencies - in our example, it's XPR/XUSDC. An equal supply of value must be deposited for both assets. The current price of XPR is 0.014389 XUSDC, so if we want to deposit 50 XUSDC, we must also deposit the exact value of XPR - 3474.9306. This is calculated automatically.

If you don't have one of the assets in your wallet, you can get it by exchanging one asset for another at the Swap section of the Proton Swap web app.

Put your numbers into the fields, and press Add liquidity. You should see the popup asking you to open your mobile wallet WebAuth.com to confirm the transaction.


If all is successful, you will be returned to the Proton Swap and see your liquidity:


Here you can see your Pool tokens, also called LP tokens, which you receive instead of the assets you provided to the pool. These LP tokens reflect your share of the total pool liquidity.

That's it! We have just provided our liquidity to the pool, so now users of Proton Swap can use our tokens for exchange (swap) operations. For each trade, a user pays a small fee of 0.3% (0.2% distributes to the liquidity providers according to shares, and 0.1% will be burnt).

Rewards from swap fees are accumulating and can be taken at any time by removing funds from the liquidity pool. To do that, you should select a value using the slider and select Adjust. Your tokens will be released immediately and LP tokens will be withdrawn.

Yield Farming


Proton Farms allows you to get even more from the liquidity you provided to the Pools by staking your LP tokens and earning APY, which is higher than returns from the swap fees.

APY (Annual Percentage Yield) is a variable value that defines current interest on funds provided to the farm and includes the following components:

  • Share of Proton Swap fees (the same as if you were providing liquidity)
  • Farm APR (provided with 1% annum inflation and depends on the total amount of liquidity in the farm)
  • Compounding of already earned rewards

You can find existing farms and their APY on the Farms section of Proton Swap - go there and open the XUSDC-XPR farm. Press Update Stake, select the maximum LP tokens amount and press Confirm. You should see a standard confirmation popup - open your WebAuth.com wallet and authorize the transaction.


If all is successful, you will be returned to the Proton Swap and see your farm:


The rewards begin to earn immediately, and you can watch how they increase in real-time.

To get the rewards, press the Harvest button, sign the transaction, and they will be deposited to your account instantly.

To remove your LP tokens from the farm, press Update Stake and adjust the slider:



What are the risks?


The impermanent loss must be considered when you provide liquidity to a liquidity pool. The more the price of your deposited asset changes, the more the impermanent loss is, which means less dollar value at the time of withdrawal than at the time of deposit.

Let’s see it on an example*:

  • the XPR-USDC pool contains 90,000 XPR + 4,500 USDC (1 XPR = 0.05 USDC)
  • You deposit assets of equal value: 10,000 XPR + 500 USDC (1,000$ in dollar value)
  • After deposit the pool contains: 100,000 XPR + 5,000 USDC. Your share in the pool is 10%

*All numbers and calculations do not pretend to be accurate and are given only to illustrate the impermanent loss mechanism.

Let's take a look at three scenarios:

1. Price dropped to 0.01 USDC

  • Total liquidity in the pool: 400,000 XPR + 1,250 USD
  • Your 10% share: 40,000 XPR + 125 USD
  • Dollar value of your share: 525$ + reward
  • If you were HODLing, you have: 600$

2. Price not changed - 0.05 USDC

  • Total liquidity in the pool: 100,000 XPR + 5,000 USD
  • Your 10% share: 10,000 XPR + 500 USD
  • Dollar value of your share: 1,000$ + reward
  • If you were HODLing, you have: 1,000$

3. Price increased to 0.1 USDC

Total liquidity in the pool: 50,000 XPR + 10,000 USD
Your 10% share: 5,000 XPR + 1000 USD
Dollar value of your share: 1,100$ + reward
If you were HODLing, you have: 1,500$

When the price of at least one asset changes, the proportion of the assets in the pool also changes, so if you withdraw your funds, you will get another amount of coins than you deposited.

👆 You can see that when the price changes, the HOLD strategy wins if not to take the reward into account. So, it all depends on the reward amount, which depends on APY and timeframe. The reward may compensate for the loss or not. Also, it should be considered that the “loss“ is temporary (impermanent) and can change back to zero if the price of the assets returns.

Staking vs. Farming?


This is one of the most frequently asked questions: which is better, staking o farming. The answer depends... 😁

Let's look at the pros and cons of each:

Staking


  • No risks (if not to take into account the risk of devaluation of the asset itself)
  • Lower than Farming APY, %
  • Staked funds are locked (for 24 hours for $XPR and from a week to four years for $LOAN)
  • You need just one asset (XPR) for staking

Farming


  • Risk of the impermanent loss
  • Higher than Staking APY, %
  • No locks
  • You must deposit a pair of assets of equal value

As you can see, there are some key differences. The more the risk is, the more the profit, and vice versa. In our opinion, Staking is better positioned for HODLing, and Farming more likely will suit you if you want to have a higher stable passive income.

Choose between Staking and Farming depending on your own goals, or combine both methods of earning returns on your crypto with Proton.

Well, Broton! Now you are educated enough to make your own choice. I wish you success in your further study of the Proton ecosystem! And don't forget to vote for ⚛️ BROTON BP ⚛️ when staking your XPR 🤙