Skip to content
QORECHAIN
Register

Encrypted Apps

Agama

Private credit sealed against Q-Day: KYC and loan files stay encrypted, and no quantum-breakable key moves the money.

Share on X

About

Agama is a permissioned private credit vault on QoreChain. Lenders deposit dollars, receive agUSD, and earn the yield of an asset-backed credit book that lives on Ethereum. Private credit needs two things a public chain could never offer together: only verified investors may lend, and investors must see every loan while the public sees nothing. Its data must also stay secret for years, which makes it a prime target for harvest now, decrypt later attacks. On QoreChain, every lender’s KYC is sealed in the browser with ML-KEM-1024 through QoreSeal, so the chain only stores ciphertext that the compliance officer and the auditor can open. The approval is an ML-DSA-87 signature verified on chain by the pqcVerify precompile, and the decision letter is sealed back to the lender. The loan tape is published on chain as an encrypted batch under a new group key at every membership change, so approved lenders read every loan in their browser and anyone can check its commitment. Each lender’s Agama account is a post-quantum smart account controlled only by the ML-DSA-87 key of their QoreX wallet. Lenders sign plain text messages and never pay gas or configure anything. Agama itself sends nothing that relies on ECDSA alone: every relayer and keeper transaction is a hybrid native transaction, the explorer shows them as quantum-safe and verified on chain, and the chain refuses an ECDSA-only transaction from any of our accounts. Our audit script verified 278 out of 278. The app is live with a running keeper and a bridge to Ethereum Sepolia, backed by 200 Foundry tests, end to end batteries against the production keeper, and 22 documented findings.

How it's made

The contracts are Solidity on QoreChain’s EVM. AgUSD is a permissioned ERC-4626 vault with a 10 percent buffer, a FIFO exit queue and vested profit. AccessRegistry holds each lender’s ML-KEM-1024 key, the sealed dossiers and the signed decisions. It plugs into the Asset Kit’s QoreChainHybridHolderGuard and an ERC-3643 compliance module, so only approved accounts that are still hybrid holders can hold agUSD. DataRoom stores membership epochs and encrypted loan tapes. Every admin power, decision, epoch, tape and NAV mark is an ML-DSA-87 signature checked by pqcVerify against the key returned by pqcKeyStatus, and no admin function trusts msg.sender. Capital leaves through CrossChainAllocator over CCTP V2 style messages. Money coming back to QoreChain is attested with ML-DSA-87. On Ethereum, which cannot verify ML-DSA-87 at a sane cost, minting requires secp256k1 plus ML-DSA-44 verified in Solidity, with a Merkle WOTS+ verifier as an alternative. The keeper runs on GitHub Actions and the relayer runs inside the Next.js app on Vercel. Together they handle compliance, the data room, NAV marks, rebalancing and the bridge. Every write they make is a MsgCrossVMCall hybrid-signed with secp256k1 and ML-DSA-87. All EVM windows are closed, and a test proves the chain refuses an ECDSA-only transaction from our roles. The keeper’s gas comes from a smart account authenticator limited by an on-chain spending rule of 5 QOR per payment and 15 QOR per day. Kits: QoreChain SDK for native hybrid signing, cross-VM calls and key registration; QoreSeal for every envelope and the encrypted data room; QoreSign to verify hybrid transactions and the officers’ recipient cards; qorechain-pqc to check every ML-DSA-87 signature locally before sending; QoreX types and the wallet test double for real hybrid signatures in browser tests; the Asset Kit in Solidity; QoreScan for the CBOM, the DORA mapping and the crypto-agility template. The hard parts were real. QoreX 0.4.3 refuses to sign cross-VM calls because it cannot display them, so we built PqAccount: a contract per lender that verifies its owner’s ML-DSA-87 signature on chain, which removed every wallet setup step. Moving our writes to the native lane made them quantum-safe, but native calls leave no EVM logs, so we rebuilt every reader from transaction calldata checked against contract state. The bridge message is rebuilt byte for byte and matches all 37 logged ones. The data room key outgrew the public RPC at 36 readers, so we split it into parts of eight. A bridge nonce collision once burned a return; we repaired it live and no lender lost anything. Everything is written up in FINDINGS.md.

Timeline

AgamaEncrypted Apps

Pushed 3 commits to main

  • a000d70 App: the key notice registers the ML-DSA-87 key in one click from QoreX · dyonisos100
  • b0bcb8a App: back to the plain key notice · dyonisos100
  • 150dd40 App: the key notice registers the ML-DSA-87 key in one click from QoreX, or points to the faucet with the address · dyonisos100
AgamaEncrypted Apps

Pushed 2 commits to main

  • fd5399b App: no verification before the ML-DSA-87 key is on chain; the relayer says why instead of a generic retry · dyonisos100
  • d586e17 App: when QoreX is on another network, ask it for the testnet, and say so plainly if it stays there · dyonisos100
AgamaEncrypted Apps

Pushed 3 commits to main

  • f3bde0f README, llms.txt: the campaign, and the audit at 584 of 584 · dyonisos100
  • 6b48262 Campaign report: three rounds on chain, 584/584 hybrid, a million fuzz cases; fresh screenshots · dyonisos100
  • 49d608b Onboarding e2e: type the deposit once the new balance shows, and again if the card cleared it · dyonisos100
AgamaEncrypted Apps

Pushed 3 commits to main

  • 83887a0 Campaign runner: every battery against the live keeper and app, round after round, with a runway floor · dyonisos100
  • 981a698 Keeper: new-lender, a fresh QoreX account with its ML-DSA-87 key registered and nothing else · dyonisos100
  • b0a6eb7 Battery: what the keeper bridges is the excess over the buffer, not a share of the new deposits · dyonisos100
AgamaEncrypted Apps

Pushed 205 commits to main

  • c180207 Contracts: 12 fuzz tests for PqAccount, AccessRegistry and DataRoom; a deep profile at 50,000 inputs per fuzz test · dyonisos100
  • a4b743d Keeper workflow: the health check in every run's summary · dyonisos100
  • 20bd90a Keeper: health check, runway of every gas-paying account at the recent pace, gas tank expiry, Sepolia ETH · dyonisos100
  • 6f54643 Docs: post-quantum audit refreshed, 318 of 318 transactions hybrid-verified · dyonisos100
  • 3fe7b2e README: Built on QoreChain badge, linked to the fest project page · dyonisos100

and 200 more commits

AgamaEncrypted Apps

New project.

Comments and questions

  • No comments yet.