DeFi & payments3 min read

APR vs APY in DeFi Data: Avoid False Comparisons

Compare APR and APY with explicit compounding, reward assets and observation periods, without presenting a current quoted rate as a guaranteed return.

Editorial illustration accompanying apr vs apy in defi data: avoid false comparisons.

Overview

When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.

APR and APY labels can hide different calculation assumptions. A meaningful comparison states whether rewards compound, how often, and which asset or price assumptions contribute to the rate.

Read the formula behind the label

An annualised simple rate and an annually compounded yield are different measures. Reward-token prices can change a quoted incentive yield without changing the underlying emission quantity. Variable utilisation and protocol parameters can also change rates. Do not compare two headline percentages until their denominators and compounding assumptions are compatible.

Worked example: a constant illustrative rate

For a simplified ten-percent nominal annual rate compounded monthly, the mathematical annual yield is approximately 10.47 percent before costs. This assumes the rate stays constant and rewards can actually be reinvested monthly. It is an illustration of compounding, not a forecast for a variable-rate position.

Expose the assumptions

Store the observation time, principal basis, reward assets, compounding frequency and included costs. Test a changing rate and rewards that cannot be reinvested immediately. A realised return requires actual position and cash-flow history. Keep quoted rates separate from the performance eventually experienced by a particular wallet.

A practical acceptance test

For a purely mathematical fixture, compare a constant ten-percent nominal rate with monthly compounding against the simple ten-percent figure. Keep the assumptions attached to the result. Then change the rate halfway through the period and verify that the original fixed-rate illustration is not reused as a realised wallet return or a guaranteed future yield.

Questions about the topic

Frequently asked questions

Does quoted APY guarantee a year-end return?

No. It depends on assumptions and future conditions.

Can token-price changes alter an incentive yield?

Yes, when the displayed rate values reward tokens in another unit.

Standards & technical documentation

Further reading

{{TODO: author name}}

Practical explanations of blockchain data, software integration and the context behind a record.

About Indexbase
← Back to all articles

Build with better context.

Get an update when private beta opens.

Form setup in progress. Nothing entered here is sent or saved. {{TODO: endpoint}} See the full form and email alternative.