cypher
Developer docs

Verifier widget

Add Cypher attestation to your Solana app in 30 lines.

Architecture

Cypher architecture diagram

Privacy during execution: the agent's reputation lives inside MagicBlock's Private Ephemeral Rollup, scores compute inside the TEE, only the boolean attestation crosses the boundary back to the verifier.

Install

bash
npm install @sonayonn/cypher-verify @coral-xyz/anchor @solana/web3.js
View on npm ↗

Use it

tsx
import { verifyAttestation, Dimensions } from "@/lib/cypher-verify";
import { PublicKey } from "@solana/web3.js";

// In your verifier flow (e.g. checkout, lending, auction entry):
const result = await verifyAttestation({
  agent: new PublicKey(agentPubkey),
  dimension: Dimensions.PaymentReliability,
  threshold: 7,
  wallet,        // any wallet-adapter wallet
  connection,    // Solana RPC connection
});

if (result.passes) {
  // Grant access. The actual score is not revealed.
  proceedWithCheckout();
} else {
  rejectWithReason("Payment reliability threshold not met");
}

Three dimensions

  • Dimensions.PaymentReliability(0–10)

    Score derived from completed vs failed/disputed payments

  • Dimensions.CreditWorthiness(0–10)

    Score derived from on-time vs late/defaulted loans

  • Dimensions.VolumeTier(1–4)

    Tier from 30-day rolling transaction volume

Privacy property

The verifier never learns the agent's underlying score, event counts, or volume — only whether the threshold is met. Cypher's reputation state lives inside MagicBlock's Private Ephemeral Rollup; the threshold check executes inside the TEE.

What's deployed

Program ID:
4ofnnZnnjkejk8Sk5ggjtAzAC9YSeVGTLuX1g7jPrtJC
Network:
Solana devnet
Demo agent:
J15wEqvQvXJHGAZSaMbaEnnEvjV7JqLB6Ku2ZepB3CQ5

FAQ

Is Cypher live on mainnet?

Not yet — currently deployed on Solana devnet. The program, scoring math, attestation flow, and TEE integration are all production-quality. Mainnet deployment is gated on (1) audit and (2) replacing the centralized recorder model with per-source authority. See v2 roadmap below.

Who is allowed to record events for an agent?

In the current version, a single oracle (Cypher) signs all record_event calls. This is sufficient for the demo and for trusted-recorder use cases. v2 introduces per-source authority where each event source — a merchant, a lender, an auction — signs its own events with its own key, removing the central trust assumption.

Do verifiers learn anything besides pass/fail?

No. The on-chain AttestationEvent contains the score, but it's emitted only inside the verifier's own transaction logs. The protocol is designed so that the agent's underlying counts and volume never leave Cypher — only the boolean answer to the threshold check reaches the verifier's application logic.

Where does the privacy actually live?

Inside MagicBlock's Private Ephemeral Rollup (PER) — a Solana ephemeral rollup that runs inside an Intel TDX Trusted Execution Environment. While delegated, the agent's reputation PDA is held in the TEE; events are recorded there; threshold checks execute there. State commits back to base layer only when the agent undelegates.

What does an attestation cost?

A few thousand lamports per attestation transaction (~$0.00001 USD). PDA rent for an agent's reputation is ~0.003 SOL one-time. Cypher imposes no protocol fees in v1.

How is this different from a traditional reputation system?

Traditional reputation systems either expose all underlying data (privacy violation) or live behind opaque APIs (trust violation). Cypher is on-chain — anyone can verify the program logic — but the data lives in a TEE-backed rollup. Verifiers get cryptographic-grade trust about the answer without ever seeing the inputs.

Can my app integrate Cypher today?

Yes — copy lib/cypher-verify.ts and call verifyAttestation(). The integration is one function call. The agent has to exist in Cypher (their reputation PDA initialized) — for the demo we pre-seed one; in production this would happen through agent onboarding flows (planned for v2 npm SDK).

v2 roadmap

  • Mainnet deploy with audited program
  • Per-source authority — each merchant/lender signs its own events instead of one Cypher oracle
  • TEE-signed attestations verifiable off-chain without trusting the RPC
  • Score economics calibrated against real agent behavior data
  • Programmatic SDK for non-Solana verifiers (e.g. fiat off-ramps)