Kerb
NormalPre-market
Session opens in 4h 40m (13:30 UTC)

BRK.Bx · the asset currently carrying the most capacity. See it →

Developers

Kerb Terms are published on chain and over a public read API, so another lender, curator or venue operator can act on them without rebuilding equity market risk logic. Everything below is live. Nothing needs a key.

Read the Terms from the chain

The authoritative source. No API in the path, no trust in Kerb’s servers — just the contract.

import { createPublicClient, http, keccak256, encodeAbiParameters } from "viem";
import { KERB_TERMS_ABI } from "@kerb/sdk";

const client = createPublicClient({ transport: http("https://rpc.xlayer.tech") });
const assetId = keccak256(
  encodeAbiParameters([{ type: "uint256" }, { type: "address" }], [196n, tokenAddress]),
);

// usable === false means "no new risk may be taken". It never means "liquidate everything".
const [carryLTV, sessionMaxLTV, creditMark, regime, usable] = await client.readContract({
  address: KERB_TERMS,
  abi: KERB_TERMS_ABI,
  functionName: "effectiveTerms",
  args: [assetId],
});

usable is the field that matters: false means no new risk may be taken against this asset right now, because the report is stale or the regime is STALE or HALTED. It never means liquidate. Repayment and cures keep working in every state.

Or with the SDK

import { Kerb, toDecimalString } from "@kerb/sdk";

const kerb = new Kerb();                        // defaults to X Layer mainnet
const terms = await kerb.terms("KOx");

if (!terms.usable) return;                      // no new risk may be taken

// Decimal strings all the way. Never parse a term into a float: that is how a risk
// number quietly becomes wrong.
toDecimalString(terms.carryLTV);                // "0.55"
toDecimalString(terms.creditMark);              // "86.916770468522919603"
toDecimalString(terms.debtCeiling);             // in loan-asset units, not WAD

Every value is a decimal string with the provenance label it was published under. Ratios are WAD; depth and ceilings are in loan-asset units, and the response says which.

REST

Base URL https://api.usekerb.xyz. CORS is open for reads. No key, no rate limit beyond what is reasonable, no secrets in any error payload.

Scroll the table sideways for what each endpoint returns.

MethodPathReturns
GET/healthObservation freshness and post counts per chain.
GET/v1/boardEvery tracked asset with its regime, mark, depth and capacities, each with provenance.
GET/v1/terms/:chain/:assetThe latest posted Terms, the pinned bundle behind them, and the last 50 posts.
GET/v1/clock/:chain/:assetSession now, next transition, next weakening, the Last Call window, and the week's session geometry.
GET/v1/report/:chain/:assetThe full Market-Time Report recomputed from current observations, including the impact curve venue by venue.
GET/v1/credit/:chainThe credit market: pool state, listed collateral, the fixed liquidation thresholds.
GET/v1/credit/:chain/position/:user/:assetIdA position's health, covenant target and exact cure amount. Public, because cure is permissionless.
GET/v1/paramsThe KTS parameter set the engine is running on.
GET/v1/proofBuild period, deployments, observation counts, the latest pinned bundle and the degradation rungs.
GET/v1/market-timePublished Market-Time Reports.
GET/v1/bundle/:hashThe canonical input bundle behind a report, by its inputs hash.

Try one now: https://api.usekerb.xyz/v1/board — currently 10 assets

Contracts and ABIs

ABIs are the Foundry artefacts in contracts/out/ of the repository, and the source is verified on Sourcify for everything on mainnet.

ContractChainAddressSource
KerbClockmainnet 1960xf765d374…2161b8sourcify exact match
KerbTermsmainnet 1960x6d6eaf24…0102d5sourcify exact match
KerbClocktestnet 19520x6c1de992…18bc5csourcify exact match
KerbTermstestnet 19520x5a4942f5…b75f7esourcify exact match
MockUSDGtestnet 19520x91fcf992…dba679in the repository
KerbClockDemotestnet 19520xd2483b2d…6bcb0fin the repository
KerbMirror:KOxtestnet 19520x11827f0f…af4a16in the repository
KerbMirror:HKEXCxtestnet 19520x80da4036…9360f2in the repository
KerbCredittestnet 19520xa1314645…0b98a8in the repository

The credit market

KerbCredit at 0xa1314645cd6c07e651359aba540e2600090b98a8 on X Layer testnet, loan asset mUSDG. Collateral is mirror collateral with no claim on any security, and the clock is a compressed demo clock. Both are flagged in the API response itself — loanAsset.isMock and contracts.clockIsDemo — so an integrator cannot mistake this for a production market even if they never read this page.

Reproduce anything

Every report pins its input bundle and posts the hash on chain. pnpm --filter @kerb/engine kerb verify <inputsHash> fetches those bytes, checks they hash to the CID they were pinned under, recomputes every number and compares the result with what is on chain. The methodology page walks the whole calculation →