Elysium · depth-aware risk

DepthGuard

#18,442,910Elysium

Integration

Read a risk score

Chain id 99901. The client is read-only. No signature is required to fetch a score.

Install

npm install @depthguard/sdk

Fetch

import { DepthGuard } from "@depthguard/sdk";

const dg = new DepthGuard({ chainId: 99901 });
const risk = await dg.getRisk("HYPE");

risk.maxLtvBps;          // 6870
risk.supplyCap;          // base units
risk.borrowCap;
risk.maxLiquidation;
risk.depthUsd;           // D1 + D2 + D5, quote

Subscribe

const stop = dg.subscribe("HYPE", (risk) => {
  // depth or the oracle price moved the score
  console.log(risk.maxLtvBps, risk.maxLiquidation);
});

stop();

A lending contract should read maxLiquidation inside the liquidation call and refuse a larger seize.