Security architecture
Defense in depth, designed from the protocol up.
InvoicePay treats every input as hostile. This page documents our threat model, on-chain invariants, audit posture, and incident response posture.
PDA validation
Every escrow vault is a Program Derived Address. Seeds are deterministic, bumps are stored on-chain, and every CPI re-derives.
Signer authorization
Strict has_one and signer constraints. No vault releases without the original payer or DAO arbiter signing the transaction.
Replay protection
Per-vault nonces and recent blockhash freshness checks block replayed CPIs and stale instructions.
Account ownership
Owner, mint, and authority checks on every account — including SPL associated token accounts — before any transfer.
Multi-sig treasury
Protocol treasury and admin keys split across a 3-of-5 multisig. No single key can drain or pause.
Emergency pause
Admin can pause new vault creation in incident response. Existing vaults remain releasable by their original signers.
Auditable trail
Every state transition emits a structured event. Indexed by our explorer and re-checkable by any third party.
Minimal disclosure
Off-chain metadata (descriptions, emails) is encrypted at rest. Wallet ↔ profile mapping is opt-in.
Rate limiting
Per-wallet and per-IP rate limits on invoice creation and dispute opening prevent griefing and spam.