Assessment reports>BPF Stake Program>Threat Model>Instruction: InitializeChecked

Instruction: InitializeChecked

This instruction initializes an uninitialized stake account with authorization and without lockup information. This instruction behaves like Initialize with the additional requirement that the withdraw authority must be a signer.

Input structure

pub enum StakeInstruction { /// # Account references /// 0. `[WRITE]` Uninitialized stake account /// 1. `[]` Rent sysvar /// 2. `[]` The stake authority /// 3. `[SIGNER]` The withdraw authority InitializeChecked, }

Accounts

  • stake_account: The uninitialized stake account.

    • Signer: No.

    • Init: No.

    • PDA: No.

    • Writable: Yes.

    • Rent checks: The account must be rent-exempt.

    • Ownership checks: The account must be owned by the program.

    • Address checks: None.

  • rent: The account must be a rent sysvar.

  • stake_authority: The stake authority account to be authorized to manage the stake account.

    • Signer: No.

    • Init: No.

    • PDA: No.

    • Writable: No.

    • Rent checks: None.

    • Ownership checks: None.

    • Address checks: None.

  • withdraw_authority: The withdraw authority account to be authorized to withdraw from the stake account.

    • Signer: Yes.

    • Init: No.

    • PDA: No.

    • Writable: No.

    • Rent checks: None.

    • Ownership checks: None.

    • Address checks: None.

Additional checks and behavior

  • The size of stake_account must be equal to the size of StakeStateV2.

  • withdraw_authority must be a signer.

  • The stake account must be uninitialized.

  • The stake account must have enough lamports to be rent-exempt.

  • The stake account is initialized with the provided authorized and lockup information.

Zellic © 2025Back to top ↑