Private-credit vaults on Sui: confidential agUSD & sagUSD - hidden amounts, positions and deal data

Agama is private-credit yield infrastructure. LPs deposit USDC and get agUSD, a synthetic dollar backed 1:1 by an on-chain reserve and allocated across six curated private-credit vaults. Staking it mints sagUSD, priced at NAV.
Private credit can't run on a public ledger — positions, borrower terms and LP identities are confidential by contract and regulation. But a fully private system is a silo: nobody can verify the dollar is backed. Agama solves both sides on Sui.
Inside the Sphere, LP positions and the LP↔vault graph stay private with role-based visibility: an LP sees only their own position, Agama Risk sees the book for compliance, a rival sees nothing, and there is no operator god-view.
On public Sui, only an attested aggregate crosses: supply, NAV and a commitment binding the totals, written to an on-chain BackingProof. No LP, no amount, no graph - solvency provable without revealing a position.
And the dollar itself is confidential on-chain: agUSD is a Confidential Token, so balances and transfer amounts are Twisted ElGamal ciphertexts recoverable only with a viewing key, with KYC-gated registration.
Deal docs are Seal-encrypted on Walrus, gated by on-chain seal_approve.
All live on Sui testnet: connect Slush or sign in with Google (zkLogin), swap USDC → agUSD, stake to sagUSD, or run the confidential flow — register, deposit, watch your balance become a ciphertext, decrypt it back.
One Move package on Sui testnet holds usdc, agUSD (pool-backed 1:1), sagUSD (NAV-priced staking), the confidential tokens and the BackingProof; two more cover Seal access policy and a Nautilus attestation verifier with a replay guard. 10 Move unit tests.
The confidential layer derives from MystenLabs/confidential-transfers (contra), pinned as a git dep — amounts hidden with Twisted ElGamal over Ristretto255 + ZK range proofs, whitelist-gated register, issuer freeze/seize.
Frontend: React 19 + Vite + TS, @mysten/dapp-kit, @mysten/enoki for zkLogin (Google → real Sui address, no seed phrase), @mysten/seal, @mysten/sui v2 (SuiGrpcClient — v2 dropped the JSON-RPC client). Bulletproofs are generated in-browser via wasm, so the amount is hidden client-side. A serverless /api/whitelist endpoint self-registers any visitor for KYC.
The hacky part: the ZK wasm wouldn't build. fastcrypto is monolithic, so it pulls blst (a C lib) even though we only use ristretto bulletproofs — and Apple clang has no WebAssembly backend, so cc-rs died compiling blst to wasm32. Fix: build the wasm in a Linux Docker container whose clang does have it, then vendor the platform-independent .wasm. Full SDK crypto suite passes 56/56, no Docker needed to run it.
Sui Spheres has no public SDK yet (Mysten's own PM ships local simulations), so the Sphere sits behind one seam — src/sphere.ts — swappable when the SDK lands.

