caelum0x 6d260ee4ff feat: expose vault pool stats + liquidation bonus through @qie-forge/core SDK and CLI
VaultClient only ever mirrored vault.py/vault.rs's 2026-10-27 feature set
(positions/healthFactor/currentDebt/ltvBps/liquidationThresholdBps) — it
never picked up totalAssets/totalReserves/protocolReserves/borrowCap/
reserveFactorBps/totalLenderShares/lenderShares or the severity-scaled
liquidationBonusBpsFor the vault contract grew across later 2026-10-28/29
passes. apps/web's own /api/vault-position route already reads every one
of these fields to power the live LendCard/VaultCard UI, and
scripts/liquidation-bot-demo.mjs reimplements a raw eth_call for the
bonus instead of using the published SDK at all — a real third-party
integrator building a lending dashboard or liquidation bot off
@qie-forge/core had no way to read any of this.

- vault.ts: new getLiquidationBonusBps/getLenderShares/getPoolStats on
  VaultClient, extending VAULT_ABI with the vault's real view functions.
- CLI: vault-position now prints liquidationBonusBps and a `pool` block
  with the same stats, matching apps/web's route shape field-for-field.
- Core: 23/23 tests pass (was 20/20). CLI: 28/28 tests pass.
- Verified live against the real deployed demo vault behind
  qie-forge.vercel.app (0xd49a...17be on the self-hosted anvil devnet,
  addresses pulled via `vercel env pull` then deleted): the CLI's
  totalAssets/totalDebtPrincipal/liquidationBonusBps exactly match a
  direct curl against the production app's own /api/vault-position for
  the same user, and the new fields (totalReserves, protocolReserves,
  borrowCap=100000000000, reserveFactorBps=1000) are real on-chain reads
  never exposed through the SDK/CLI before this.
2026-10-29 12:13:42 +03:00
..