RiskLens and send user transactions through PositionRouter and Zap.
Testnet USDG and faucet stocks use 18 decimals. Mainnet USDG is 6 decimals when that network is added. Do not assume 18.
How to read a position: resolve
bookId from RiskRegistry.bookIdOf(collateral) or from Books. Call RiskLens.snapshot(account) for health, max borrow, per-book collateral, debt, and liquidation price. uiMultiplier is display only.
Gas is sponsored in the Stockline app via an embedded smart account. Your app can use any EOA or 4337 account.
How the pieces fit
Every user action on
Stockline has an onBehalfOf overload. A router can act for an account only after that account calls setOperator(router, true), or signs setOperatorWithSig. The Stockline app does this once per account.
Every write on the core is gated by the oracle regime. supplyCollateral, repay, and deleverage are always live. borrow and withdrawCollateral need LIVE. Read Market hours before you build a button that can be disabled on a weekend.
ABIs
Each file is copied from Foundry output at build. Pin the file you integrate against.
Addresses: Addresses. Guides: TypeScript, Read borrowing power, Liquidators.