APY stands for Annual Percentage Yield, and is a figure which represents the real financial gain in percentage per year, which a user will receive when they lock their funds in an instrument such as a liquidity pool. The idea behind APY is to convey the true gains of an investment in annual terms, as it takes into account all the compounding actions that may have occurred within that single year.
Let’s say a bank in the world of traditional finance offers a savings account with an interest rate of 10%. Also assume that the bank only offers returns on the basis of simple interest (this rarely happens), i.e. the principal amount remains the same. If you were to start with a deposit of $100, you’d have $110 at the end of the year (i.e. starting amount + 10%).
However, more realistically, banks offer accounts which yield compound interest. This means that for every period of time of a stated duration, the interest generated is added to the principal (i.e. the starting amount). Then the starting amount for the next period is greater as it has gained the interest from the last period.
In this sense, the bank may offer a savings account with a semi-annual interest rate of 5%. This means that the interest will compound every 6 months. If you were to start with a deposit of $100, you’d have $105 at the end of 6 months (i.e. $100 + 5%). For the next 6 months, $105 would act as the principal, and at the end of this period your total balance would be $110.25 (i.e. $105 + 5%).
Essentially, a 5% interest rate which compounds every 6 months gives a better yield than a simple interest rate of 10% per year. In this example, the APY would be 10.25% for a savings account with a semi-annual interest rate of 5%.
If a DeFi protocol announces an annual interest rate of 4%, then the percentage which actually compounds per block is calculated by dividing 4% by the total number of blocks that will be published on the blockchain in one year (e.g. Ethereum publishes about 2.2 Mn blocks a year). This comes out to be a really small fraction of the annual rate of 4%, yet it can still be quite powerful as compounding occurs so frequently.
However, such an annual rate in DeFi is rarely constant as protocols are affected by market conditions. In this sense, APY gives the yield that could potentially be generated if funds were locked in a pool for a year under the same market performance conditions.
There are a number of assumptions that go into calculating APY, and this differs according to the protocol or blockchain network being used. However, it is still a good indicator of the rate at which one’s capital is growing, as most of our mental models rely on measuring time in terms of years.