Yield farming (also known as liquidity mining) is an incentivized process of depositing a token or multiple token types in order to generate rewards in the form of the deposited token or another (usually derivative token). The most common scenarios are staking and/or providing liquidity in a liquidity pool (in the case of AMMs).

Generally, estimated return from yield farming is calculated in annualized rates. The rates used are APY (Annual Percentage Yield) and APR (Annual Percentage Return). The difference is, the APR doesn’t take into account the effect of compounding while APY does.

APR

The APR is calculated as:

Periodic Rate x Number of Periods in a Year

So if for a period of one year and a yearly rate, the APR is just the yearly rate.

APY

The APY is calculated by multiplying the periodic interest rate plus one by the number of periods in a year then subtracting one. Why one plus the rate? Because that’s how compounding works. You subtract the one after to get the actual rate. Hence the APY is calculated as:

APY = (1 + Periodic Rate) x Number of periods-1

Here’s an example of the calculation done in Defi on the Ferrum network.

Yield from Staking

When you stake, you are placing your assets into a locked pool for a defined period and getting paid rewards in either the same asset or another asset. If it is the same asset, then usually that payment (the inflation) is put back into your staking funds and thus back into staking. This means for the period your funds are locked, you are compounding on your initial stake.

Yield from LP

For LPs in an AMM, it’s a little bit different. You aren’t guaranteed a yield with your staked two-sided liquidity since it depends on how often the pair in the pool is traded, which impacts the fees you receive and hence your return. Furthermore, your overall return is also impacted by impermanent loss. Generally, yield farming from Liquidity Pools attempts to offset the impermanent loss by generating oversized returns than the potential loss of the underlying value of the asset.

Top Pools:

**De.Fihttps://de.fi/explore/cat/stablecoin**