GX CoreLending & Borrowing

Lending and Borrowing

GX Core includes a native lending and borrowing protocol that enables users to lend assets to earn interest or borrow assets using their portfolio as collateral. The system uses algorithmic interest rates that adjust automatically based on supply and demand.


Overview

The lending system is integrated directly into the GX Core execution layer, providing the same performance and determinism as the trading engine. Unlike standalone DeFi lending protocols, GX lending is aware of the user’s trading positions, enabling more capital-efficient collateral calculations.


How It Works

Lending (Supplying)

  1. Deposit supported assets into the lending pool
  2. Earn interest continuously, accruing per block
  3. Interest rate is determined algorithmically based on pool utilization
  4. Withdraw your supplied assets plus accrued interest at any time

Borrowing

  1. Post collateral (USDC, GX, or other supported assets)
  2. Borrow up to the collateral factor limit
  3. Interest accrues per block on your outstanding borrow
  4. Repay the borrow plus accrued interest to unlock your collateral

Interest Rate Model

GX uses an algorithmic interest rate model where rates adjust based on the utilization ratio of each lending pool:

utilization = total_borrowed / total_supplied
Utilization RangeBorrow Rate Behavior
0% - 80% (normal)Gradual linear increase
80% - 100% (high)Steep exponential increase (kink model)

The “kink” at 80% utilization incentivizes borrowers to repay when pools are highly utilized, ensuring lenders can always withdraw.

Rate Parameters

ParameterDescription
Base rateMinimum borrow rate at 0% utilization
Slope 1Rate increase per unit utilization below the kink
KinkUtilization threshold where the rate curve steepens (default: 80%)
Slope 2Rate increase per unit utilization above the kink
Supply rateborrow_rate * utilization * (1 - reserve_factor)
Reserve factorPercentage of interest reserved for the protocol (default: 10%)

Collateral

Collateral Factors

Each asset has a collateral factor that determines how much can be borrowed against it:

AssetCollateral FactorDescription
USDC90%Stablecoin — highest collateral efficiency
GX60%Native token — moderate volatility
Other tokens40-70%Based on liquidity and volatility assessment

Example: If you supply 10,000 USDC (90% collateral factor), you can borrow up to 9,000 USDC worth of other assets.

Liquidation

If the value of your collateral falls below the required maintenance ratio, your position is subject to liquidation:

ParameterValue
Liquidation threshold5% above the collateral factor
Liquidation penalty5% of the liquidated amount
Liquidation incentiveLiquidators receive the penalty as a reward

Interest Accrual

Interest accrues per block (sub-second), not per day or per hour. This provides the most granular and fair interest calculation possible:

interest_per_block = principal * (annual_rate / blocks_per_year)
accrued_interest = sum of interest_per_block over all blocks

Interest is applied to both lender earnings and borrower obligations at every block.


Integration with Trading

GX lending is integrated with the trading clearinghouse:

  • Cross-margin awareness — Your lending deposits and trading collateral can be considered together for margin calculations
  • Instant collateral — Supplied assets can serve as both lending collateral and trading margin
  • Unified liquidation — The risk engine considers both lending and trading positions when evaluating account health

This integration is unique to GX and is only possible because both systems run natively in the same execution layer.


Supported Operations

OperationDescription
supply(asset, amount)Deposit assets into the lending pool
withdraw(asset, amount)Withdraw supplied assets plus interest
borrow(asset, amount)Borrow assets against your collateral
repay(asset, amount)Repay outstanding borrow
liquidate(account, asset)Liquidate an undercollateralized position (public)

All operations are signed with EIP-712 and processed through BFT consensus like any other GX Core transaction.


Risk Parameters

ParameterDescriptionGovernance-Adjustable
Collateral factorsPer-asset borrow limitsYes
Liquidation thresholdPoint at which liquidation triggersYes
Reserve factorProtocol share of interestYes
Kink utilizationThreshold for rate curve steepeningYes
Supply capsMaximum supply per assetYes
Borrow capsMaximum borrow per assetYes