Calculating APR and staking parameters

The objective of this topic is to kick off a discussion about the correct calculation of the APR. Our goal is not to point out who calculates wrongly, but to point out to what we believe are essential details for the correct calculation of these very important numbers.

As some of you know, we are the team behind ValidatorInfo, a new type of web3 explorer. Recently we have started to index and added Aztec to our network list.

Here is a summary of the differences we found when calculating APR with other existing Aztec tools:

(Please bare in mind that those notes are based on the current reality, when and if the epoch size or any other params change, will influence some of what is noted below)

  1. Aztec Dashboard APR is a theoretical projection using fixed slot duration (72 seconds) and estimated annual blocks, updated every 30 seconds from live contract state.

  2. ValidatorInfo APR is actual historical calculation based on real block count per day from own Aztec Indexer, stored daily in ChainAprHistory table.

  3. Numerator difference: Aztec Dashboard assumes 100% slot utilization; ValidatorInfo counts only actual produced L2 blocks, accounting for missed slots (~5% uptime loss = ~5% APR overstatement).

  4. Denominator difference: Aztec Dashboard uses fixed 200,000 AZTEC per validator; ValidatorInfo subtracts slashing and zombie validator effective balances from total staked amount.

  5. Slashing treatment: Aztec Dashboard ignores slashing; ValidatorInfo reduces denominator by actual slash amounts, making it more accurate when validators are slashed.

  6. Entry queue inclusion: Aztec Dashboard includes validators in queue (dilutes APR); ValidatorInfo excludes them since they haven’t earned rewards yet.

  7. Zombie validators: Both systems exclude them (balance < 196,000 AZTEC), but ValidatorInfo subtracts their actual effectiveBalance to avoid double-counting slashing.

  8. Historical data: Aztec Dashboard shows only current IDEAL snapshot; ValidatorInfo maintains daily APR history enabling trend analysis and auditability.

  9. Granularity: Aztec Dashboard provides single live value; ValidatorInfo delivers token-weighted, daily-granular calculation reflecting real network conditions.

  10. Accuracy tradeoff: ValidatorInfo is more precise for historical analysis but updated daily; Aztec Dashboard is less accurate but updates every 30 seconds with live parameters.

We believe that tools, official or not should be precise. We have a strong opinion here which is obviously biased. So rather than expressing it straight of the top, we would like to hear your opinion.

What methods do you think is the correct method to calculate APR? Should such precise detail as what is included in our explorer, be calculated by everyone or do you think APR can be calculated “to the nearest few percent - and thats good nough”? Do you think that calculations should be precise?

There are many more questions we can add here. But we want to kick off a discuss, rather than asking questions.

1 Like

Hi @CitizenWeb3

Those two tools do different things. The APR calculation of the staking dashboard is meant to convey the projected APR for the next sequencer to join the staking queue.

If you stake 200k AZTEC, and assuming you don’t get slashed or missed blocks (those are not supposed to happen and indeed plenty of sequencers have perfect records) your projected APR is x% - with variance being because of randomness of proposer election.

I have not inspected ValidatorInfo’s code but it seems to calculate the realized return on the initial staking outlay - which is useful for individual sequencers to quantify their actual performance and ROI.

None of them are inaccurate - they just display different information.

1 Like

Makes sense. The staking board targets potential new sequencers. The APR on valinfo targets an existing user, regardless if its a sequencer or staker.

1 Like