Blockchain and Cryptocurrency Intermediate - The Calculation Method in Yield Farming Returns

in Project HOPE3 years ago

image.png
Source

There are two ways for the yield farming calculation method. Yield farming can be calculated as APR which means annual percentage return, and APY which means annual percentage yield.

Calculating APR

Calculating APR is done when it involves earning interest by locking up an asset for a period of time like lending crypto assets and earning interest in return based on the APR without a compound interest.

Let’s take for instance, if I lock up $1500 of a particular cryptocurrency asset stablecoin on a selected yield farming platform that offers 15% APR on that particular cryptocurrency asset,

Calculation;

Investment Capital = $1500
APR = 15%

15/100 = 0.15

0.15 x $1500 = 225

APR after 1year is 1500 + 225 = 1725

At the end of 1yr, The earning is $1725

Calculating APY

Calculating APY is done in yield farming when it involves total annual interest that also includes the compound interest. Unlike APR that doesn’t include compound interest, APY includes the compound interest for that period of time. Simply put, at the end of 1 year, the APY is the earning after all the compounding occurred.

Let’s take for instance, if I lock up $1500 of a particular cryptocurrency asset stablecoin on a selected yield farming platform that offers 15% APY on that particular cryptocurrency asset,

The formula to calculate this is (1 + r/n) the power of n – 1

r = interest rate

n = the number of time for 1yr or 365 days that the interest is compounded

APY (monthly)

r = 15%
n = 12 (monthly)

Using the formula;
APY = (1 + r / n) to the power of n – 1

[1 + (0.15 / 12)] the power of 12 - 1

[1 + (0.0125)] the power of 12 – 1

[1.0125] the power of 12 – 1

The APY = 1.0125 ^12 – 1

1.16075451772 – 1 = 0.16075451772

APY in % = 0.16075451772 x 100

APY = 16.075451772 %

Rounded to 16.075 %

Investment Capital = $1500
APY = 16.075 %

0.16075 x $1500 = 241.125

APY after 1year is 1500 + 241.125 = 1,741.125

At the end of 1yr, The earning is $1,741.125

APY (Daily)

r = 15%
n = 365 (daily)

Using the formula;
APY = (1 + r / n) to the power of n – 1

[1 + (0.15 / 365)] ^365 - 1

[1 + (0.0004109589)] ^365 – 1

[1.0004109589] ^365 – 1

1.0004109589 ^365 - 1

1.16179844139 – 1 = 0.16179844139

In % = 0.16179844139 x 100

APY = 16.179844139 %

Rounded to 16.18 %

Investment Capital = $1500
APY = 16.18 %

0.1618 x $1500 = 242.7

APY after 1year is 1500 + 242.7 = 1,742.7

At the end of 1yr, the earning is $1,742.7

image.png

Coin Marketplace

STEEM 0.09
TRX 0.32
JST 0.033
BTC 107964.48
ETH 3802.06
USDT 1.00
SBD 0.62