Skip to content

Should CPI Guard block ConfidentialTransfer::Deposit? #1390

Description

@VictorLux

@joncinque asked that this be discussed in public after a private report.

process_deposit never reads CpiGuard / in_cpi() after validate_owner. Sibling owner-signed value moves do:

  • public Transfer / Burn
  • confidential Transfer / TransferWithFee (confidential_transfer/processor.rs)
  • confidential Burn (confidential_mint_burn/processor.rs)

Those confidential checks landed in #819 “for consistency”, with the note that another program cannot produce a valid ZKP for a confidential transfer. Deposit does not need a ZK proof, so that rationale does not cover it.

Observed locally on program@v11.0.0 under a real SBF CPI (sol_get_stack_height): with lock_cpi = true, Burn returns CpiGuardBurnBlocked; Deposit succeeds and moves public base.amount into pending confidential balance on the same account.

Docs (https://solana.com/docs/tokens/extensions/cpi-guard) also do not list Deposit.

Question: is the omit intentional (Deposit is an in-account conversion, not a transfer/burn), or should it match the #819 sibling check?

Not claiming theft — funds never leave the account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions