in-solana by Supanode

Vote Program — Program ID & Instructions

Vote111111111111111111111111111111111111111

The Vote Program manages validator vote accounts on Solana. Vote accounts record a validator’s consensus votes and are the target of stake delegations. Staking rewards are distributed based on voting performance.

Program ID

Vote111111111111111111111111111111111111111

Key instructions

InstructionDescription
InitializeAccountCreates a new vote account with a validator identity
VoteRecords a vote for a specific slot
UpdateValidatorIdentityChanges the validator identity key
UpdateCommissionChanges the commission rate
WithdrawWithdraws excess SOL from the vote account
AuthorizeChanges authorized voter or withdrawer

Vote account structure

FieldDescription
nodePubkeyValidator’s identity public key
authorizedVoterKey authorized to submit votes
authorizedWithdrawerKey authorized to withdraw SOL
commissionPercentage of staking rewards kept by the validator (0–100)
votesRecent vote history (landing slots)
rootSlotHighest finalized slot
epochCreditsCredits earned per epoch (determines reward share)

Commission

The commission rate determines how staking rewards are split:

  • Validator keeps commission% of rewards.
  • Delegators share the remaining (100 - commission)%.

Commission changes take effect in the following epoch.

Querying vote accounts

const voteAccounts = await connection.getVoteAccounts();

for (const v of voteAccounts.current) {
  console.log(`Validator: ${v.nodePubkey}`);
  console.log(`Commission: ${v.commission}%`);
  console.log(`Active stake: ${v.activatedStake}`);
}

FAQ

What is the difference between a validator and a vote account? A validator is the machine running the software. A vote account is the on-chain account that records the validator’s votes. One validator has one vote account.

Can anyone create a vote account? Yes, but the vote account is only useful with a running validator to submit votes. Creating a vote account without a validator earns no rewards and has no purpose.

How does commission affect staking returns? A validator with 5% commission keeps 5% of all staking rewards earned by its delegated stake. Delegators receive the remaining 95%, split proportionally to their stake.

Updated: