Skip to content

Minimask-labs/ZK-Lend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

ZK-Lend: Private Peer-to-Peer Liquidity Protocol

This Technical Whitepaper serves as the official documentation for your protocol. It is designed to be shared with B2B partners, investors, and developers to explain the mechanics, privacy features, and financial model of your system.


Technical Whitepaper v1.0

1. Executive Summary

ZK-Lend is a decentralised, privacy-preserving lending protocol built on the Aleo blockchain. It enables undercollateralized borrowing by leveraging Zero-Knowledge (ZK) credit scoring and time-locked liquidity pools. Unlike traditional DeFi protocols that broadcast user debt and credit history to the public, ZK-Lend ensures all financial interactions remain private while maintaining provable solvency and creditworthiness.


2. The Problem & Solution

2.1 The Problem

  • Privacy Leakage: Standard DeFi protocols (like Aave/Compound) make user wallet balances and loan history public.
  • Over-Collateralization: Most DeFi loans require >150% collateral because there is no "Identity" or "Credit Score" on-chain.
  • Capital Inefficiency: Lenders often face "bank runs" when there is no lock-up period for liquidity.

2.2 The ZK-Lend Solution

  • ZK-Credit Scoring: Users prove their transaction volume and history without revealing the actual transactions.
  • Tiered Borrowing: High-tier users (Platinum) can borrow with as little as 20% collateral.
  • Time-Locked Staking: Lenders commit capital for specific block durations, ensuring a stable pool for borrowers.

3. Core Architecture

The protocol consists of two primary Aleo programs and an off-chain Oracle system.

3.1 zk_credit.aleo (Identity Module)

This program creates an encrypted "Financial Reputation."

  • Input: Public transaction history hashes.
  • Output: CreditRecord (Private).
  • B2B Interface: Partners can query verify_for_partner to check if a user is "Gold" or "Platinum" without seeing the user's score or wallet address.

3.2 zk_lend.aleo (Market Module)

The engine for liquidity management.

  • Global Pool: A shared mapping where all lenders' funds are aggregated.
  • Lender Shares: Lenders receive "Staking Certificates" that track their principal and the unlock date.
  • Loan Receipts: Encrypted records held by borrowers that prove their obligation to the pool.

3.3 The Oracle & Safety Module

  • Signed Price Feeds: A Node.js bot signs market data (e.g., ALEO/USDC) using the Founder’s private key.
  • Automated Buy-Backs: If a loan becomes under-collateralised, the trigger_buyback function seizes collateral and restores the pool balance, protecting lenders from losses.

4. Protocol Economics (Tokenomics)

4.1 Revenue Streams for the Founder

  1. Origination Fee (1%): Charged on every loan request, sent to the treasury.
  2. Interest Spread (10%): Out of the 10% interest paid by borrowers, 1% (10% of the interest) goes to the Founder, and 9% goes to the Lenders.
  3. Liquidation Bounty: A portion of seized collateral is reserved for the bot operator (Founder).

4.2 Lender Incentives

  • Fixed + Variable Yield: Lenders earn a base interest rate from borrowers, plus a share of the "Buy-Back" insurance fund during market volatility.

5. Technical Specifications for Partners

B2B Integration Guide

Partners wanting to use ZK-Lend scores must implement the following:

// Partner Contract Snippet
import zk_credit.aleo;

transition check_user_access(private record: zk_credit.aleo/CreditRecord) {
    let (r, result) = zk_credit.aleo/verify_for_partner(record, self.address);
    assert(result.is_eligible); // Only allow Platinum/Gold users
}

6. Roadmap

  • Phase 1: Genesis Liquidity (Founder Seeds the Pool).
  • Phase 2: B2B API Launch (Public tier verification for 3rd party dApps).
  • Phase 3: Governance DAO (Community-led interest rate adjustments).

7. Security & Privacy

  • Privacy: All loan amounts, individual staking balances, and credit scores are stored as Private Records on Aleo.
  • Solvency: The pool_balance mapping is public to prove the protocol has enough funds to pay out lenders.
  • Compliance: Viewing Keys can be shared with auditors or regulators for specific transactions without compromising the whole wallet.

About

ZK-Lend: Private Peer-to-Peer Liquidity Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors