Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

257 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lendwise logo

Unified view for lending markets. One standard.

Lendwise compares and monitors 700+ lending markets across Aave, Morpho, Compound, Blend and more. It standardizes rates to net APY (base ± fees ± rewards) and optimizes your capital allocation.

CI License: MIT TypeScript PRs Welcome

Live App · Documentation · X / Twitter · Farcaster · Discussions

Lendwise app — DeFi supply rates compared across protocols and chains

If Lendwise helps you find better yields, star the repo — it helps other DeFi users discover it.

Why Lendwise?

Comparing lending yields across protocols is harder than it looks: every protocol quotes rates differently (APR vs APY, per-second vs daily compounding), rewards live in separate systems (protocol emissions, Merkl campaigns), and fees quietly eat into headline numbers.

Lendwise reduces it to two promises:

📏 One standard

Here are standardized APYs — now you can actually compare them.

  • One net APY — every rate converted to APY and netted: supply base − fees + rewards, borrow base + fees − rewards. Headline numbers that mean the same thing on every protocol.
  • Fresh — every market re-sampled every 10 minutes.
  • Historical — hourly averages and daily aggregates for 180 days, kept whole by a nightly reconcile job that detects gaps, repairs them, and re-aggregates the days they belong to.
  • Complete — ~700 active markets, ~120 assets, supply and borrow sides, collateral parameters included.

🎯 One allocation

Here is how to allocate your capital — matched to your risk profile and investment horizon.

  • Optimizer — allocation suggestions across markets, driven by your risk level and how long the capital stays deployed.
  • Portfolio-aware — connect a wallet to see your positions across all protocols and chains, and where they could earn more.

Supported protocols & chains

Protocol Ethereum Optimism Polygon Base Arbitrum Avalanche Linea BSC Stellar
Aave V3
Morpho (Blue + MetaMorpho)
Compound V3
Blend (V1 + V2)

Want another protocol? Request it — or build the adapter yourself: it's ~5 files with a test harness to validate it.

How it works

flowchart LR
    A["Protocol adapters<br/>Aave · Morpho · Compound · Blend"] -->|"every 10 min"| B["APY collector"]
    B --> C[("Postgres<br/>apy_hourly · apy_daily")]
    C -->|"daily 00:30 UTC"| D["Reconcile<br/>detect → repair → aggregate → prune"]
    D --> C
    C --> E["GraphQL API<br/>/api/graphql"]
    E --> F["Next.js app<br/>lendwise.fi"]
Loading

Each protocol is an isolated adapter that transforms its source (GraphQL API, subgraph, RPC) into a shared data model. Aggregation uses Promise.allSettled everywhere — one protocol having a bad day never blocks the others. The full design is documented in src/lib/protocols/README.md.

Quick start

Prerequisites: Node.js 24, pnpm 11.

git clone https://github.com/lendwise-fi/lendwise
cd lendwise
pnpm install
cp .env.example .env.local   # minimal: THEGRAPH_API_KEY (free) — see CONTRIBUTING.md
pnpm dev                     # → http://localhost:3000
Useful commands
pnpm codegen          # regenerate GraphQL types (run before typecheck/test)
pnpm lint             # ESLint
pnpm typecheck        # tsc --noEmit (strict)
pnpm test             # vitest
pnpm adapter:test <id>  # live-test a protocol adapter (e.g. aave_v3)
pnpm build            # codegen + next build

Tech stack

Next.js 16 (App Router) · TypeScript strict · Tailwind 4 + Radix UI · viem/wagmi · PostgreSQL (Neon) + Drizzle ORM · GraphQL (graphql-yoga + URQL + codegen) · The Graph · QStash cron.

Documentation

Doc What's inside
Protocol adapters Architecture, adapter contract, how to add a protocol
Contributing guide Setup, quality bar, PR process

Contributing

Contributions are welcome — the most valuable one is a new protocol adapter, and the codebase is explicitly designed to make that a contained, testable unit of work (~5 files + a live test harness).

Community

License

MIT © Lendwise

About

One standard for DeFi lending rates. Compare standardized net APYs across Aave, Morpho & Compound — and optimize your allocation by risk and horizon.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages