Yield Farming - Yearn Finance - Crypto Academy S5W3 - Homework Post for @imagen

in hive-108451 •  3 years ago 


image.png


Hello everyone...

It feels really good to be part of this week's lecture with professor @imagen. Learning about DeFi and the many opportunities in the ecosystem has given me so much confidence in my knowledge of blockchains and cryptocurrencies.

The solution to my homework task is presented below. I hope you enjoy reading.


Staking and Yield Farming


Aside from buying and hodling crypto assets, the Decentralized Finance (DeFi) ecosystem provides other channels through which holders of crypto assets can gain more value without losing exposure to their assets. Some of these channels which are explained further in the next few paragraphs include Yield Farming and Staking.


Yield Farming



yield farming
Image source


This is a process where owners of crypto assets provide liquidity with their assets in exchange for percentage returns on the committed capital. Yield Farmers are also called **Liquidity Providers, ** and mostly operate within Decentralized Exchanges and DeFi protocols like pancakeswap, Uniswap, 1inch finance, Compound finance, etc.

Since DeFi protocols have no human control and function solely based on smart contracts. People utilizing the various services on the numerous DeFi platforms do so against Automated Market Markers (AMMs). That is, people buying, swapping, etc., on the numerous DeFi protocols do so against liquidity pools.

These liquidity pools have coins collectively contributed by various liquidity providers to enable transactions, and in return, they earn fractions of the transaction fees on each transaction processed with asset within a pool as their Annual Percentage Yield.

In a typical yield farming scenario, assets are always listed in a pair of two. This is because, for every trade taken, there is always a buyer and a seller. In this case, since trade is done against a liquidity pool, both assets involved in the pair will be staked at equal value in a liquidity pool to appropriately provide for buyers and sellers respectively.

When liquidity providers add their assets to a liquidity pool, they are often rewarded with Liquidity Pool (LP) tokens which function like receipts, representing providers' share of a pool. These LP tokens mark the share of returns that will be allocated to its holder and is also a fungible token that can be exchanged or staked in its own right.

The APY for liquidity mining is usually set very high because of the risks involved in maintaining a pool. To serve as an incentive to providers, the APYs often come in a range of double-quadruple digits (in percentage).


Staking



staking
Image source


Staking in the DeFi ecosystem is quite different from what is obtainable in layer 1 blockchains that use the Proof-of-Stake (POS) consensus mechanism. While layer 1 POS blockchains generally use staking as a criterion for electing network validators to secure the network, staking in the DeFi ecosystem is slightly different.

Staking in the DeFi ecosystem can be likened to a fixed deposit in the Traditional Finance ecosystem. Crypto assets are simply locked up in a staking pool like money gets fixed in banks, and returns are earned over a vesting period.

A clear distinction here is that, unlike the yield farming scenario, staking is done with one crypto asset, and the rewards are given in terms of the staked asset. Staking is always associated with minimal risk. Hence the APY on staking is usually low, ranging from single to double digits.


Difference between Yield Farming and Staking


Yield FarmingStaking
A pair of two assets is involvedJust one asset is involved
Average returns are always highAverage returns are usually low, relative to yield farming
Capital is exposed to high risk of lossesCapital is relatively safe

The Yearn Finance platform, functions and process of trading (wallet connection, funds transfer, available options)


To get started, I have launched the Yearn Finance website and had the landing page displayed. There is a side navigation bar with menu items containing the features available on the platform. These features are explored below:

Home



YF explore 1.png
Image source


This is also the landing page of the platform. It features the user's dashboard as well as vault earnings. The annual yield of the various DeFi services explored by the user is also displayed here.

Wallet



YF explore 2.png
Image source


The wallet segment is where user holds tokens after deposit to use in the various DeFi services available on the platform.

Vault



YF explore 3.png
Image source


The vault menu contains options that gives the user access to manage their assets, choose strategies and deposit their funds to the numerous pools available.

Labs



YF explore 4.png
Image source


In this segment, new and emerging strategies are listed. It is always advised that users of the platform apply caution while using any product in the lab segment, as they are mostly unaudited and have a high risk exposure.

Iron bank



YF explore 5.png
Image source


When users cannot find a suitable vault to commit their assets, they can send them to the iron bank. Also, through the iron bank segment, users can offer their crypto assets as collateral to obtain loans.


Connecting Wallet


To connect a wallet to the yearn finance platform, I will use the following steps:



YF connect wallet 1.png
Image source


  • On the landing page, click on "Connect wallet". Wallet options will be displayed.


YF connect wallet 2.png
Image source


  • Next, choose a preferred wallet, log in your details and proceed to "Connect" in the dialogue box that will appear.


YF connected wallet.png
Image source


  • Once wallet has been successfully connected, the wallet address will be displayed at the top of the screen.

**Transferring Funds


To make a transfer on this platform, follow these few steps:



YF transfer 1.png
Image source


  • Go to the Vaults section and select any asset of choice from the opportunities segment


YF transfer 2.png
Image source


  • On the resulting menu, supply the required information. E.g Amount to be trasnferred, etc., and proceed to approve transaction.

Borrowing Funds


To borrow funds on the Yearn Finance platform,



YF Borrow 1.png
Image source


  • Click on the Iron Bank section and proceed to click on your desired asset ( I chose the sUSD).


YF Borrow 2.png
Image source


  • Set the required parameters after you must have agreed to quoted APY, then click on Borrow.

Q3: What is collateralization in Yield Farming? What is the function?


In the traditional financial system, market participants can who own valuable assets like houses, lands, gold bars, etc., can use them as collateral to obtain debt instruments.

In the DeFi space, the same applies to crypto assets. In order not to lose exposure to their desired assets, crypto asset owners who do not want to risk selling them off their at a loss, can put these assets up as collateral in order to obtain loans.

The process of turning these crypto assets to collateral for loans is known as collateralization. This collateral serves as a downpayment redeemable by the Lender in an occasion where the borrower defaults on their loan repayment.

As a general practice, since the DeFi space is one without priority for Know-Your-Customer (KYC) verifications. The collateral-loan ratio is always high to cover for the possibility of downside risks. Hence, loans are always Over-collateralized because the value of the loan is usually a fraction of the collateral.


Q4.0 a) What is the TVL of the DeFi ecosystem?



YF TVL DeFi.png
Image source


At the time of writing, the TVL of the DeFi ecosystem as obtained from Defipulse is $97.6 Billion.

What is the TVL of the Yearn Finance protocol?



YF TVL MCAP.png
Image source


The Total Value Locked in the Yearn Finance protocol at the time of writing is valued at $6,905,420,545. This accounts for about 8% of the TVL in DeFi protocols.

What is the Market Cap / TVL ratio of the YFI token?

To obtain the Marketcap/TVL ratio, we will do a little division using the parameters below:

  • Marketcap = $899,575,704
  • TVL = $6,905,420,545

Marketcap/TVL ratio = $899,575,704/6905420545
= 0.13

(4.1.) The YFI token, is it overvalued or undervalued? State the reasons

Judging from what was given in the lectures, since the Marketcap/TVL ratio is 0.13, it can be concluded that asset is undervalued because the ratio is less than 1.

However, other things being equal, this presents investors with an opportunity to buy at a discount because it is believed that every undervalued asset would always converge to its fair value.


If on August 1, 2021, you had made an investment of 1000 USD in the purchase of assets: 500 USD in Bitcoin and the remaining 500 USD in the YFI token, what would be the return on you investment in the actuality? Explain the reasons.


First, let's obtain the prices of these assets for the set date - August 1, 2021.

AssetPrice (August 1)Quantity/500USDPrice (Dec 4)Current portfolio value
BTC$41,796.650.0120 BTC$47,843.14$574.12
YFI$33,063.060.0151 YFI$25,480.32$384.75

ROI (BTC ) = ($47,843.14 - $500)/$500 = 14.8%
ROI (YFI) = ($384.75 - $500)/$500 = -23%



YF BTC YF.png
Image source


Here is a screenshot containing a measured distribution of both assets over the said period of time. It is evident again that BTC has managed to remain profitable throughout the period specified, While YFI has performed poorly.


Q6: In your personal opinion, what are the risks of Yield Farming? Give reasons for your answer.


Some of the risks associated with Yield Farming include the following:

  • Impermanent Losses: Crypto assets are characterized as a highly volatile asset class. That is, the price movements are not predictable. In a case where assets are locked up in a Liquidity pool, asset owners may suffer impermanent losses if the market value of their asset falls during their vesting period. In that case, the yields generated from Liquidity Mining may not compensate for the value lost to market volatility.

  • Exit Scams: Since Yield Farming is all about searching for the pools that will generate the most yield, crypto-asset owners often fall prey to exit scams. These scams often come as new project tokens paired with an already established token in a pool that promises very high returns. When asset owners pump liquidity into the pool, the scammers would drain the pool of all the valuable established tokens, leaving Famers with worthless tokens of the new scam project.

  • Code Error: Yield farming is an activity that belongs to the Smart contracts powered DeFi space. This implies that there are no regulations or control of any sort because every interaction is done with programs pre-defined in the codebase. A simple error in the smart contract programming can be utilized as a loophole by bad actors to launch an attack on the program.


Conclusion


Decentralized Finance has been at the fore front of the financial revolution spearheaded by blockchain technology. Activities like staking and yield farming have taken lead in servicing numerous investors and market players who are willing to take risks to earn more income from their crypto assets.

Although the rate of adoption is growing daily, there is a great need for enthusiasts in the space to engage in proper knowledge acquisition to be able to maximize the opportunities and products that exist.

Thank you for reading...*


CC: @imagen

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...