Bond

Checking network...

Lending Protocol

Technical documentation for the Bond lending smart contracts.

Architecture

The Bond lending protocol is a custom implementation deployed on the 0G Network. It uses a modular contract architecture with separate contracts for core lending logic, asset management, interest rate calculations, and oracle price feeds.

Contract Addresses (0G Testnet — Staging)

wA0GI

0x51edc1ff2d2369f7ac5faccf68dfd3b5692ddca7

LendingManager

0x93083ba2c37887759d3ebd7850433312904a2f54

LendingInterface

0xa8c9a9916c63606d5af6402a3c92a22157aa1508

CoinFactory

0xe27cb2fd93994b561d7bdbc2896c46e3b8434336

LendingCoreAlgorithm

0x2cba54d2a442e12505d03b7471b080caab6de807

LendingVaults

0xf9ea1a118087cdac244dd2f3488039d235d95454

Oracle

0xaa3cc84c59ebe991a11a21fbe9d98bc98d3ee762

RewardContract

0xd4fadba86d6d0abfd8dd1eca8ba5eb15a8152a21

Deployment: staging · Network: 0G Newton Testnet · Chain ID: 16602 · Commit: 8a57e47

Core Contracts

LendingManager

Central contract managing lending pools, user positions, supply/borrow operations, and collateral state. Orchestrates interactions between other contracts.

LendingInterface

Read-only interface contract providing aggregated views of market data, user positions, and protocol metrics. Used by the frontend for efficient data fetching.

CoinFactory

Factory contract for creating and managing lending pool assets. Handles deposit and loan token minting/burning for each supported asset.

LendingCoreAlgorithm

Pure math contract implementing the interest rate model, health factor calculation, liquidation threshold checks, and utilisation-based rate curves.

LendingVaults

Vault management contract handling isolated lending pools, risk separation, and per-vault accounting.

Oracle

Price oracle integration using Chainlink-compatible AggregatorV3 feeds. Provides real-time asset valuations for collateral assessment and liquidation checks.

RewardContract

Manages protocol incentive distribution and reward accrual for lending participants.

Lending Modes

Mode 0: High Liquidity

Standard shared lending pool with market-driven interest rates. All assets in this mode share the same risk pool and collateral is cross-margined.

Mode 1: Risk Isolation

Isolated lending pools with capped exposure. Each asset has a maximum lending amount, limiting protocol exposure to volatile or newer assets.

Mode 2+: Homogeneous

Specialised lending pools with custom LTV ratios for specific asset pairs or strategies.

Key Parameters (Per Asset)

collateralFactor

Max borrow power as % of supply value

liquidationThreshold

Collateral ratio triggering liquidation

liquidationPenalty

Fee applied to collateral during liquidation

reserveFactor

Protocol's share of interest revenue (0-1)

bestLendingRatio

Optimal utilisation threshold (basis points)

bestDepositInterestRate

Supply rate at optimal utilisation (basis points)

supplyCap

Maximum amount that can be supplied

borrowCap

Maximum amount that can be borrowed

Source Code

Full contract source available at github.com/Bond-xyz/bond-lending-contracts