CredBook

On-chain orderbook for DeFi lending - competiting liquidity pools give best rates to borrowers

ETHOnline 2025Shipped October 10, 2025#defi#privacy#infra
Visit Repo
CredBook banner

About

What is this project? This project introduces an on-chain orderbook-based lending platform that revolutionizes how borrowers access liquidity in DeFi. Instead of borrowing from a single pool at a fixed rate, borrowers interact with a unified orderbook that aggregates quotes from multiple competing lending pools, each with different interest rate models and risk parameters. The Problem Current DeFi lending platforms (Aave, Compound) force users to borrow from monolithic pools with single interest rate curves. This creates inefficiencies:

Borrowers can't easily compare rates across different pools No competition between different capital providers Lenders can't differentiate strategies to earn higher yields Rate discovery is poor

Our Solution

We've built a two-layer architecture: Layer 1: Competing Lending Pools

Multiple isolated lending pools (inspired by Morpho Blue's minimal design) Each pool has its own Interest Rate Model (IRM) - linear curves, kinked curves, or custom models Pools compete to fill borrower orders by offering competitive rates Each pool quotes 5 orders on the orderbook representing tranches of liquidity at different rates (based on utilization)

Layer 2: On-Chain Orderbook & Matching Engine

A sophisticated orderbook aggregates all pool quotes (20 orders from 4 pools in our demo) Uses an efficient sorting algorithm to maintain orders sorted by interest rate. Borrowers submit market or limit orders Matching engine automatically fills orders from the cheapest available liquidity When orders are filled, affected pools requote their 5 orders based on new utilization Orderbook re-sorts all orders to maintain best-execution

Key Innovations

Dynamic Rate Discovery: Pools continuously requote based on utilization, creating real-time market rates Best Execution: Borrowers automatically get the lowest available rate across all pools Lender Choice: Lenders can analyze historical pool performance and choose which pools to supply based on yield/risk Scalability: Permissionless pool creation means anyone can deploy pools with custom IRMs Capital Efficiency: Each pool only needs $1000 minimum per order tick (configurable)

Use Cases

Borrowers: Get best rates without manually checking multiple protocols Lenders: Choose aggressive vs conservative pools based on historical fill rates Market Makers: Create specialized pools targeting specific utilization ranges Institutions: Deploy private pools with custom risk parameters

How it's made

Technology Stack Smart Contracts

Core lending pools with supply, borrow, repay, and collateral management Multiple interest rate models: linear curves and kinked models (Aave-style) that compete for borrower orders Orderbook matching engine using Red-Black Tree for efficient O(log n) sorting of pool quotes by interest rate Shares-based accounting for lenders (similar to aTokens) with compound interest accrual

Pyth Network

Real-time price feeds for collateral valuation with sub-second updates Pull-based oracle model ensures orderbook always has fresh prices for accurate LTV calculations 400ms updates vs traditional oracles' minutes enables safer lending at higher LTVs

Frontend (Next.js)

Real-time orderbook visualization showing aggregated rates across all pools Historical pool performance analytics for lenders to compare yields One-click borrowing at best available rates

From the public ETHGlobal showcase 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?

Not checked yet.

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.

Borrow.ai

Borrow.ai is a leverage aggregator that interfaces with multiple lending protocols to optimize the liquidity and positions of both lenders and borrowers. Lenders can choose the most optimal pool to stake based on their risk and APY preferences.