Skip to main content

PDA seeds & instruction account checklist

PDA seeds (all under the staking program):
AccountSeeds
Config (singleton)["config"]
Validator["validator", validator_identity]
StakeDelegation (your position)["delegation", owner, validator_identity]
stake_vaultATA of the Config PDA for stake_mint (also stored in Config.stake_vault)
Instruction account checklist:
InstructionAccounts
delegate(amount)config, validator*, delegation, ownerTokenAccount, stakeVault, stakeMint, owner(signer), systemProgram, tokenProgram
claimRewards()config, validator, delegation, ownerTokenAccount, stakeMint, owner(signer), tokenProgram
requestUnstake(amount)config, validator, delegation, ownerTokenAccount, stakeMint, owner(signer), tokenProgram
completeUnstake()config, delegation, stakeVault, ownerTokenAccount, owner(signer), tokenProgram
* validator must be active for delegate. Validator-operator instructions — signed by the validator identity wallet, not the admin (the ["validator", identity] seeds bind the signer):
InstructionAccounts
setCommission(newCommissionBps)config, validator, identity(signer)
claimCommission()config, validator, identityTokenAccount, stakeMint, identity(signer), tokenProgram
Admin-only instructions (not used directly by operators or delegators): initialize, set_apy, propose_admin, accept_admin, register_validator, deactivate_validator.

Error codes

ErrorMeaning / fix
InvalidAmountAmount was 0, or unstake amount exceeded your stake.
ValidatorInactiveThe validator was deactivated — you can’t add new stake to it. (You can still claim and unstake.)
PendingUnstakeExistsYou already have a cooldown in flight on this position. Complete it first.
NoPendingUnstakecompleteUnstake with nothing pending.
CooldownNotElapsedcompleteUnstake called before the 7-day cooldown finished.
NotAdminAdmin-only path called by non-admin (shouldn’t hit this as an operator/delegator).
InvalidCommissionregister_validator / set_commission got a rate above 100% (> 10000 bps).
InvalidApy / AlreadyInactive / OverflowAdmin-side or near-impossible cases.

FAQ

  • Do I have to run a node to delegate? No. Delegators only need LAYER on the L2 and a wallet. Running a node is for operators who want to be registered as a validator.
  • Do I earn from other people’s delegations? Yes — as a validator you take a commission (0–100%, in bps) out of your delegators’ rewards. The admin sets your initial rate at registration; you can change it any time with set_commission (future rewards only) and mint what’s accrued to your own token account with claim_commission.
  • Do I earn on stake that’s in cooldown? No. From the moment you requestUnstake, that portion stops accruing. Your remaining amount keeps earning (if the validator is still active).
  • What if my validator gets deactivated? Your rewards freeze at the deactivation point, but you can still claimRewards what accrued and requestUnstake / completeUnstake normally. To keep earning, unstake and delegate to an active validator. Deactivation is permanent — the operator would have to be re-registered under a fresh identity pubkey.
  • Can I delegate to several validators? Yes — one StakeDelegation per validator, all independent. Repeat the delegate flow with each validator’s identity.
  • Where do rewards land? Directly in your LAYER ATA, on claim and on every delegate / requestUnstake (which settle pending first).
  • Can I cancel a pending unstake? No (v1). Wait out the cooldown, withdraw, then re-delegate if you want back in.
  • My rpc-v2 node serves a different JSON-RPC port than the public devnet RPC. Do I have to use the public one for staking txs? No. Once your node is caught up, point your client at http://<your-node>:18899 instead of https://devnet-rpc.solayer.org — it’s the same network.

See also