Skip to content

Instantly share code, notes, and snippets.

@patcito
Last active February 9, 2026 23:26
Show Gist options
  • Select an option

  • Save patcito/b3ce3d8c04d78001ed00c567cd521c6f to your computer and use it in GitHub Desktop.

Select an option

Save patcito/b3ce3d8c04d78001ed00c567cd521c6f to your computer and use it in GitHub Desktop.

Treasury stETH Balance in Dashboard TVL & Yield

Backward compatibility

These changes are fully backward compatible. No structs, fields, or JSON keys were added, removed, or renamed. The response shape is identical — only the values inside existing fields change:

  • collaterals[].collateralSupply — WETH entry is slightly larger (includes stETH)
  • collaterals[].collateralSupplyUsd — recalculated from merged supply
  • collaterals[].sharePct — recalculated
  • metrics.allTimeYieldClaimedUsd — includes stETH yield

All existing structs (DashboardResponse, ChainDashboard, CollateralData, ChainMetrics, MetricsSeries, etc.) are unchanged.

What changed

The /status/put/dashboard endpoint now includes the treasury wallet's stETH balance in the dashboard for the investor chain.

TVL

The stETH balance of 0x1118e1c057211306a40A4d7006C040dbfE1370Cb is queried on-chain and merged into the existing WETH collateral entry. stETH is 1:1 with ETH, 18 decimals, same oracle price — so it's summed directly into the WETH collateralSupply.

Yield

Yield is calculated as:

stETH balance - 2192.991693 ETH (original WETH deposit) = yield in ETH

This yield is converted to USD using the ETH oracle price and added to the allTimeYieldClaimedUsd metric.

Current numbers (as of 2026-02-10)

  • stETH balance: ~2,195.11 stETH
  • Original deposit: 2,192.99 ETH
  • Yield earned: 2.12 ETH ($4,495 at $2,124/ETH)

Dashboard restriction

The dashboard now only returns data for the configured investor chain (INVESTOR_CHAIN_ID):

  • Dev: chain 146 (Sonic)
  • Prod: chain 1 (Ethereum)

Previously it iterated all configured blockchains, which caused extra chains to leak into the response.

Frontend impact

No changes needed. Response shape is identical.

PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment