Account Structures
On-chain account layouts used by the Vouch program. All accounts are PDAs derived deterministically.
VouchConfig Singleton
- tier_thresholds [u64; 4] USDC thresholds for each tier
- cooldown_period i64 Withdrawal cooldown in seconds
- treasury Pubkey Treasury wallet for protocol fees
- paused bool Global pause flag
- usdc_mint Pubkey USDC SPL token mint address
- stake_to_tx_ratio u8 Ratio of stake to transaction value
AgentIdentity
- owner Pubkey Wallet that owns this agent
- tier AgentTier Current tier level
- capabilities u64 Bitmask of capabilities
- name String Agent name (max 32 chars)
- service_category ServiceCategory Primary service category
- version String Agent version string (max 16 chars)
- agent_card_url String URL to Agent Card document
- agent_card_hash [u8; 32] SHA-256 hash of the Agent Card (exactly 32 bytes, must not be all zeros)
- status AgentStatus Active, Suspended, or Deactivated
- reputation_score u16 Current reputation (0-1000)
- created_at i64 Unix timestamp of registration
- updated_at i64 Unix timestamp of last update
- reputation_updated_at i64 Unix timestamp of last reputation change
- bump u8 PDA bump seed
- reputation_change_today i16 Net reputation change accumulated today
- reputation_day_start i64 Unix timestamp of the start of the current reputation day
- tier_effective_at i64 Unix timestamp when the current tier became effective
StakeAccount
- agent Pubkey Associated agent PDA
- owner Pubkey Wallet that owns this stake
- deposited_amount u64 Total USDC deposited
- locked_amount u64 Amount locked (cannot withdraw)
- pending_withdrawal u64 Amount in cooldown period
- bump u8 PDA bump seed
ReputationReporter
- authority Pubkey Reporter's signing PDA — must be a PDA derived by the reporter program, signs via
invoke_signed - registered_by Pubkey Authority that registered this reporter
- label String Human-readable name (max 32 chars)
- weight u8 Influence multiplier (5–10)
- total_reports u64 Audit counter of total reports submitted
- last_report_slot u64 Slot of last report (for rate limiting)
- is_active bool Whether this reporter is currently active
- bump u8 PDA bump seed
WithdrawalRequest
- stake_account Pubkey Associated stake account PDA
- owner Pubkey Wallet that initiated the withdrawal
- amount u64 USDC amount being withdrawn
- unlock_at i64 Unix timestamp when cooldown ends
- created_at i64 Unix timestamp of request creation
- bump u8 PDA bump seed
DeactivationRecord
- owner Pubkey Wallet that owned the deactivated agent
- deactivated_at i64 Unix timestamp when the agent was deactivated
- final_reputation_score u16 Reputation score at time of deactivation
- bump u8 PDA bump seed