Account State - Algorand Specifications

Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Algorand Specifications

The balances are a set of mappings from addresses, 256-bit integers, to balance records.

A balance record contains the following fields:

In the rest of this section, all references to Reward calculation are with respect to the legacy distribution rewards system. They are kept here for completeness and for backward compatibility.

The account raw balance aIaI is a 64-bit unsigned integer which determines how much μALGO the address has.

The account rewards base a′IaI′ and total-awarded amount a∗IaI∗ are 64-bit unsigned integers.

Combined with the account balance, the reward base and total awarded amount are used to distribute rewards to accounts lazily.

The account stake is a function which maps a given account and round to the account’s balance in that round and is defined as follows:

Stake(r,I)=aI+(Tr−a∗I)⌊aIA⌋Stake(r,I)=aI+(Tr−aI∗)⌊aIA⌋

unless pI=2pI=2 (see below), in which case:

Stake(r,I)=aIStake(r,I)=aI

Units(r)Units(r) is a function that computes the total number of whole earning units present in a system at round rr.

A user owns ⌊aIA⌋⌊aIA⌋ whole earning units, so the total number of earning units in the system is:

Units(r)=∑I⌊aIA⌋Units(r)=∑I⌊aIA⌋

for the aIaI corresponding to round rr.

In this sum, online and offline accounts are taken into consideration.

The account status pIpI is an 8-bit unsigned integer which is either 0,1,20,1,2:

Combined with the account stake, the account status determines how much voting stake an account has, which is a 64-bit unsigned integer defined as follows:

The account’s spending key determines how transactions from this account must be authorized (e.g., what public key to verify transaction signatures against).

Transactions from this account must have this value (or, if this value zero, the account’s address) as their authorization address. This is described in the Authorization and Signatures section.

The account’s participation keys PartKeyPartKey are defined in Algorand’s specification of participation keys.

The account’s eligibility AeAe is a flag that determines whether the account has elected to receive payouts for proposing blocks (assuming it meets balance requirements at the time of block proposal).

An account’s participation keys and voting stake from a recent round is returned by the RecordRecord procedure in the Byzantine Agreement Protocol.

There exist two special addresses:

For both of these accounts, pI=2pI=2.