APY / APR

INTRODUCTION

APR : Annual Percentage Rate

  • Annual percentage rate (APR) refers to the yearly interest generated by a sum that's charged to borrowers or paid to investors. In DeFi, this means yearly funds that you get as investment interest, and gives the rate of return [1][4].

  • Does not take the effect of compounding into effect

  • This figure may include fees that borrowers pay. It’s a useful tool for comparing different investment products since it provides a consistent basis for presenting annual interest rate data.

  • It is calculated as following in DeFi : APR = ([(Fees + Interest) ÷ Principal] ÷ n) × 365 × 10 N = number of days in the term [1]. For eg : if you have 1000 coins with 10% yearly rate, you will have 1100 coins by the end of first year, 1200 by the end of second and so on

APY : Annual Percentage Yield

  • The annual percentage yield (APY) is the real rate of return earned on an investment, taking into account the effect of compounding interest [2].

  • Compounding interest is calculated periodically and the amount is immediately added to the balance. With each period going forward, the account balance gets a little bigger, so the interest paid on the balance gets bigger as well [2].

  • Although commonly associated with traditional savings, APY is a crucial metric for crypto savings programs and works similarly. Crypto investors can earn APY on cryptocurrencies by staking them, putting them in savings accounts, or providing liquidity to liquidity pools via yield farming [1].

  • Typically, investors will earn interest in the same cryptocurrency as that in which they’ve deposited. However, there are instances where they can be paid in the same or a different currency.

  • The calculation of APY in crypto is the same as it would be in traditional finance, and the goal is similarly to come up with a percentage yield. However, there are other ways of calculating APY depending on the exchanges.

  • The 7-day APY is an annualised yield using 7-day returns. It’s calculated by taking the net difference in price from 7 days ago and today and generating an annual percentage. The formula to calculate 7-day APY is as follows:

  • APY = (X − Y − Z) ÷ Y × 365/7

Where: X = the price at the end of the 7-day period

Y = the price at the start of the 7-day period

Z = any fees for the week [1]

The formula for calculating APY is as follows:

APY = (1 + r/n)ⁿ − 1

Where: r = periodic rate of return (or annual APR)

n = number of compounding periods each year [1][2] The calculation for APY can be done online as well. [5][6]

DIFFERENCES

  • APY is better to calculate your returns on investment while APR is more common in lending.

  • In general, the APY for a loan is higher than its corresponding APR because of the effects of compounding, and APY is a more accurate representation of the actual rate of return.

  • APY is a standard calculation of the rate of return used in traditional finance as well as crypto.

  • The equation for APY does not incorporate account fees, only compounding periods. That's an important consideration for an investor, who must consider any fees that will be subtracted from an investment's overall return.

  • APRs are often a selling point for different financial instruments, such as mortgages or credit cards. When choosing a tool with an APR, be careful to also take into account the APY because it will prove a more accurate number for what you will pay or earn over time.

Uses of APY

Crypto lending and borrowing:

  • If your target time horizon in crypto is for the long term, you can get a lot more mileage out of your holdings with crypto lending. When you give out your crypto on a decentralized platform to borrowers, you earn interest or crypto dividends. Depending on the platform, the interest rates can range from 3% to 17%. This provides the lenders a passive income stream.

  • Let’s say you have 10 ETH, and an emergency that requires cash comes out of the blue. But you don’t want to sell any of your ETH because you’re convinced that prices are on the verge of soaring. You may also be afraid that if you liquidate any Ether now, you won’t be able to repurchase as much in ETH later.

  • Here comes cryptocurrency lending to the rescue. Crypto lending platforms allow you to use your Ether as collateral and take out loans in USDT or any other stablecoin. However, due to cryptocurrency’s volatility, you’ll have to over-collateralize the loan.

  • That means you have to lock up significantly more ETH than the value you receive as a loan.

  • The lender funds the loan and receives interest payments periodically at the agreed APY. This continues until the end of the loan tenure.

  • Before signing up with a lending platform, please do your due diligence and ensure it’s reputable. Then confirm and compare the offered APY to get the most out of your digital assets.

Yield farming

  • Yield farming is a practice allowing yield farmers to earn rewards by staking ERC-20 tokens and stablecoins in exchange to support the DeFi ecosystem. Yield farming, also commonly known as liquidity mining, involves depositing and lending crypto underlying a mining mechanism to liquidate the liquidity pool for lucrative rewards.

  • It is hard to estimate the returns of yield farming even in a short term period due to the volatile fluctuations in yield farming and the relentless competition.

  • Both APY and APR can be used to calculate the interest in yield farming.

  • Calculating your short-term profit with APY can be misleading and confusing at the same time. Since the yields are usually based on an expected return for a year, the APY percentages in the short-term are not sustainable. Looking at the farming reward that only lasts a few days with a volatile rewarding system, APR’s actual calculation is doubtful.

  • Yield farming is a high-risk, high-reward venture. The appeal of yield farming is that some projects offer extremely high interest rates. I've seen several with an annual percentage yield (APY) of over 100%. APY is the yearly interest earned on your deposit. You can even find projects offering over 1,000% [8]. There are pools with much higher interest rates, but the cryptocurrencies involved are also more volatile.

  • Considering how volatile cryptocurrencies are, impermanent loss is always a possibility. The value of the crypto you lend could go down and potentially wipe out whatever gains you made from interest. A 100% APY doesn't mean much if you're earning that on a crypto that suffers a 90% price drop [8].

Staking

  • Crypto staking is a method of earning rewards with your crypto by confirming cryptocurrency transactions on a blockchain network.

  • The more coins you commit to the network, the more likely you’re chosen as a validator to add blocks to the blockchain. Unlike crypto mining, you don’t need any special hardware to earn rewards. When you stake, you lock up your crypto, taking it out of circulation for a defined period. This effectively limits the supply of the coin, which can also positively impact its value.

Aave

Calculation of APY depends upon both stable and variable interest rates. When the demand to borrow increases and the lending pools utilization ratio (U) reaches a certain threshold, usually the interest rates start to increase rapidly. U is an indicator of the availability of capital in the pool. The interest rate model is used to manage liquidity risk through user incentivises to support liquidity:

  • When capital is available: low interest rates to encourage loans.

  • When capital is scarce: high interest rates to encourage repayments of loans and additional deposits.

Formula to calculate borrow APY : ActualAPY=(1+TheoreticalAPY/secsperyear)^secsperyear -1

  • Generally speaking, with Aave, the stable rate is always higher than the variable rate. As an example, at the 80% utilisation rate, Aave’s stable rate (~13.9%) is over two times higher than the variable rate (6% APY) [10].

SushiSwap

  • The APY calculation is based on the return in ETH to the daily USD value, based on current block return annualised. It is not a fixed return, it is not a promised return, it is not financial advice. It is based on ETH returns [12].

  • Formula for both APY and APR is given below [13]

APR = (((VolumePerDay * 0.05 * 0.01) / xSushiSupply) * 365) / (xSushiRatio * sushiPrice)

APY = (( 1 + (APR / 365))^365) - 1

  • APY is to get the compounding returns. Swap out 365 with 52 if you are calculating APY for 7day volume. These are not exact figures, as we need to take into consideration slippage, LP fees, gas fees, and borrowing APR. At present, many liquidity pools on SushiSwap come with the option to farm SUSHI — the native-to-the-platform token. The yields vary from the “normal” 50 – 80 percent annual percentage yield (APY) for the more popular LPs, to the startling 200%+ APY on less popular LPs [15]. All pools that are available for yield farming can be found on this page [16].

Compound

  • The Annual Percentage Yield (APY) for supplying or borrowing in each market can be calculated using the value of supplyRatePerBlock (for supply APY) or borrowRatePerBlock (for borrow APY) in this formula [17]:

APY = ((((Rate / ETH Mantissa * Blocks Per Day + 1) ^ Days Per Year)) - 1) * 100

Rate = supplyRatePerBlock or borrowRatePerBlock ETH Mantissa = 1 * 10 ^ 18 (ETH has 18 decimal places)

Blocks Per Day = 6570 (13.15 seconds per block) Days Per Year = 365

Curve Finance

The formula below can help you calculate the daily APY for staking CRV[18]:

APY = DailyTradingVolume * 0.0002 * 365 / (TotalveCRV * CRVPrice) * 100

  • These APYs do fluctuates depending on volume. On each pool, you will see a Base APY and a Rewards APY.

  • Base APY is what you will get for providing liquidity to this pool. After providing liquidity, you can choose to stake your LP tokens in the gauge. This is where the Rewards APY come in for staking your LP tokens. For example, the Rewards APY is +20.50%->51.24% CRV.

  • This means that you will get a min 20.50% of rewards APY in CRV tokens by staking your LP tokens. This reward can be boosted to 51.24%. In Curve, you can boost your rewards by staking CRV tokens. In some pools, you can also get rewards in form of other tokens. [19] There are columns within the platform that will show you different APY you can gain by providing liquidity to each pool, alongside the assets you will get in return, assuming you do get any.

Summary and conclusion

  • Aave and Compound are two main lending protocols available in DeFi. Both of the protocols work by creating money markets for particular tokens such as ETH, stable coins like DAI and USDC or other tokens like LINK or wrapped BTC.

  • Users, who want to become lenders, supply their tokens to a particular money market and start receiving interest on their tokens according to the current supply APY.

  • The interest that is paid by borrowers is the interest earned by lenders, so the borrow APY is higher than the supply APY in a particular market. The interest APYs are calculated per Ethereum block. Calculating APYs per block means that DeFi lending provides variable interest rates that can change quite dramatically depending on the lending and borrowing demand for particular tokens.This is also where one of the biggest differences between Compound and Aave comes in. Although both protocols offer variable supply and borrow APYs, Aave also offers stable borrow APY. Stable APY is fixed in a short-term, but it can change in the long-term to accommodate changes in the supply/demand ratio between tokens [20].

  • Curve Finance and Sushiswap are some of the top yield farming protocols. APR is the percentage of your initial deposit that you will receive back within 365 days, and this can range tremendously based on the token and the platform. In some cases, you can earn 8%, 15%, or even more. Still, the loss can also be expected, as you could also see losses due to the volatility of cryptocurrency tokens unless you are yield farming with stablecoins. The calculation of APR and APY will change across different DeFI protocols regarding DeFi yield farming of farming crypto through the utilization of a governance token. They will impact the annual percentage rate and have a different risk-reward ratio [22].

Every investor needs a method of comparing investment opportunities and calculating how much profit they’ve made. Comparing your APY options can help you to figure out your most attractive investment opportunities [10].

References

[1] https://learn.bybit.com/

[2] https://www.investopedia.com/

[3] https://medium.com/cryptocurrencies-ups-and-down/what-is-the-difference-between-apr-and-apy-in-defi-world-8092b7cf60df

[4] https://coinmarketcap.com/

[5] https://www.blockfer.com/earn-interest/crypto-interest-calculator/

[6] https://haruinvest.com/blog/crypto-compound-interest-calculator/

[7] https://www.newsletter.economicsdesign.com/p/apy-and-apr-83f

[8] https://www.fool.com/the-ascent/cryptocurrency/articles/high-risk-high-reward-how-to-earn-over-100-apy-farming-crypto/

[9] https://docs.aave.com/risk/liquidity-risk/borrow-interest-rate

[10] https://defirate.com/

[11] https://docs.aave.com/developers/v/2.0/guides/apy-and-apr

[12] https://github.com/aave/aave-protocol/blob/master/docs/Aave_Protocol_Whitepaper_v1_0.pdf

[13] https://help.sushidocs.com/

[14] https://github.com/sushiswap/sushi-data/wiki/xSushi-APY

[15] https://chainbulletin.com/how-to-farm-sushi-on-sushiswap-step-by-step-guide/

[16] https://app.sushi.com/farm

[17] https://compound.finance/docs

[18] https://resources.curve.fi/guides/staking-your-crv#how-to-calculate-the-apy-for-staking-crv

[19] http://suzmoneylife.com/how-to-boost-your-rewards-on-curve-fi/

[20] https://finematics.com/

[21] https://zipmex.com/learn/what-is-defi-yield-farming/

[22] https://www.cnbctv18.com/cryptocurrency/yield-farming-in-defi-all-you-need-to-know-12011392.htm

Contributors

Last updated