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

Instruction: CreateTokenMetadata

This instruction is used to initialize the token metadata account for the pool mint.

Input accounts

  • pool_info: Stake pool account.

    • W/S requisites: None.

    • Owner: Single pool program (newly created).

    • Rent: N/A.

    • Initialized: Yes.

    • Discriminant: Checked (account_type field).

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

  • pool_mint_info: Pool mint account.

    • W/S requisites: None.

    • 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: Yes.

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

    • PDA: Yes, controlled by the single pool program — using seeds "mint", 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.

  • pool_mpl_authority_info: The update authority controlling the metadata account.

    • 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 "mpl_authority", pool_address.

  • payer_info: The account set to pay for creating the new metadata account.

    • W/S requisites: Signed and writable.

    • Owner: N/A.

    • Rent: N/A.

    • Initialized: N/A.

    • Discriminant: N/A.

    • PDA: No.

  • metadata_info: The MPL metadata account address.

    • W/S requisites: Writable.

    • Owner: MPL Metadata program.

    • Rent: N/A.

    • Initialized: No.

    • Discriminant: N/A.

    • PDA: Yes — using seeds

      • "metadata"

      • metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s

      • mint

      • metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s

  • mpl_token_metadata_program_info: MPL 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, but the address must match the MPL token metadata program.

  • 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.

Zellic © 2025Back to top ↑