LENGO

Docs

How Lengo v0.1 works, what it computes, and what it does not do yet.

Release 0.1 · Robinhood Chain Testnet

Getting started

  1. Connect an EVM wallet and switch to Robinhood Chain Testnet (chain ID 46630).
  2. Get testnet ETH for gas, then mint tBTC and tUSDC on the Faucet.
  3. On Markets, deposit tBTC, borrow tUSDC inside 60% LTV, then repay and withdraw.
  4. Every action is a real testnet transaction with an explorer link. Activity is rebuilt from contract events.

Formulas

C = collateral value in USD (oracle price × quantity)
D = debt including accrued interest, valued with the debt price at read time

LTV                     = D / C
Health factor           = (C × liquidationThreshold) / D
Extra borrow capacity   = max(0, C × maxBorrowLTV − D)
Est. liquidation price  = D / (collateralQuantity × liquidationThreshold)

With D = 0 the UI shows No debt, never NaN. A position without collateral cannot borrow. The liquidation price is an estimate: it moves as interest accrues or the debt price changes.

Fixture: C = $10,000, D = $4,000 → LTV 40%, HF 1.875, extra capacity $2,000.

Parameters

Testnet demo values set at deployment, not mainnet recommendations. Changing them means deploying a new market.

Max borrow LTV60%
Liquidation threshold75%
Liquidation eligibilityHF < 1
Liquidator bonus5% of repaid debt value
Close factor≤ 50% of debt per call
Borrow APR8% fixed, simple accrual into a global index
Protocol reserve0%
Oracle freshness300 s. Borrow and withdraw-with-debt need a fresh price; repay and debt-free exit do not

Contracts

Solidity 0.8.24, Foundry, OpenZeppelin 5.1 (pinned). Debt uses shares over a borrow index; lenders hold shares over idle liquidity plus outstanding debt, with a virtual-share offset against inflation attacks. Not audited. “Verified” is only claimed for contracts the explorer actually verified.

Route preview

The Routes page asks NEAR Intents 1Click for a quote with dry: true, through a server proxy. It reads mainnet market data. No funds move, no deposit address is issued, and nothing connects a quote to your testnet debt.

  • Borrow payout preview: converting an RH debt asset (e.g. USDG on hood) to USDC on another chain. It does not prove USDC exists as a debt asset on RH.
  • Asset routing preview: a BTC/ZEC swap quote. A swap is not collateral; selling BTC is never called BTC collateral.
  • Debt denomination and payout denomination stay separate. If debt is USDG and payout is USDC, the UI shows both and the conversion cost.

Limits in v0.1

  • tBTC has no Bitcoin backing. tUSDC has no value and is not Circle USDC.
  • Native BTC/ZEC collateral is under development. No real deposits are accepted.
  • No private positions. Confidential swap settlement does not hide collateral, debt or HF on a public RH contract.
  • Liquidation demo uses an authorized oracle override labeled Demo price override, emitted onchain.
  • Browser notifications only work while the app is open.

Roadmap

M1Lending lifecycle on RH testnet
M2Risk demo: oracle scenarios, two-wallet liquidation
M3Multichain preview: discovery, dry quotes, error states
M4Release package: public testnet, docs, QA, proof index
M5BTC spike: custody, proof, redemption, liquidation feasibility