A privacy-preserving money market built on Zama FHEVM, where balances, debts, and collateral stay encrypted on-chain.
Status: active build toward the Zama Developer Program Season 3 (Composable Privacy). The canonical design and roadmap live in
NEXORA_MASTER_PLAN.md— that document is the source of truth.
Nexora is an isolated, single-pair confidential money market (Morpho Blue–style): one collateral asset and one loan asset per market, with immutable risk parameters set at deploy. Supply, borrow, interest accrual, and liquidation run end-to-end inside FHEVM — individual amounts are never revealed.
The ledger is Compound Comet–style and index-based: each position is an encrypted scaled principal, and interest accrues by advancing a single public index. No receipt token is ever the source of truth.
- Interest — public indexes + encrypted scaled balances. A user's balance is
scaledPrincipal × publicIndex. Interest applies by moving one public number; no per-user encrypted division. - Rates — epoch reveal of quantized totals. Totals accrue encrypted; once per epoch the protocol reveals only bucketed aggregates to recompute the kinked-curve rate. Individual positions stay hidden.
- Liquidation — price-gated probe → 1-bit reveal → blind tranche seize. A bonded
probe(gated by cooldown or a real price move) reveals a single bit — is this position liquidatable? — then liquidation proceeds in blind tranches. Amounts never leak, dissolving liquidation-sniping MEV.
Solvency is never computed as a health factor; it is checked as a cross-multiplied encrypted inequality. Rejected actions clamp to a zero-move instead of reverting, so a rejected action is on-chain-indistinguishable from a real one.
| Component | Encrypted? | Responsibility |
|---|---|---|
MarketFactory |
no | Deploys/registers isolated markets from configs |
MarketConfig |
no | Immutable per-market params (assets, LTV, θ, bonus, caps, epoch, probe) |
PriceRouter |
no | Chainlink → normalized public prices with staleness checks |
InterestRateModel |
no | Pure kinked utilization curve |
NexoraMarket |
yes | supply / withdraw / borrow / repay; solvency gating; holds encrypted positions |
RateOracle |
epoch | Epoch reveal of quantized totals → rate update (may inline into market) |
LiquidationEngine |
flags | Probe bonds, 1-bit liquidatable decrypt, tranche seizure |
ACLManager |
no | Roles (POOL_ADMIN / EMERGENCY_ADMIN / RISK_ADMIN) |
Tokens come from the official Zama ERC-7984 registry — Nexora ships no custom token or swapper contracts.
contracts/ Hardhat + @fhevm/hardhat-plugin: Solidity contracts and tests
webapp/ Next.js 15 frontend (wagmi v2, @zama-fhe/relayer-sdk)
NEXORA_MASTER_PLAN.md Canonical design, economics, and full contract spec
Contracts
cd contracts
npm install
npm run compile
npm test # unit + local-fhevm-mock integration testsFrontend
cd webapp
npm install
cp .env.local .env.local # fill in deployed contract addresses
npm run devNexora hides amounts, not transaction metadata. What is observable on-chain: who/when/which function (amounts hidden); quantized epoch aggregates (once per epoch); one bit per price-gated liquidation probe; a coarse tranche-count size hint during liquidation. Everything else stays encrypted. Full budget ships in SECURITY.md.
See LICENSE.