Getting Started

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_hash for 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-256 of 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:

PredicateFieldRule
Active statusrevokedMust be false
Expiryexpires_atclock.unix_timestamp < expires_at
Service categorycategory_mask(mandate.category_mask & enclave.service_category) != 0
Per-call ceilingper_call_capamount <= per_call_cap
Epoch budgetepoch_budget, epoch_spentepoch_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. Reserves amount from ring.vault_balance, records fee_amount, commitment_in, request_hash, enclave_pubkey, and timeout_slot (between 5 and 10,000 slots from lock).
  • `Settled` (`1`): Reached via settle_with_receipt once the Ed25519 TEE receipt verifies. Transfers amount - fee_amount to the provider token account and fee_amount to the KALO launch wallet token account.
  • `Refunded` (`2`): Reached via refund_expired_escrow when clock.slot > escrow.timeout_slot while still Locked. Restores amount to ring.vault_balance and increments the provider's disputed_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:

  1. Live mainnet Helius Privacy Rings prover and Solana Confidential Compute CPI switch-over with live proof telemetry.
  2. Multi-hop AgentValve trust routing (TrustEdge, reserve_route, settle_route) for cold-start provider payments.
  3. Enterprise Custom Rings with multi-signer allowlists, multi-auditor viewing keys, and Merkle-verified accounting exports.
  4. Streaming and batched Atomic Service Channels (A402) using off-chain TEE adaptor signatures for sub-cent inference streams.
  5. Sub-delegated agent fleets with hierarchical child mandates and sponsor escalation queues.

Confidential commerce infrastructure for autonomous software.

Shielded treasuries, scoped mandates, and receipt-bound HTTP 402 settlement on Solana L1.

Open consoleRead the docs