Multifarm.fi
Search…
Formulas
Within Yield-Farming there are several important KPIs and formulas:
APR (Source)
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 (Source)
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 (Source and Source)
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)
This is an excellent tool to calculated historical impermanent loss on Sushiswap: Intotheblock
As well as an impermanent loss calculator: DecentYields
Price Divergence (Source)
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)$
Volume/Reserve Ratio (Source)
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)$
Total PnL (Source)
The amount of funds someone has accrued after conducting yield farming activities
1
Total PnL = value of current LP underlying tokens
2
- value of tokens deposited (at current price)
3
+ value of tokens withdrawn (at current price)
4
+ pending rewards at current prices
5
+ claimed rewards at current price
6
- deposit fee
7
- withdrawel fee
8
- gas costs for all deposit and withdrawal transactions at current ETH price.
Copied!
Other Variables
In addtion there are other variables who are influenceing the profitability and dynamics of yield farming activities:
1
Vesting = Vesting of a percentage of the rewards
2
Harvest Lockup = Lockup period for claiming rewards
3
Collateral Lock Period = Time in which collateral cannot be accessed
4
Multiplier = Reward multiplier per pool
5
Max Pool Cap = Maximum allowed capital per pool
6
Deposit/Withdrawel Fee = Fees when entering/exiting pools
7
Auto-Compounding = Autocompounding of rewards (i.e. vault)
8
Pool2 Rewards/Pool1 Rewards = Selling pressure of native token
Copied!
Hedging
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 9mo ago
Copy link