CipherLend is a privacy-preserving institutional credit prototype built with CoFHE. Borrowers encrypt financial inputs in the browser, contracts compute encrypted underwriting signals, and loan requests are gated by CoFHE decrypt-for-transaction proofs instead of direct plaintext reveals.
- Frontend: React, Vite, RainbowKit, wagmi,
@cofhe/sdk/web. - API: Express, TypeScript, Ethers v6,
@cofhe/sdk/node. - Contracts: Solidity, Hardhat,
@fhenixprotocol/cofhe-contracts. - Deployment: Render Blueprint with a static frontend service and Node API service.
- Architecture
- Render Deployment Runbook
- Production Readiness Checklist
- Dependency Security Triage
- CoFHE / Reineira Alignment Update
- Node.js
22.17.0or newer - npm
10or newer - A
.envfile based on.env.example
npm installFrontend:
npm run devBackend:
npm run dev:backendContract compile and tests:
npm run compile
npm run testTypecheck:
npm run typecheckBuild frontend:
npm run build:webBuild backend:
npm run build:backendFull production verification:
npm run build:productionStart compiled API:
npm run start:backendGET /health
GET /ready
/health is a process liveness check. /ready verifies production configuration and RPC connectivity.
The repository includes render.yaml.
Deploy order:
- Deploy contracts to Sepolia, Arbitrum Sepolia, or Base Sepolia.
- Set API service environment variables in Render.
- Deploy
cipherlend-api. - Confirm
/healthand/ready. - Set static site
VITE_*environment variables. - Deploy
cipherlend-web. - Add the final web origin to API
ALLOWED_ORIGINS.
See docs/RENDER_DEPLOYMENT.md for the full runbook.
sepoliaarbSepoliabaseSepoliahardhat/localcofhefor local development
- Do not reuse admin wallets as the API signer.
- Do not deploy with zero contract addresses.
- Do not expose raw borrower financial values to the API in production flows.
- Reineira / Privara has an optional SDK-backed API boundary for status, balances, and plain escrow creation. Full protocol settlement rollout still requires deployed Reineira addresses, resolver design, and live operator validation.
- Current dependency audit findings require a separate security triage before handling real funds.