Core Concepts
Privacy Rings, Authority Mandates, Confidential Compute enclaves, Sealed Escrows, Blind Reputation, and viewing keys.
Privacy Rings
A PrivacyRing is a sponsor-owned shielded treasury PDA on Solana bound to a single token mint (SOL, USDC, or any SPL / Token-2022 mint). Deposited tokens sit in a program-owned ring_vault token account while individual balances are tracked as encrypted UTXO commitments appended to the Ring's Merkle tree (merkle_root).
Each Ring has a compliance mode:
- Permissionless (`0`): Any standard shielded deposit, mandate lock, and unshield withdrawal runs without an allowlist check.
- Allowlisted (`1`): Marks the Ring for institutional or policy-gated workflows and pairs with an optional
auditor_key_hashfor read-only compliance inspection.
Shielded UTXOs and nullifiers
When a sponsor deposits funds with shield_deposit, the client computes a 32-byte commitment and an 8-byte view_tag, encrypts the plaintext note under the viewing key (AES-256-GCM), and appends the commitment to privacy_ring.merkle_root.
Spending a shielded UTXO (either in lock_sealed_402 or unshield_withdraw) initializes a NullifierSet PDA seeded by ["nullifier", privacy_ring, nullifier]. Because Solana rejects duplicate PDA initialization, a nullifier can never be spent twice.
Viewing keys
Viewing keys decrypt shielded UTXO notes and settlement receipts off-chain without granting spending authority.
- Master viewing key: Held by the Ring sponsor. Decrypts all shielded notes, settlement prices, fees, and encrypted provider responses.
- Auditor viewing key (optional): Committed at Ring creation as
auditor_key_hash(SHA-256of the auditor public key). Grants read-only decryption for bookkeeping and compliance without exposing data on the public chain.
Authority Mandates
An AuthorityMandate PDA delegates bounded spending authority from a PrivacyRing to a specific agent Ed25519 public key without handing over the Ring owner's key. Mandates are versioned by (ring, agent_pubkey, version) so sponsors can rotate policies cleanly.
Every lock_sealed_402 call enforces five on-chain predicates:
| Predicate | Field | Rule |
|---|---|---|
| Active status | revoked | Must be false |
| Expiry | expires_at | clock.unix_timestamp < expires_at |
| Service category | category_mask | (mandate.category_mask & enclave.service_category) != 0 |
| Per-call ceiling | per_call_cap | amount <= per_call_cap |
| Epoch budget | epoch_budget, epoch_spent | epoch_spent + amount <= epoch_budget (resets automatically once epoch_duration_sec elapses) |
Calling revoke_mandate sets revoked = true in a single slot.
Confidential Compute enclaves
Service providers run their APIs or AI models inside Trusted Execution Environments (IntelTDX = 0, AmdSevSnp = 1) and register the enclave's ephemeral Ed25519 signing key in EnclaveRegistry. Each record stores measurement_hash, attested_slot, expires_slot, service_category, and active.
On settlement, settle_with_receipt checks that enclave.active == true and clock.slot < enclave.expires_slot, then scans prior instructions in the same transaction for a valid Solana Ed25519SigVerify precompile instruction signing SHA256(escrow_pda || request_hash || output_hash).
Sealed Escrows
A SealedEscrow PDA binds a single HTTP 402 call from lock to release or refund. It transitions through three states:
- `Locked` (`0`): Created by
lock_sealed_402. Reservesamountfromring.vault_balance, recordsfee_amount,commitment_in,request_hash,enclave_pubkey, andtimeout_slot(between5and10,000slots from lock). - `Settled` (`1`): Reached via
settle_with_receiptonce the Ed25519 TEE receipt verifies. Transfersamount - fee_amountto the provider token account andfee_amountto theKALOlaunch wallet token account. - `Refunded` (`2`): Reached via
refund_expired_escrowwhenclock.slot > escrow.timeout_slotwhile stillLocked. Restoresamounttoring.vault_balanceand increments the provider'sdisputed_count.
Blind Reputation
Every registered enclave has a paired ReputationAccumulator PDA (["reputation", enclave_pubkey]) holding settled_count, disputed_count, flow_witness_root, and last_updated_slot.
Each settle_with_receipt rolls flow_witness_root = SHA256("kalo:flow:settle" || prev_root || escrow_pda || output_hash) and increments settled_count. Each refund_expired_escrow increments disputed_count. Agents verify a provider's fulfillment history through POST /v1/providers/:address/verify-reputation without exposing counterparty graphs.
Post-launch roadmap
The first build delivers the single-call Sealed 402 Settlement loop. Planned follow-on builds in Kalo's road expand the protocol in five steps:
- Live mainnet Helius Privacy Rings prover and Solana Confidential Compute CPI switch-over with live proof telemetry.
- Multi-hop AgentValve trust routing (
TrustEdge,reserve_route,settle_route) for cold-start provider payments. - Enterprise Custom Rings with multi-signer allowlists, multi-auditor viewing keys, and Merkle-verified accounting exports.
- Streaming and batched Atomic Service Channels (A402) using off-chain TEE adaptor signatures for sub-cent inference streams.
- Sub-delegated agent fleets with hierarchical child mandates and sponsor escalation queues.