Multifarm.fi

Search…

Formulas

Within Yield-Farming there are several important KPIs and formulas:

APR does not take into account the compounding of interest within a specific year. It is calculated by multiplying the periodic interest rate by the number of periods in a year in which the periodic rate is applied. It does not indicate how many times the rate is applied to the balance.

$APR = PeriodicRate * NumberOfPeriodsPerYear$

APY is calculated by adding 1+ the periodic rate as a decimal and multiplying it by the number of times equal to the number of periods that the rate is applied, then subtracting. In our platform we use 365 periods (once per day).

$APY = (1 + Periodic Rate) ^ (NumberOfPeriods) – 1$

Impermanent loss happens when you provide liquidity to a liquidity pool, and the price of your deposited assets changes compared to when you deposited them. At the end the question is, should I have put my money in a liqudiity pool or just hodl'd it. If you have impermanent gain then you are better of in the pool. If you have impermanent loss, then hodl'ing would have been the better decision. You can calculate the impermanent loss with this formula:

$ImpermanentLoss = 2 * sqrt(PriceRatio) / (1+PriceRatio) — 1$

Losses to liqudiity providers due to price variation:

Scale of the impermanent loss at different price ratios (Source Uniswap Docs)

The running difference between the changes in prices (as percentages) for the underlying assets against the prices 30 days ago. Price divergences between a pair of assets can result in losses for liquidity providers (see Impermanent Loss).

$Price Divergence = abs(Token0PriceChangePct - Token1PriceChangePct)$

The ratio of trading volume against the liqudiity/reserves (take average of each for the past 30 days). This ratio signals how lucrative the pair is in terms of rewards (trading fees) for liquidity providers.

$(V/R)Ratio = Trading Volume (30d) / Reserves (30d)$

The amount of funds someone has accrued after conducting yield farming activities

Total PnL = value of current LP underlying tokens

- value of tokens deposited (at current price)

+ value of tokens withdrawn (at current price)

+ pending rewards at current prices

+ claimed rewards at current price

- deposit fee

- withdrawel fee

- gas costs for all deposit and withdrawal transactions at current ETH price.

In addtion there are other variables who are influenceing the profitability and dynamics of yield farming activities:

Vesting = Vesting of a percentage of the rewards

Harvest Lockup = Lockup period for claiming rewards

Collateral Lock Period = Time in which collateral cannot be accessed

Multiplier = Reward multiplier per pool

Max Pool Cap = Maximum allowed capital per pool

Deposit/Withdrawel Fee = Fees when entering/exiting pools

Auto-Compounding = Autocompounding of rewards (i.e. vault)

Pool2 Rewards/Pool1 Rewards = Selling pressure of native token

There are several vehicles where someone can hedge against impermanent loss, as well as against a drop in price of the underlying collateral. You can read more here.

Last modified 1yr ago

Copy link