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

in SteemitCryptoAcademy3 years ago

iMarkup_20211129_183821.jpg

INTRODUCTION.

It is my delight to contribute to steemit cryptoacademy this week. The lessons of professor @imagen has enlightened we students on the many advantages of DEFi .

It is a good thing that decentralized finance platforms are coming up with many innovative ways of making money with our cryptocurrencies other than just hodl. This innovations like "staking" and "yield farming" enables crypto investors to make some good money using their coins.

In this assesment task, I will dwell on yield farming. I will also examine one of the platforms that offer this services "yearn finance". The post is an assessment task on #cryptoacademy season 5.

1•

"Describe the differences between Staking and Yield Farming."
AddText_11-26-08.11.44.jpg

To help established the difference between "staking" and "yield farming", I believe we should approach each subject differently.

WHAT IS STAKING?

Staking a coin refers to the act of an investor locking up his cryptocurrency for a stipulated period and in exchange for such investment he earns a block reward.

Staking is associated with cryptocurrencies with proof of stake consensus mechanism. For example, Blockchains utilizing proof of work consensus algorithm require miners to solve some maths puzzles to validate blocks. With the current reality of mining a block, miners invest so much fund in acquiring high equipment with good computational power to increase their hash rate, since the higher the hash rate, the more chances a miner has to mine new blocks and earn block reward. Simply put, a miner in proof of work invests on equipment and electricity bill. The more efficient his equipment the more chances he has to mine. On the other hand, validators on proof of stake consensus mechanism invests in the project itself instead of on machines. They buy stake by investing a huge amount of money to purchase the coin of the very crypto project. For them to be able to validate a block they will need to lock up their purchased coin as collateral. The locked up coin will be a confirmation that they will act honestly, if they don't, their locked up fund is threatened.

Crypto projects on proof of stake consensus algorithm has a minimum threshold of investment that a user desiring to validate a block is required to lockup. Users who could not reach such minimum requirement can then pool their fund together in what is known as a staking pool.

Staking Pool.

For users who may not have enough resources to participate in staking can join a staking pool. This refers to user's pooling their fund together as one node in other to participate in staking. By joining a staking pool, a user adds to the staking power of the pool. The dividends are shared in accord with the proportion of one's stake.

YIELD FARMING.

Yield farming involves an investor ( liquidity provider) staking or lending his coin to a Decentralized finance platform (DEFi) and earns interest for his investment.

To understand the yield farming, we may make a little comparison of yield farming or Liquidity farming with the concept of fix depositing money in centralised banking system. When one fix deposit fund in a bank, he has locked up the fixed amount for a certain period. It is therefore a way of borrowing to the bank. The bank will then use the fund to do business of lending to other customers and collect interest. A meager percentage of the interest made from the lended money will be used to pay the borrower an annual interest.

In a similar manner, in yield farming, LPs ( liquidity providers) lock up their funds in a smart contract. The fund are used by the DEFi platform to do financial business like lending. Through a coded mechanism, or what we know as automatic market maker (amm) such is achieved and interest calculated for the LP for a year period.

SIMILARITIES.
  • Both staking and yield farming involves an investor locking up fund for a needed period of time.
  • Yield farming involves staking.
  • Both are means of providing liquidity.
DIFFERENCE BETWEEN YIELD FARMING AND STAKING.
1• INVESTED PROJECT:

One notable difference between staking and yield farming is the platform to which LPs provide liquidity. In staking, liquidity is provided to a Blockchain project whereas in yield farming, liquidity is provided to a smart contract built on Blockchain

2• FUND USES.

When you do staking in a platform with proof of stake consensus algorithm, you lock up your fund as a collateral in other to validate block. On the other hand, when you provide liquidity to a DEFi project, you are borrowing your fund to be used by the platform to do business.

3• REWARD.

Although both are rewarded for the fund staked, the rewards are different. The reward of staking or participating in a staking pool are newly minted coins. Meanwhile yield farming offer interest to LPs for the liquidity added. Some DEFi offer periodical compounding interest to liquidity providers.

4• METHODOLOGY

Just as pointed above, in staking a user invest in a Blockchain to validate block. The method involves investing in the native coin of that project to enable him validate blocks. He will need to hold a certain stipulated amount in his wallet which will not be spent in other to qualify to validate block. In yield farming however, a Liquidity provider is not investing in a native token of the smart contract but lending his coin for business in the platform. For example, a Liquidity provider may lend his stable coin ( USDT, dai, busd ). By lending it, he is releasing it to be used by the platform for business, in exchange, a native token of the DEFi project worth the amount of his investment is issued him as receipt. When he want to opt out, he can swap the token and the profit made back to his original coin.

Among the DEFi platforms offering yield farming includes "compound", Aave, yearn finance. Let's take a look at yearn finance.

2•
"Login to Yearn Finance. Explore the platform completely and indicate its functions. Describe the process for trading on the platform (wallet connection, funds transfer, available options) Show screenshots."

AddText_11-26-08.11.44.jpg

YEARN FINANCE.

Yearn finance is a good example of a platform involved in yield farming. As explained above, yield farming is a way an investor earns by lending or locking his coin to a DEFi protocol. The good thing about yearn finance is that the platform source out the best yield protocols out there, allowing it's investors to choose from the best yield. They do this by partnering and integrating the best of defi yields to be accessed under one platform - yearn finance. Additionally, users can lock their tokens to trade new launched coins.

Yearn finance equally has its own token YFI . YFI is the native token and a token for governance in the ecosystem.

FEATURES OF YEARN FINANCE.

In the latest upgrade of yearn finance platform, we notice modification and intuitive interface. There are some features but three main features noticeable once at the homepage.

WALLET.

This feature simply directs us to where to connect our wallet. We will discuss more on that later.

VAULTS.

This feature utilizes technology to get the highest APY for users. A user can simply choose a desired vault, invest in it and allow the platform compound interest using the vault.
Withdrawal is possible at anytime convenient for the user.

iMarkup_20211201_233950.jpg
yearn finance

The vault feature targets the best yield from different DEFi platforms. A user can lock up his coin to participate in the many benefits of vaults.

LAB.

Another feature is the lab feature. This feature presents the very yield farming of the yearn finance. Investors who wish to add liquidity to yearn finance protocol can access the many defi benefits by investing in any of the listed programs on this section.

You would need to invest your stable coin to trade, the equivalent of your coin is minted in ytoken and with it the platform automatically trades for you , investing your money in the best yield APY available.

iMarkup_20211202_002330.jpg
yearn finance

IRON BANK.

This feature allows users to lock up their stable coins and also Ethereum in other to have exposure with new available tokens. The good thing about the iron bank is that you may not need to sell or exchange your token in other to buy new or invest in new crypto coins. You can simply lock your stable coin or your Ethereum in the platform as collateral and then borrow the coin you want.

As you may notice from the image below, there are three coins listed. The USDT, usdc and wrapped Ethereum wETH.

iMarkup_20211202_003401.jpg
yearn finance

  • You may equally notice the "settings" feature which allows for our private customization like choosing mode and appearance etc.

iMarkup_20211202_071525.jpg
yearn finance

HOW TO ADD YOUR WALLET TO YEARN FINANCE.

To add wallet is quite simple. We can choose a wallet that supports Ethereum because yearn finance is built on Ethereum Blockchain. For this task, I will demonstrate how to do it making use of metamask.

steps.

Just ensure that you have created a metamask wallet. Once your metamask is ready, then use the connect wallet feature found on the yearn finance platform.

In the below image, you can click on the connect wallet then choose metamask in the selection box that pup up.

iMarkup_20211202_005438.jpg
yearn finance

Next, log into your metamask account using your password to authorize the connection. This may require three steps as indicated in the images below.

First, input your personal password to log into metamask.

iMarkup_20211202_011111.jpg
yearn finance

Your Ethereum wallet address will be picked automatically by the software. Click on next.

iMarkup_20211202_005921.jpg
yearn finance

Then lastly in the next screen, simple click on "connect" to add your wallet.
We are done !

iMarkup_20211202_010014.jpg
yearn finance

The image below shows that you have successfully connected your metamask wallet to yearn finance platform.

iMarkup_20211202_010200.jpg
yearn finance

HOW TO TRADE ON YEARN FINANCE.

I made few observations with my interaction with this platform. Trading on yearn finance involves a simple process, every step seems modified to achieve same objective. All an investor need to do is choose from the many opportunities available on the platform.

For example, on the iron bank feature, I experimented using USDT.
All you need to do, click on the USDT as based currency. You have two options, to supply or to borrow.

Click on the supply button to add liquidity, you will be taken to your wallet for authorization. Once done, a commission fee will be charged.
The platform then does the rest.

iMarkup_20211202_074825.jpg
yearn finance

3•

"What is collateralization in Yield Farming? What is function?"
AddText_11-26-08.11.44.jpg

Collateralization refers to the act of providing collateral in a form of a coin in other to borrow another. DEFi protocols performing lending and borrowing services requires collateral to lend fund for users desiring to participate in yield farming.

Yield farming is indeed a vast and complex field. It tends to incorporate most of the functions of a centralized banking system. Take for instance in centralised banks, to take a loan requires a collateral that would cover the loan, In event the the borrower was not able to pay back the loan, the collateral will be auctioned to cover back the
lended money.

In yearn finance for instance, the iron bank feature allows for collateralization. A user deposits a stable coin like the the usdt as collateral to acquire a new coin of choice. The USDT coin is not sold or swapped for another coin but rather it is locked up in the the system as a collateral for the user to borrow any coin of choice. The protocol will then lend the user equivalent in value of the staked coin in other for him to participate in yield farming.

Each platform has it's requirement. Some platform accept high collateral maybe double of the amount a user intends to borrow. For example, I invested $200 worth of usdt to borrow say ( y ) coin to join yield farming. I may only by allowed to borrow $100 worth of (y) coin to farm. The excess is necessary to avoid liquidation.

Liquidation could occur when the value of the staked coin depreciates. Suppose $200 staked usdt now worth $100 due to USDT entering a deep, the account may need to be liquidated to avoid a possibility of going below the $100 borrowed amount. Once it goes below that threshold, the stake is invalidated. The way to avoid this is for the investor to add more fund to his stake. [ Use of usdt in this illustration is typical since usdt is pegged to a dollar ]

4•

"At the time of writing your assignment, what is the TVL of the DeFi ecosystem? What is the TVL of the Yearn Finance protocol? What is the Market Cap / TVL ratio of the YFI token? Show screenshots."
AddText_11-26-08.11.44.jpg

Total Value Locked (TLV)

Refers to the total value in USD of the coin invested or locked in the entire DEFi platforms or a single DEFi project. The metrics is used to determine how viable a DEFi project is by accessing it's adoption rate in the value of USD.

ENTIRE DEFI ECOSYSTEM.

As at the time of writing this assignment, there are up to $198.97 billion locked in the entire DEFi ecosystem according to defipulse.com data.

iMarkup_20211202_171427.jpg
defipulse.com

Yearn Finance TVL.

Still from the same data center and checking the TVL of Yearn Finance, there are up to $4.45b locked in yearn finance ecosystem. Below is the data from defipulse.com.

iMarkup_20211202_171707.jpg
defipulse.com

The volume of investment in yearn finance is an indicator of it's viability. Another aspect necessary to consider is it's capitalization.

Yearn Finance market cap.

Today December 2 2021, YFI the coin of yearn finance is trading at $28,446.64

Having a market cap of $1,043,425,934

iMarkup_20211202_173303.jpg
coinmarketcap

Calculating the market cap/TVL ratio.

The formula for calculating the TVL ratio is dividing the TVL of a DEFi project with it's market cap.

In the case of yearn finance, the TVL is $4.45 B according to defipulse.com metrics.
Market cap is $1,043,425,934
TVL ratio = MC/TLV

1,043,425,934/4,450,000,000
= 0.234477737977528
market cap/TVL ratio = 0.234

However the data provided by coinmarketcap gives the total value locked (TVL) as $6,016,964,287

iMarkup_20211202_203846.jpg
coinmarketcap

Using the data provided by coinmarketcap, we will have Market Cap / TVL Ratio as
0.174

4.1•
"The YFI token, is it overvalued or undervalued? State the reasons."

The YFI token is undervalued.
To determine if a coin is undervalued or overvalued, we check the market cap/TVL ratio, if the ratio is above 1, then it is overvalued, if it is below 1, it is undervalued. In this case, we have the market cap/ tvl ratio as below 1 which means that the coin is undervalued and still have investment opportunities.

5•
"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 your investment in the actuality? Explain the reasons."
ROI of BTC from August 1, 2021

To get the ROI of BTC we will check the price of BTC as at August 1, 2021 and the price of BTC today.

As at August 1 2021, BTC traded at $39,862.91.
If that is the case, we need to find out the value of our investment if we had invested $500

Let's do some math here.
100,000,000 Satoshi made 1 BTC . That means as at August 1, 1 Satoshi is equal to 0.0003986291 ( we got this record by dividing the price of 1 BTC with 100,000,000 in other to get the price of 1 Satoshi)

If I had invested $500 , that will mean 500 ÷ 0.0003986291 ( which is the price of 1 Satoshi) That will give me the value of the coin I purchased which is 1,254,298.795547038 Satoshi. Therefore with $500, I have 1,254,299 ( in approximation) Satoshi

As at today, 2 December 2021, BTC is trading at
$56,908.10USD.
Let us also get the price of 1 Satoshi as at today.

56,908.10 ÷ 100,000,000 = 0.000569081
As at today, 1 Satoshi = 0.000569081

Remember we purchased 1,254,299 unit of satoshi with $500. Therefore to get the value of our investment as today, we will multiply the unit of satoshi we had acquired with the value of
the price of 1 Satoshi as at today.

1,254,299 × 0.000569081 = 713.797729219
Our investment value as at today will amount to $714

When we subtract it from our initial capital, we will have ( $714 - $500) $214
BTC ROI = $214

ROI on YFI.

As at August 1 2021, YFi token traded at 33,975.38

For the interest of understanding, let's assume the same calculation we used for BTC.
If for instance, let's assume the smallest unit of YFI to be ( 1÷ 100,000,000)

Which means at August 1, 2021 price of the smallest unit of YFI = 33,975.38 ÷ 100,000,000 gives us the smallest unit to be 0.0003397538

To get the quantity our $500 can buy, we divide $500 by the result of the smallest unit.
500 ÷ 0.0003397538 = 1471653.885843219

The number of unit we should supposedly have would be 1,471,653 units.

As at today, the price of YFI token is $28,973.05
Following same method, we find the value of the smallest unit for today by dividing the price by supposedly 10,000,000 which = 0.0002897305

When we multiply the unit we acquired with $500 with the price of today's smallest unit we will get
1,471,653 × 0.0002897305. = 426.3827595165
= $426

To determine if we have made profit or loss, let's subtract the initiative deposit ($500) from today's reality $426

426 - 500 = -74

We ran a deficit of $74 USD in our investment into yearn finance.

What is our total return on investment.

Remember we invested in all $1000 ( $500 on BTC and $500 on YFI)
let's now add all the returns and subtract our initial capital from it .

$714 + $426 - $1000 = $140

Total ROI = $140

If we add 140 to our initial capital, we now have $1,140.

AddText_11-26-08.11.44.jpg

6•

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

AddText_11-26-08.11.44.jpg

1: Smart contract risk.

As we already know, smart contracts are code computed on a Blockchain, codes can have bugs or errors, these errors if unchecked can lead to loss of money.

Another risk associated with smart contract is the risk of hacks. Bad players can take advantage of a bug or a code error to steal investors money. Cyber attack is still a problem with DEFi protocols.

2: Scam yield farms.

I will not fail to comment on scams because this has become an in-game for bad players. The fact that anyone can build a code on top of a Blockchain gives scammers access to code fake DEFi projects only to disappear with people's money.

3: Liquidation.

As I have explained above, a coin we used as a collateral in staking in yield farm may depreciate in value and may no longer sustain our yield farming business. Our account may be liquidated leading to loss.

7•

CONCLUSION.

AddText_11-26-08.11.44.jpg

DEFi products keeps innovating with new ways of making profit for clients. Staking and Yield farming is one of such ways to make good income in cryptocurrency other than hodl or normal trading.

Yield farming is broader then staking. While both involves locking up one's coin for a certain period of time to earn profit, yield farming is more diversified.

Yearn finance is a DEFi aggregator pulling best of defi on one platform to allow it's users benefit from the best yield of DEFi.

Sort:  
Loading...

Coin Marketplace

STEEM 0.15
TRX 0.12
JST 0.026
BTC 56787.81
ETH 2507.96
USDT 1.00
SBD 2.24