Providing Liquidity and Yield Farming in DeFi: Process, Benefits and Risks

  • Lending — You can lend out your digital assets to different protocols, which is nice because your yield is paid back in the asset you lend (though that’s not always the case…).
  • Single Asset Staking — You can go to specific protocols and stake your tokens with that protocol. These protocols reward you with more of that token.
  • Yield Farming — You can provide liquidity to Liquidity Pools, and then depositing those LP tokens in Yield Farms. Yield farming can provide some really juicy yields, but most times these yields are based on emissions from the protocol and are paid in the specific token trying to bootstrap liquidity.
  • Decentralized Option Vaults (DOVs) — You can deposit tokens into DOVs strategies (like Covered Calls and Cash Covered Puts, check out these articles) and earn yield by having these strategies sell options on your behalf. This ‘short volatility’ (short gamma) strategy can earn sustainable yields paid in the deposit tokens, but risks token loss when prices swing against you drastically. I would not recommend anyone doing these strategies on their own unless you are well versed in options trading and theory. Please use a DOV instead (and please understand the risks you are taking, no yield is free!).

So what is Providing Liquidity

Different combinations of Supply of Tokens A and B that keep the Constant Product AMM at a 50/50 Ratio

So what is Yield Farming

  1. harvest your farming rewards (usually paid in the token trying to bootstrap liquidity)
  2. Swap 1/2 of the rewards into the other token
  3. Deposit both tokens (in that 50/50 value split) into the Liquidity Pool
  4. Take your new LP tokens and deposit into the farm

What are the Risks?

Stylized Example Showing Impermanent Loss and Yield

  • Token A is priced at 100 USD, token B is priced at 1 USD (and never changes)
  • You initially supply 10 tokens A and 1000 tokens B, for a total 100 * 10 + 1000 * 1 = 2000 USD
  • The AMM charges 30 bps per trade (that is the AMM fee) and the total yield you receive is 20% annualized
  • You would have 7.06 tokens A and 1416.33 tokens B.
  • Your total value of the LP position would be $2868.12 and the total value of hodling would have been $3000 (1000 of token A * 200 + 1000 of token B * 1).
  • Your gain is 43.4%, but you could have been up 50%, so you missed out on $131.88 of gains.
  • Your IL + Yield would be (2868.12- 3000) / 3000 = -4.39%.
  • You would have 14.12 tokens A and 708.17 tokens B.
  • Your total value of the LP position would be $1442.28 and the total value of hodling would have been $1500 (1000 * 50 + 1000) .
  • Your loss is -27.89%, but you could have only lost 25%, so you had an extra loss of -$57.72 .
  • Your IL + Yield would be (1442.28- 1500) / 1500= -3.85%.
  • You would have 9.99 tokens A, 1001.5 tokens B (it changes only because of fees)
  • Your total value of the LP position would be 2032.88 and the total value of hodling would have been 2000.
  • Your gain is 1.64%, that would have been 0% if you did not provide liquidity, so you had an extra gain of $32.88.
  • Your IL + Yield would be (2032.88–2000) / 2000 = 1.64%
P&L from Hodling the initial supply of both tokens (Orange) versus Providing Liquidity & Yield Farming (Blue)
The difference between Hodling both tokens vs Providing Liquidity (orange minus blue above)

How Do I Provide Liquidity and Yield Farm (Solana Example)

  1. Take 0.5 SOL and swap it for 10 RAY (= $50 worth of SOL into $50 worth of RAY) (I would recommend checking out Jupiter Exchange https://jup.ag/ for all swapping needs on Solana)
  2. Take 0.5 SOL and the new 10 RAY and supply it to the RAY-SOL LP
  3. Take you new RAY-SOL LP Tokens and deposit them in the RAY-SOL LP Farm
  4. Wait until you have some RAY token rewards
  5. Harvest your RAY Rewards
  6. Swap half of your RAY rewards back into SOL
  7. Repeat steps 3:7

About the Author

--

--

--

TradFi background, DeFi Degen. Love SOL, ADA, ETH, DOT, NEAR, Aurora, ALGO, MIOTA plus NFTs

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The 5 Biggest Crypto Exchange Hacks in History

The Fundamental Knowledge of Lightning Network is a “Layer 2” Payment Protocol

More on “Those !@#$%^& Secondary Markets”

The spread continues but fear is not rising…

SWYFT Official Project Update July 30th

Litecoin Price Prediction: LTC/USD Targets $300 Resistance

Litecoin Price Prediction

Sushi's Rolling Up To Optimism!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marco_112358

Marco_112358

TradFi background, DeFi Degen. Love SOL, ADA, ETH, DOT, NEAR, Aurora, ALGO, MIOTA plus NFTs

More from Medium

ThetaNuts— deep dive into a multi-chain contender of the DeFi Option Vaults(DOVs)

Leveraged Yield Farming — Can it be Delta-Neutral?

Apricot EDU: How to Open a Delta Neutral Farming Position

Mercurial Finance — Maximizing Utility & Yield of Stable Assets on Solana