Skip to content

Jubilee-Protocol/Jubilee-Lending

Repository files navigation

Jubilee Lending

Built on Base Solidity Tests Audit Donate Crypto

Self-repaying, interest-free loans backed by yield-bearing collateral. Borrow jUSDi against jBTCi and jETHs — your collateral's yield pays your debt automatically.

Website: https://jubileeprotocol.xyz
Whitepaper: Jubilee Protocol v3
Contract: 0x1b55eF520AEf9c2657C99343738641dCC92a840F
Status: 🟢 LIVE on Base Sepolia — Deployed Feb 25, 2026


Overview

Jubilee Lending is the non-custodial, over-collateralized lending engine of the Jubilee Protocol. Deposit yield-bearing index tokens (jBTCi, jETHs) as collateral, borrow jUSDi at 0% interest, and let your collateral's yield auto-repay your debt over time.

How It Works

1. Deposit jBTCi/jETHs as collateral
2. Borrow jUSDi (up to 50% LTV, boosted to 70% with $JUBL staking)
3. Your collateral generates yield → YieldRouter applies it to your debt
4. Loan shrinks automatically. No liquidation risk if you stay healthy.

Key Features

  • 🏦 Self-Repaying Loans — Collateral yield automatically reduces your debt via YieldRouter
  • 💰 0% Interest — No borrowing fees, ever
  • 📈 $JUBL LTV Boost — Stake $JUBL to increase borrowing power from 50% → 70% LTV
  • 🛡️ Dual Oracle — Chainlink primary + Pyth validation with per-asset heartbeats
  • Partial Liquidation — Only the unhealthy portion is liquidated, not the entire position
  • 🙏 First Fruits Tithe — 10% of all protocol revenue goes to charitable causes
  • 24hr Timelock — All admin operations require a 24-hour delay
  • 🚨 Emergency Module — Circuit breakers with role-based pause/unpause

Architecture

┌─────────────────────────────────────────────────────────┐
│                    Jubilee Lending                        │
├──────────┬──────────┬──────────┬──────────┬──────────────┤
│ Deposit  │  Borrow  │  Repay   │ Withdraw │  Liquidate   │
│ Collat.  │  jUSDi   │  Manual  │ Collat.  │  Unhealthy   │
└────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────┬───────┘
     │          │          │          │             │
┌────▼──────────▼──────────▼──────────▼─────────────▼──────┐
│              CollateralManager + JUBLBoost                │
│         (Health Factor + Dollar-Value LTV Boost)          │
└────┬─────────────────────────────────────────┬───────────┘
     │                                         │
┌────▼────┐  ┌────────────┐  ┌─────────────────▼──────────┐
│ Oracle  │  │ YieldRouter│  │      Revenue Pipeline       │
│ Aggreg. │  │ (Auto-Pay) │  │ FeeCollector → 10% Tithe   │
│ CL+Pyth │  │            │  │              → 90% Stakers  │
└─────────┘  └────────────┘  └─────────────────────────────┘

Security

  • Audit Score: 20/20 findings remediated ✅
  • Critical: 4/4 fixed — Reentrancy, access control, LTV exploit, liquidation logic
  • High: 5/5 fixed — SafeERC20, emissions sync, gas DoS prevention
  • Medium: 6/6 fixed — Timelock, oracle staleness, CF cap
  • Low: 5/5 fixed — Zero-address checks, event indexing
  • See docs/AUDIT_REPORT.md for the full report

Contract Addresses

Base Sepolia (Testnet)

Contract Address
JubileeLending 0x1b55eF520AEf9c2657C99343738641dCC92a840F
CollateralManager 0xe1B0D9F7225e68B769d1EFd3e63ee47753812ECA
OracleAggregator 0x06a524f5087E1491aD5d0E86732B74e8874358c4
LiquidationEngine 0x58B83cc548E3811c63C75331C3f919116c832F2E
YieldRouter 0xdaA1036227a5695E92c427c494E47Ba641434334
JUBLBoost 0x03beBEE45001eA239588dFF9a42aD1aB330Bb6cC
JUBLEmissions 0x77A2fB1BE81Eee71f228a1525c0E4ebBdeec225f
ChoiceYield 0x9CCabBdE55943E430bc1DF881cd32B2ab7Fe234f
FeeCollector 0x4AA60050377fC6519AaC76633599141BbeD16bfB
FirstFruitsFund 0xe297E5c4408e6f9bebdb2180F4d68E38c3915014
EmergencyModule 0x68da820EfDb3Af6bb68F4Fb0Ff9368921eD12957
JubileeTimelock 0xdaA2cA1a36D6eAE8Ef94307777A1cDa6152C421c

Repository Structure

JubileeLending/
├── contracts/
│   ├── JubileeLending.sol        # Core lending logic
│   ├── CollateralManager.sol     # Multi-asset collateral + LTV
│   ├── JUBLBoost.sol             # $JUBL staking for LTV boost
│   ├── LiquidationEngine.sol     # Partial liquidation execution
│   ├── HealthFactorCalculator.sol # HF math library
│   ├── OracleAggregator.sol      # Dual oracle (Chainlink + Pyth)
│   ├── YieldRouter.sol           # Auto-repayment from yield
│   ├── FeeCollector.sol          # Revenue split (10/90)
│   ├── FirstFruitsFund.sol       # Charitable tithe
│   ├── ChoiceYield.sol           # Multi-asset staker rewards
│   ├── JubileeTimelock.sol       # 24hr admin timelock
│   ├── EmergencyModule.sol       # Circuit breakers
│   ├── jUSDi.sol                 # Stablecoin (borrow asset)
│   └── test/
│       ├── MockERC20.sol
│       └── MockV3Aggregator.sol
├── test/
│   ├── JubileeLending.test.js    # 13 unit tests
│   ├── JubileeLending.exploits.test.js  # 2 exploit tests
│   └── Integration.test.js      # 8 integration tests
├── scripts/
│   └── deploy.js
├── docs/
│   ├── AUDIT_REPORT.md
│   └── USER_GUIDE.md
└── README.md

Quick Start

# Install
npm install

# Compile contracts
npx hardhat compile

# Run all tests (21/21)
npx hardhat test

# Deploy to Base Sepolia
npx hardhat run scripts/deploy.js --network baseSepolia

Test Suite

  Jubilee Protocol Integration Tests
    ✔ Deposit → Borrow → Repay → Withdraw cycle
    ✔ Yield-based auto-repayment via YieldRouter
    ✔ Higher borrow with JUBL staking
    ✔ Prevent unstaking if loan becomes unhealthy
    ✔ 10% tithe to FirstFruits, 90% to ChoiceYield
    ✔ Stakers claim Choice Yield rewards
    ✔ Disburse to whitelisted charities
    ✔ Reject non-whitelisted disbursement

  JubileeLending Exploit Tests
    ✔ JUBL Unstaking health check
    ✔ Fair Liquidation Seizure

  JubileeLending Unit Tests
    ✔ Collateral deposit / unsupported reject
    ✔ Borrow within / exceeding limits
    ✔ Manual repay / yield repay
    ✔ Withdrawal / health factor enforcement
    ✔ Liquidation / healthy loan rejection
    ✔ JUBL Boost health factor

  21 passing ✅

Built By

Jubilee Labs • Deployed on Base

License

This project is licensed under the MIT License.


"Seek first the Kingdom of God!" — Matthew 6:33

About

Coming Soon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors