Deep Dive

Stake accounts, read against the source.

How a stake account is created, delegated to a vote account, credited with rewards, and redeemed — checked against the Solana stake program.

Checked against stake program, Agave v2.1.x, commit 7d2e3a1

Creation

A stake account is a single account whose owner is the stake program at Stake11111111111111111111111111111111111111. It is created with a rent-exempt balance and a staker and withdrawer authority. Until it is delegated it earns nothing; it is, at this stage, only a labelled balance.

Delegation

Delegation locks the warmed-up stake to a chosen vote account. The stake program records the activation epoch, and the stake warms up over the following epochs until the full amount is effective. Read the delegation entry for the short definition before this section.

Rewards

Rewards are credited at epoch boundaries, based on the vote account's performance and the network's inflation. The stake program does not pay out continuously; it accrues, and the account balance grows in steps you can read on each epoch transition.

Redemption

Deactivating a stake begins a cool-down over the next epochs. Once deactivated, the withdrawer authority can move the balance. The split instruction lets you carve off part of an active stake without a full deactivation, which is how large operators rebalance.

References

  • Stake program — Stake11111111111111111111111111111111111111
  • Agave client — v2.1.x, commit 7d2e3a1
  • Related — Vote programs deep dive