A lightweight TypeScript tool for real-time tracking of Total Value Locked (TVL) across Re Protocol treasuries and custodial wallets.
It enables full on-chain transparency by fetching real balances and converting them to USD using Chainlink price feeds for Ethereum and Base.
✅ Fetches live balances from Re Protocol treasury wallets
✅ Calculates TVL in USD directly from blockchain data
✅ Supports both Ethereum and Base networks
✅ Integrates Chainlink price feeds (ETH, USDC, DAI, USDT)
✅ CLI-based usage for analytics and automation
✅ Displays per-token and per-treasury breakdown
| Command | Description |
|---|---|
npm run build |
Compile TypeScript to JavaScript |
node dist/cli.js tvl |
Show total TVL (USD) |
node dist/cli.js tvl --verbose |
Detailed per-token and per-treasury breakdown |
node dist/cli.js balance <token> <address> |
Manually check ERC‑20 balance |
node dist/cli.js claims |
Placeholder for future subgraph/indexer integration |
RPC = https://eth.llamarpc.com
CHAIN flag = ethereum
symbol balance usd treasury
------ ---------------- ------ ------------------------------------------
ETH 0.0140 54.22 0x295F67Fdb21255A3Db82964445628a706FBe689E
USDC 327599.9999 327600 0x295F67Fdb21255A3Db82964445628a706FBe689E
USDT 25276.0000 25276 0x295F67Fdb21255A3Db82964445628a706FBe689E
Total Value Locked: 353,661.14 USDCreate a .env file:
CHAIN=ethereum # or base
ETH_RPC_URL=https://eth.llamarpc.com
BASE_RPC_URL=https://base.llamarpc.com
LOG_LEVEL=info
⚠️ Never upload the real.envfile to GitHub.
Use.env.exampleinstead:
# Example
CHAIN=ethereum
ETH_RPC_URL=https://eth.llamarpc.com
BASE_RPC_URL=https://base.llamarpc.comsrc/
├─ cli.ts → CLI logic and routing
├─ index.ts → Core TVL logic, Chainlink pricing, balance readers
├─ providers.ts → RPC and network switch (Ethereum/Base)
└─ config.ts → Environment variable loader
.env.example
package.json
tsconfig.json
README.md
This module enhances transparency and trust within the Re Protocol ecosystem:
- Enables anyone to verify on-chain reserves in real time
- Helps auditors and DAO members monitor treasury health
- Can feed dashboards, bots, or public transparency reports
A practical step toward decentralized accountability — anyone can run it locally and verify Re’s TVL.
Author: nsvoud Twitter: @0xNSVOUD
Project: Re Protocol — re.xyz
Date: October 2025
License: MIT
- 💾 GitHub: github.com/nsvoud-dev/re-protocol-tools
- 📖 Docs: docs.re.xyz
- 💬 Community: discord.gg/reprotocol
“Transparency is the foundation of trust — and trust is the foundation of Re.”