Skip to main content
All protocol constants are defined in x0-common and shared across every on-chain program. Many are governance-adjustable via the wrapper’s timelock mechanism.

Program IDs

ConstantValueDescription
ESCROW_PROGRAM_IDAhaDyVm8LBxpUwFdArA37LnHvNx6cNWe3KAiy8zGqhHFx0-escrow program
GUARD_PROGRAM_ID2uYGW3fQUGfhrwVbkupdasXBpRPfGYBGTLUdaPTXU9vPx0-guard program
REPUTATION_PROGRAM_IDFfzkTWRGAJQPDePbujZdEhKHqC1UpqvDrpv4TEiWpx6yx0-reputation program

Protocol Identifiers

ConstantValueDescription
PROTOCOL_VERSION"2.0"Current protocol version
PROTOCOL_NAME"x0-01"Protocol name for x402 headers
NETWORK_MAINNET"solana-mainnet"Mainnet network identifier
NETWORK_DEVNET"solana-devnet"Devnet network identifier
NETWORK_LOCALNET"solana-localnet"Localnet network identifier

Fee Configuration

ConstantValueDescription
PROTOCOL_FEE_BASIS_POINTS800.8% protocol fee via TransferFee extension
MAX_PROTOCOL_FEE_BASIS_POINTS100010% governance safety cap
MIN_PROTOCOL_FEE11 micro-unit minimum fee (prevents dust avoidance)
FEE_DENOMINATOR10,000Basis points denominator

Time Constants

ConstantValueHuman-ReadableDescription
ROLLING_WINDOW_SECONDS86,40024 hoursSpending window duration
MAX_ROLLING_WINDOW_ENTRIES144~10 min intervalsMax entries in the rolling window
BLINK_EXPIRY_SECONDS90015 minutesBlink expiration time
DEFAULT_ESCROW_TIMEOUT_SECONDS259,20072 hoursDefault escrow timeout
MIN_ESCROW_TIMEOUT_SECONDS3,6001 hourMinimum escrow timeout
MAX_ESCROW_TIMEOUT_SECONDS2,592,00030 daysMaximum escrow timeout

Slot-Based Time Constants

These constants protect against clock manipulation by using slot numbers instead of (or alongside) Unix timestamps.
ConstantValueApprox. TimeDescription
SLOTS_PER_SECOND2Conservative estimate (400ms/slot)
ROLLING_WINDOW_SLOTS216,000~24 hoursSlot-based spending window with buffer
TIME_CHECK_BUFFER_SLOTS750~5 minutesClock skew safety margin
ESCROW_TIMEOUT_BUFFER_SLOTS1,500~10 minutesEscrow timeout safety margin

Rate Limiting

ConstantValueDescription
MAX_BLINKS_PER_HOUR3Maximum Blinks per agent per hour
BLINK_GENERATION_COST_LAMPORTS1,000,0000.001 SOL burned per Blink
POLICY_UPDATE_COOLDOWN_SLOTS750~5 min between policy updates
ARBITER_RESOLUTION_DELAY_SLOTS216,000~24 hour delay before arbiter can resolve

Policy Limits

ConstantValueHuman-ReadableDescription
MAX_DAILY_LIMIT1,000,000,000,0001M tokensMaximum daily spending limit
MIN_DAILY_LIMIT1,000,0001 tokenMinimum daily limit
MIN_TRANSFER_AMOUNT1000.0001 tokensDust transfer prevention
DEFAULT_DAILY_LIMIT100,000,000,000100K tokensDefault limit for new policies

Whitelist Configuration

ConstantValueDescription
MAX_MERKLE_WHITELIST_SIZE10,000Max addresses in Merkle whitelist
MAX_MERKLE_PROOF_DEPTH14log2(10,000) ≈ 14
BLOOM_FILTER_SIZE_BYTES4,0964KB for ~1000 items at 1% FP rate
BLOOM_HASH_COUNT7Number of Bloom filter hash functions
MAX_DOMAIN_PREFIXES100Max domain prefixes in Domain mode
DOMAIN_PREFIX_LENGTH8Bytes per domain prefix

PDA Seeds

ConstantSeedDerivation
AGENT_POLICY_SEED"agent_policy"[seed, owner.key()]
ESCROW_SEED"escrow"[seed, buyer.key(), seller.key(), memo_hash]
REGISTRY_SEED"registry"[seed, agent_id.key()]
REPUTATION_SEED"reputation"[seed, agent_id.key()]
PROTOCOL_CONFIG_SEED"protocol_config"[seed]
TREASURY_SEED"treasury"[seed]
WRAPPER_CONFIG_SEED"wrapper_config"[seed]
WRAPPER_STATS_SEED"wrapper_stats"[seed]
WRAPPER_RESERVE_SEED"reserve"[seed, usdc_mint.key()]
WRAPPER_MINT_AUTHORITY_SEED"mint_authority"[seed]
ADMIN_ACTION_SEED"admin_action"[seed, action_type, nonce]
CT_PROOF_CONTEXT_SEED"ct_proof"[seed, proof_type]

Account Size Constants

ConstantSize (bytes)Account
AGENT_POLICY_BASE_SIZE120AgentPolicy (base without variable fields)
SPENDING_ENTRY_SIZE16Each SpendingEntry (amount + timestamp)
MAX_AGENT_POLICY_SIZE~6,680AgentPolicy with full rolling window + Bloom filter
AGENT_REGISTRY_SIZE~5,480AgentRegistry entry
ESCROW_ACCOUNT_SIZE~162Escrow account
REPUTATION_ACCOUNT_SIZE~100Reputation account
WRAPPER_CONFIG_SIZE196WrapperConfig
WRAPPER_STATS_SIZE138WrapperStats
ADMIN_ACTION_SIZE84AdminAction

Compute Unit Estimates

ConstantCUOperation
CU_PUBLIC_TRANSFER3,400Public transfer validation
CU_CONFIDENTIAL_TRANSFER50,300Confidential transfer validation
CU_ESCROW_CREATION2,800Escrow creation
CU_POLICY_UPDATE1,500Policy update
CU_MERKLE_VERIFY2,000Merkle proof verification
CU_BLOOM_VERIFY800Bloom filter verification
CU_DOMAIN_VERIFY400Domain prefix verification

Reputation System

ConstantValueDescription
REPUTATION_SUCCESS_WEIGHT0.60Weight for success rate in score formula
REPUTATION_RESOLUTION_WEIGHT0.15Weight for dispute resolution rate
REPUTATION_DISPUTE_WEIGHT0.10Weight for (1 - dispute rate)
REPUTATION_FAILURE_WEIGHT0.15Weight for (1 - failure rate)
REPUTATION_DECAY_RATE_BPS1001% monthly decay
MIN_TRANSACTIONS_FOR_REPUTATION10Minimum transactions for reliable score

Registry Configuration

ConstantValueDescription
REGISTRY_LISTING_FEE_LAMPORTS100,000,0000.1 SOL listing fee
MAX_ENDPOINT_LENGTH256Max endpoint URL length
MAX_CAPABILITIES_PER_AGENT10Max capabilities per agent
MAX_CAPABILITY_METADATA_LENGTH256Max metadata per capability
MAX_CAPABILITY_TYPE_LENGTH64Max capability type string length
REGISTRY_TTL_SECONDS3005-minute cache TTL

Wrapper Configuration

ConstantValueDescription
WRAPPER_REDEMPTION_FEE_BPS800.8% redemption fee
MIN_WRAPPER_FEE_BPS100.1% minimum fee
MAX_WRAPPER_FEE_BPS5005% maximum fee
MAX_REDEMPTION_PER_TX100,000,000,000100K USDC per transaction
MAX_DAILY_REDEMPTIONS1,000,000,000,0001M USDC daily
MIN_RESERVE_RATIO_SCALED10,0001.0x minimum ratio
RESERVE_WARNING_THRESHOLD10,1001.01x warning threshold
ADMIN_TIMELOCK_SECONDS172,80048-hour timelock
MIN_DEPOSIT_AMOUNT1,000,0001 USDC minimum deposit
MIN_REDEMPTION_AMOUNT1,000,0001 USDC minimum redemption
WRAPPER_DECIMALS6Must match USDC decimals

Confidential Transfer Configuration

ConstantValueDescription
ELGAMAL_PUBKEY_SIZE32Compressed Ristretto point
DECRYPTABLE_BALANCE_SIZE36AES-encrypted decryptable balance
ELGAMAL_CIPHERTEXT_SIZE64Two compressed Ristretto points
MAX_CONFIDENTIAL_AMOUNT2^48 - 1Token-2022 ZK proof limit
MAX_PENDING_BALANCE_CREDIT_COUNTER65,536Max incoming transfers before apply
PUBKEY_VALIDITY_PROOF_SIZE64PubkeyValidityProof data
ZERO_CIPHERTEXT_PROOF_SIZE96ZeroCiphertextProof data
WITHDRAW_PROOF_SIZE160WithdrawProof data
TRANSFER_PROOF_SIZE288TransferProof data (ciphertext validity + range)
CONFIDENTIAL_ACCOUNT_EXTENSION_SIZE~120Account extension additional space
Last modified on February 8, 2026