Lineagei
Frameworki
What's Anchor?
Batteries-included Rust framework. Ships account-validation codegen, 8-byte instruction discriminators, and an on-chain IDL — the program describes itself.
Bigger binary and higher rent in exchange for safety rails, introspection, and dev speed. The choice of a team optimizing for correctness over on-chain footprint.
Originally Coral (Armani Ferrante); now community-maintained.
What it is
The de facto standard. Rust macros (#[program], #[derive(Accounts)]) eliminate boilerplate: it auto-generates 8-byte account and instruction discriminators — SHA256("account:<Name>")[..8] and SHA256("global:<ix>")[..8] — handles Borsh (de)serialization, enforces account constraints declaratively (mut, has_one, seeds, init), and emits a JSON IDL that client libraries consume directly. The cost: Borsh copies data on every deserialize (not zero-copy), and the macro machinery adds binary bloat and compute overhead — irrelevant for ~99% of programs.
When to pick it
Building a new protocol, moving fast, or wanting maximum ecosystem compatibility. It's the beginner default and stays the right call for most production programs.
How it looks on-chain
The most recognizable framework. Every account it owns begins with an 8-byte discriminator, and the IDL is often published on-chain at a PDA derived from the program id. Both are strong, reliable fingerprints — this is the only framework we can label with confidence.
Others in the wild: Steel (Ore team — near-native performance on solana-program), Seahorse (Python → Anchor), and Poseidon & Quasar (TypeScript → Rust). Transpilers inherit their lowering target's fingerprint: a Quasar or Poseidon program that compiles down to Anchor will look like Anchor on-chain — discriminators and all.
Anchor docsFootprinti
Recovered architecturei
Reachi
Controli
What's upgrade authority?
The upgrade authority is the account allowed to replace a program's code after it's deployed.
If it's set (mutable), that key can push new bytecode at any time — including malicious code, the classic "rug" vector. If it's null (immutable / frozen), the code can never change; what 's on-chain is final. A Squads multisig sits in between — upgrades are possible but need M-of-N signers, not one hot wallet. So mutable + single hot-wallet = highest risk; immutable or multisig = stronger guarantees.
What's a verified build?
A verified build proves the program running on-chain was compiled from the public source you can read — nothing hidden.
Someone re-compiles the source in a deterministic (Docker) environment and checks the resulting bytecode is byte-for-byte identical to what's deployed; tools like solana-verify do this and record it with a verification service. "Not verified" isn't a red flag by itself — most programs simply never submit one. It just means you're trusting the deployed bytecode as-is, with no source cross-check.
Convictioni
Interface — the on-chain IDLi
6 of 9 instructions used · 3 never called in this window
Instructions 9
claim_reward
Claim accumulated rewards without unstaking.
- usersignerwritable
- poolwritable
- user_stakewritable
- reward_vaultwritable
- user_reward_atawritable
- reward_token_program
close_pool
Close an expired pool and return remaining rewards to authority.
- authoritysignerwritable
- poolwritable
- stake_vaultwritable
- reward_vaultwritable
- authority_reward_atawritable
- stake_token_program
- reward_token_program
- system_program
deactivate_pool
Deactivate a stake pool immediately (pool authority or program admin). Freezes reward accrual at the current slot and sets `is_active = false`. Existing stakers can still unstake and claim rewards earned up to this point.
- authoritysigner
- config
- poolwritable
initialize_config
Initialize the global ProgramConfig (one-time setup by admin). # Arguments * `gate_token_mint` - SPL token mint used as burn gate for unofficial pools * `burn_amount` - Amount of gate tokens to burn (in raw units)
- adminsignerwritable
- configwritable
- program_data
- system_program
- gate_token_mintpubkey
- burn_amountu64
initialize_pool
Initialize a new staking pool with reward deposit. # Arguments * `pool_nonce` - Unique nonce to allow multiple pools per mint pair * `reward_amount` - Total reward tokens to deposit * `duration_seconds` - Pool duration in seconds * `min_stake_amount` - Minimum tokens required to stake * `pool_type` - 0 for Official (admin only), 1 for Unofficial (burn gated)
- creatorsignerwritable
- config
- poolwritable
- stake_token_mint
- reward_token_mint
- stake_vaultwritable
- reward_vaultwritable
- creator_reward_atawritable
- stake_token_program
- reward_token_program
- system_program
- rent
- pool_nonceu64
- reward_amountu64
- duration_secondsu64
- min_stake_amountu64
- pool_typeu8
stake
Stake tokens into a pool. # Arguments * `amount` - Number of tokens to stake
- usersignerwritable
- poolwritable
- user_stakewritable
- stake_vaultwritable
- user_stake_atawritable
- stake_token_program
- system_program
- amountu64
unstake
Unstake tokens from a pool (partial or full). Automatically claims any pending rewards. # Arguments * `amount` - Number of tokens to unstake
- usersignerwritable
- poolwritable
- user_stakewritable
- stake_vaultwritable
- reward_vaultwritable
- user_stake_atawritable
- user_reward_atawritable
- stake_token_program
- reward_token_program
- amountu64
update_config
Update the ProgramConfig (admin only). # Arguments * `new_burn_amount` - Optional new burn amount * `new_gate_token_mint` - Optional new gate token mint * `new_admin` - Optional new admin pubkey
- adminsigner
- configwritable
- new_burn_amountOption<u64>
- new_gate_token_mintOption<pubkey>
- new_adminOption<pubkey>
update_pool_config
Update pool configuration (authority only). # Arguments * `new_min_stake_amount` - Optional new minimum stake amount
- authoritysigner
- poolwritable
- new_min_stake_amountOption<u64>
Accounts 3
ProgramConfig
no fields
StakePool
no fields
UserStake
no fields
Types 3
ProgramConfigstruct
- adminpubkeyAdmin pubkey - the program deployer who can create official pools and update this config
- gate_token_mintpubkeyThe SPL token mint that must be burned to create unofficial pools
- burn_amountu64Amount of gate tokens that must be burned (in raw units with decimals)
- bumpu8PDA bump
StakePoolstruct
- authoritypubkeyPool creator / authority who can manage the pool
- stake_token_mintpubkeyThe SPL token mint that users stake
- reward_token_mintpubkeyThe SPL token mint used for rewards (can be same as stake_token_mint)
- stake_vaultpubkeyPDA-controlled token account holding staked tokens
- reward_vaultpubkeyPDA-controlled token account holding reward tokens
- total_stakedu64Total tokens currently staked in the pool
- total_rewardu64Total reward tokens deposited by the pool creator
- reward_per_slotu64Reward tokens distributed per slot
- cumulative_reward_per_tokenu128Cumulative reward per token accumulator (scaled by PRECISION)
- last_updated_slotu64Last slot when the accumulator was updated
- start_slotu64Slot when the pool starts distributing rewards
- end_slotu64Slot when the pool stops distributing rewards
- min_stake_amountu64Minimum amount of tokens required to stake
- total_claimedu64Total rewards that have been claimed
- pool_bumpu8PDA bump for the pool account
- stake_vault_bumpu8PDA bump for the stake vault
- reward_vault_bumpu8PDA bump for the reward vault
- is_activeboolWhether the pool is active and accepting stakes
- pool_nonceu64Unique pool nonce to allow multiple pools per mint pair
- pool_typeu8Pool type: 0 = Official (admin-created), 1 = Unofficial (community, burn-gated)
UserStakestruct
- poolpubkeyThe pool this stake belongs to
- userpubkeyThe staker's wallet address
- staked_amountu64Amount of tokens currently staked
- reward_debtu128Snapshot of cumulative_reward_per_token at last interaction Used to calculate earned rewards since last action
- pending_rewardsu64Accumulated unclaimed rewards
- stake_timestampi64Unix timestamp when the user first staked
- bumpu8PDA bump
Errors 22
- 6000InvalidDurationPool duration must be greater than zero
- 6001InvalidRewardAmountReward amount must be greater than zero
- 6002BelowMinimumStakeStake amount is below the pool minimum
- 6003InsufficientStakedBalanceInsufficient staked balance for unstake
- 6004NoPendingRewardsNo pending rewards to claim
- 6005PoolNotActivePool is not active
- 6006PoolNotStartedPool has not started yet
- 6007PoolExpiredPool has expired
- 6008PoolNotExpiredPool has not expired yet, cannot close
- 6009UnauthorizedUnauthorized: only pool authority can perform this action
- 6010MathOverflowArithmetic overflow
- 6011PoolHasStakersPool still has active stakers, cannot close
- 6012InsufficientRewardBalanceInsufficient reward vault balance
- 6013OnlyAdminCanCreateOfficialOnly the program admin can create official pools
- 6014InvalidPoolTypeInvalid pool type, must be 0 (Official) or 1 (Unofficial)
- 6015InsufficientBurnTokensInsufficient gate tokens to burn for unofficial pool creation
- 6016ConfigAlreadyInitializedConfig already initialized
- 6017GateTokenMintMismatchGate token mint mismatch
- 6018OnlyUpgradeAuthorityCanInitializeOnly the program upgrade authority (deployer) can initialize config
- 6019CommunityPoolMustUseProjectTokenCommunity pools must use the project token as stake token
- 6020PoolAlreadyInactivePool is already inactive
- 6021UnauthorizedForPoolOnly the pool authority or program admin can perform this action
What's an IDL?
An IDL — Interface Description Language — is a JSON spec that describes how to talk to a program: its instructions, the accounts each one needs, argument and account types, events, and errors.
Anchor auto-generates it at build time. A program can publish it on-chain at a PDA derived from its id, so any client or explorer can decode the program's transactions without its source code.
Why it's often missing
Publishing is opt-in — a courtesy, not a requirement. Many programs never do, and non-Anchor frameworks (Pinocchio, native, Steel) don't produce one at all; their interface lives in an off-chain Shank/Codama artifact, or nowhere public. Absence means you can't auto-decode it — not that anything is wrong.
6 of 9 instructions used · 3 never called in this window · +3 more
Tractioni
Code familyi
The recordi
| Event | When | Detail | Receipt |
|---|---|---|---|
| DEPLOY | 2d ago | slot 432,152,943 | poll…2943 |
| SIBLING DEPLOY | 2d ago | testprogram-unknown closed | same code, fresh id |