Assessment reports>N1 Bridge>Threat Model>Instruction: set_min_deposit

Instruction: set_min_deposit

This instruction allows the operator to set the minimum deposit for an asset.

Input parameters

  • asset: Pubkey: The public key for the asset to configure.

  • min_deposit: u64: The minimum deposit required for this asset.

Accounts

  • operator: The operator account that is setting the minimum deposit.

    • Signer: Yes.

    • Init: No.

    • PDA: No.

    • Mutable: No.

    • Constraints: Must have the same public key as contract_storage.operator.

  • contract_storage: The global contract storage.

    • Signer: No.

    • Init: No.

    • PDA: Yes (derived from CONTRACT_STORAGE_SEED with bump).

    • Mutable: No.

    • Constraints: Must be a ContractStorage account.

  • asset_config: The asset-configuration account matching the public key.

    • Signer: No.

    • Init: No.

    • PDA: Yes (derived from ASSET_CONFIG_SEED and asset with bump).

    • Mutable: Yes.

    • Constraints: The min_deposit input parameter must be greater than zero.

Additional checks and behavior

  • Sets asset_config.min_deposit to the min_deposit from the input parameters.

  • Logs a SetMinDeposit event.

CPI

N/A.

Zellic © 2025Back to top ↑