CipherCredit

FHE-Powered On-Chain Credit Protocol

About

## Wave 2 submission

In this wave, we built CipherCredit — a privacy-preserving on-chain credit scoring protocol powered by Fhenix CoFHE (Fully Homomorphic Encryption), solving DeFi’s long-standing over-collateralisation problem without exposing user data.

We tackled why this matters by removing the need for 150%+ collateral, which currently excludes most real-world users. Instead of relying on centralized credit bureaus or transparent on-chain histories, we designed a system that computes a weighted credit score — balance, transaction frequency, repayment history, and debt ratio — entirely on encrypted inputs. The score never exists in plaintext anywhere on-chain.

We deployed two core smart contracts. CreditScoreRegistry accepts encrypted financial signals (InEuint32 ciphertexts) and computes the score using FHE operations like FHE.mul and FHE.add directly on ciphertexts, then performs an encrypted comparison (FHE.gte) to produce a boolean approval result. This result is selectively disclosed to a lender. LendingPool consumes that verified boolean through a three-step on-chain reveal flow powered by the Fhenix threshold network, enforcing collateral tiers of 150% for standard users and 110% for credit-approved borrowers.

On the frontend, we built a full Next.js 15 App Router application. The Borrower Dashboard allows users to adjust financial signals with live sliders, preview their score, encrypt and submit data via the CoFHE SDK, and grant approval in one flow. The Lender Dashboard displays pool liquidity and collateral tiers, and allows lenders to check borrower eligibility — seeing only pass or fail, never the underlying data.

We also implemented a full Hardhat task suite covering deployment, encrypted data submission, and the complete three-step approval and reveal process from the CLI.

The key breakthrough is enabling lending decisions based on real creditworthiness without revealing any sensitive data. Borrowers retain full control over disclosure, and lenders receive only what they need — a verified boolean. This is selective disclosure enforced at the cryptographic level through FHE, not by UI or policy.

## Wave 3 submission

This wave builds on wave one and extends it in three directions: a dynamic personal interest rate computed in FHE, a soul-bound credit tier NFT, and a verifiable signal system that replaces self-reported inputs with real on-chain data.

Live demo: https://cipher-credit.vercel.app/

Deployed contracts on Arbitrum Sepolia:

CreditScoreRegistry — https://sepolia.arbiscan.io/address/0x6C0E2b4C44ed9F3ED057a2fdF1dE4c53Ec997567

LendingPool — https://sepolia.arbiscan.io/address/0xa646663c7D269363c62198EFb1d69Fc1d24e298B

CreditTierNFT — https://sepolia.arbiscan.io/address/0x7b5353c1c76f0fBdF40000DF272Ee81A3e9b7C9F

WHAT IS NEW THIS WAVE

Dynamic Personal Interest Rate

Last wave approval was binary. This wave borrowers get a personalised APR computed entirely in FHE. The formula maps scores between 7,000 and 10,000 to rates between 15.00% and 8.00%. Arithmetic runs on ciphertexts via computePersonalRate. The borrower calls setPersonalRateDirect to reveal their rate — since they know their inputs, the client-side computation matches the FHE result, and the contract enforces bounds on-chain. LendingPool applies this rate to loans, so APR differences compound as real accrued interest.

Credit Tier NFT

CreditTierNFT is a soul-bound ERC-721 assigning Bronze, Silver, or Gold based on the revealed rate. Gold requires ≤10.33%, Silver ≤13.83%, Bronze ≤15.00%. Transfers are permanently blocked. SVGs are generated fully on-chain with no IPFS dependency. External protocols can call balanceOf or getTier to gate access without CoFHE integration. Credit reputation now travels with the wallet.

Verifiable On-Chain Signals

Last wave used self-reported sliders. This wave signals are fetched directly on-chain via useAutoSignals: wallet ETH balance, transaction count, and repayment history. Inputs are read-only and submission is disabled until fetched. Encrypted values reflect real wallet behaviour, so the FHE score represents actual creditworthiness.

UX Rebuilt Around the Flow

The borrower dashboard now follows three steps: fetch and submit signals, compute and reveal rate, then request a loan or mint the NFT. Each action has loading states and inline errors. Collateral is calculated using integer arithmetic matching the contract, eliminating a float truncation bug from wave one. MetaMask only opens when a transaction is expected to succeed — simulateContract dry-runs catch reverts first.

THE CORE NARRATIVE SHIFT

Wave one proved the concept: encrypted score, binary approval, collateral discount. Wave two makes it economically meaningful. Rates compound as real interest. The NFT becomes a portable credential. Signals come from verifiable on-chain history. The system now reflects a full credit lifecycle: prove history, get a score, earn a rate, borrow at a discount, and build a reputation that travels with you.

## Wave 4 submission

This wave turns the credit system into a full lending lifecycle. Wave three gave borrowers a personalised rate and a tier NFT. Wave four makes that tier economically consequential and opens the protocol to external builders.

Live demo: https://cipher-credit.vercel.app/ Developer SDK: https://www.npmjs.com/package/@ciphercredit/sdk

Deployed contracts on Arbitrum Sepolia (redeployed this wave): CreditScoreRegistry — https://sepolia.arbiscan.io/address/0x5251f7e0890d02001cFeD2191924922D285579F1 LendingPool — https://sepolia.arbiscan.io/address/0xD49e2362B08a65C5B8eB77bEdD153E60D8Bceda8 CreditTierNFT — https://sepolia.arbiscan.io/address/0x02ABEC33b433f8370b24b55f4caA6412E3D4E0B3

WHAT IS NEW THIS WAVE

On-Chain Repayment Counter

Every successful repayLoan increments repaymentCount on-chain for that borrower. When signals are fetched next time, this counter feeds directly into the repayment history signal, which carries a 40-point weight in the FHE score formula. Borrowers who repay on time genuinely improve their encrypted credit score without any trusted third party recording the history. The counter is a public mapping and cannot be faked.

Loan Deadline and Permissionless Liquidation

Every loan now records a dueDate set to 30 days from issuance. Once that deadline passes, anyone can call liquidate(borrower). The liquidator receives a 5% bounty from the locked collateral. The borrower's defaultCount is incremented on-chain, which applies a penalty to their future debt ratio signal. This creates real accountability: a borrower who walks away loses collateral, receives a default mark, and sees their next FHE score drop measurably.

Credit Limit Scaling by Tier

LendingPool now calls CreditTierNFT.getTier on every loan request and scales the maximum borrowable amount based on tier. The base limit is 50% of available pool liquidity. Bronze holders get 1.25x, Silver 1.5x, Gold 2x. The pool enforces this on-chain — it is not a UI hint. A Gold NFT, earned privately through a high FHE score, unlocks twice the borrowing capacity of an unrated wallet. Privacy and reputation now have direct economic value.

Developer SDK

The @ciphercredit/sdk package (https://www.npmjs.com/package/@ciphercredit/sdk) lets any protocol integrate CipherCredit without understanding CoFHE. CipherCreditClient wraps all read methods: getTier, isApproved, getLoan, getMaxBorrowable, getRepaymentStats, getBorrowerProfile. A separate react sub-export provides wagmi hooks. Contracts can integrate via the ICreditTierNFT interface directly in Solidity. No FHE knowledge required.

## Wave 5 submission

This wave makes the protocol self-sustaining and composable. Wave four gave borrowers consequences for defaults and rewards for repayments. Wave five closes the economic loop for lenders and opens the credit tier to any external protocol on the same chain.

Live demo: https://cipher-credit.vercel.app/ Developer SDK: https://www.npmjs.com/package/@ciphercredit/sdk

Deployed contracts on Arbitrum Sepolia (redeployed this wave): CreditScoreRegistry — https://sepolia.arbiscan.io/address/0xb05dB39DF30485aF300874A7fF3BEfDA72F15Ab0 LendingPool — https://sepolia.arbiscan.io/address/0x76b09CC00c892c76C18948e9f2ca1Aa43C93321e CreditTierNFT — https://sepolia.arbiscan.io/address/0x2522743838D43e6EB9532f1EEE452B85F4aAF89E

WHAT IS NEW THIS WAVE

LP Yield Distribution

Liquidity providers previously earned nothing. This wave replaces the flat deposit mapping with share-based accounting. When borrowers repay, 90 percent of interest is credited to totalLPBalance, increasing the ETH value of every existing share. The remaining 10 percent accumulates for the protocol fee recipient. A provider who deposits before a repayment receives more on withdrawal than one who deposits after. Borrowers pay interest, lenders earn yield, the pool is self-financing.

Credit Tier as a Composable Primitive

Any external protocol can gate access by credit tier in a single call. verifyCreditTier(address, minTier, maxAge) on CreditScoreRegistry returns true if the borrower holds the required tier and their data was updated within the specified window. ICreditTierNFT.sol is a minimal Solidity interface any contract can import without a CoFHE dependency. A DEX, DAO, or NFT marketplace can enforce Silver-and-above access in one line. lastScoreUpdate(address) exposes the data freshness timestamp for integrators who need staleness enforcement.

Stale Signal Keeper

A new Hardhat task, refresh-signals, accepts a list of borrower addresses and reports which have not updated their encrypted credit inputs within 30 days. It reads only public on-chain data and prints stale addresses with their age. No encrypted values are touched.

Lender Dashboard

The lender page is rebuilt. It shows each provider's current ETH balance including accrued yield, pool utilisation as a live percentage bar, a loan inspector to look up any borrower's active loan and overdue status, and a fee claim panel for the protocol fee recipient.

From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

No public repo linked, so we can't tell.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.