Assessment reports>Single Pool>Threat Model>Instruction: InitializePool

Instruction: InitializePool

This instruction can be used to initialize a new pool and supporting accounts.

Specifically, the following accounts are initialized:

  • An account representing the pool

  • A stake account for the pool, owned by the stake program

  • A mint account, used to mint tokens representing a portion of the pool

Input accounts

  • vote_account_info: Vote account associated with the newly created pool.

    • W/S requisites: None.

    • Owner: Must be owned by native vote program.

    • Rent: Not a responsibility of the program under review.

    • Initialized: Must be initialized.

    • Discriminant: Checked.

    • PDA: No.

  • pool_info: New pool account.

    • W/S requisites: Writable.

    • Owner: Single pool program (newly created).

    • Rent: Must be exempt.

    • Initialized: No (initialized by this instruction).

    • Discriminant: Checked (account_type field).

    • PDA: Yes, controlled by the single pool program — using seeds "pool", vote_account_address.

  • pool_stake_info: Stake account for the new pool.

    • W/S requisites: Writable.

    • Owner: Stake program (newly created).

    • Rent: Must be exempt.

    • Initialized: No (initialized by this instruction).

    • Discriminant: Checked.

    • PDA: Yes, controlled by the single pool program — using seeds "stake", pool_address.

  • pool_mint_info: New mint account for the pool.

    • W/S requisites: Writable.

    • Owner: Token program (newly created).

    • Rent: Not a responsibility of the program under review, must be rent free due to checks done by spl-token.

    • Initialized: No (initialized by this instruction).

    • Discriminant: Not a responsibility of the program under review.

    • PDA: Yes, controlled by the single pool program — using seeds "mint", pool_address.

  • pool_stake_authority_info: Authority controlling the pool stake.

    • W/S requisites: None.

    • Owner: N/A.

    • Rent: N/A.

    • Initialized: N/A.

    • Discriminant: N/A.

    • PDA: Yes, controlled by the single pool program — using seeds "stake authority", pool_address.

  • pool_mint_authority_info: Authority controlling the pool mint.

    • W/S requisites: None.

    • Owner: N/A.

    • Rent: N/A.

    • Initialized: N/A.

    • Discriminant: N/A.

    • PDA: Yes, controlled by the single pool program — using seeds "mint authority", pool_address.

  • rent_info: Rent sysvar account.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No, but the address must match the known rent sysvar.

  • clock_info: Clock sysvar account — not used, only passed along to the stake program.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No — the address is checked to ensure it matches the actual clock sysvar.

  • stake_history_info: Stake history sysvar account — not used, only passed along to the stake program.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No.

  • stake_config_info: Stake config sysvar account — not used, only passed along to the stake program.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No.

  • system_program_info: System program account.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No — the address is checked to ensure it matches the actual system program.

  • token_program_info: Token program account.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No — the address is checked to ensure it matches the actual token program.

  • stake_program_info: Stake program account.

    • W/S requisites: None.

    • Owner: N/A (sysvar).

    • Rent: N/A (sysvar).

    • Initialized: N/A (sysvar).

    • Discriminant: N/A (sysvar).

    • PDA: No — the address is checked to ensure it matches the actual stake program.

Zellic © 2025Back to top ↑