Skip to content

About

Zero-dependency multi-chain EVM portfolio watcher — CLI + local web dashboard

Resources

Contributing

Stars

51 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chainfolio

A zero-dependency, multi-chain EVM portfolio watcher — CLI + a small local web dashboard.

Track your wallets across Ethereum, BNB Smart Chain, Base, Arbitrum, Optimism, and Polygon. Native balances + well-known ERC-20s, priced live via CoinGecko. No dependencies, no keys, no transactions — it only reads public balances.

dashboard placeholder

Screenshot placeholder — run chainfolio serve and open http://localhost:3000 to see your own dashboard.

Quick start

git clone https://github.com/noone52/chainfolio.git
cd chainfolio

# 1. Create your config from the example (public addresses only!)
cp config/wallets.example.json config/wallets.json
# 2. Edit config/wallets.json with your wallet addresses
# 3. Run it
npm start            # snapshot in the terminal
# or
node src/cli.js snapshot --format json

Requires Node.js ≥ 20. No npm install needed — there are no dependencies.

⚠️ Never put private keys, seed phrases, or API secrets in config/wallets.json. chainfolio only needs your public wallet addresses to read balances. It never signs anything.

Commands

Command What it does
chainfolio snapshot Fetch balances + prices, print a table
chainfolio snapshot --format json Same, as JSON
chainfolio snapshot --chain base Only one chain
chainfolio export --format csv --output out.csv Write a snapshot to a file
chainfolio watch --interval 120 Poll every 120s, alert on big moves / price thresholds
chainfolio serve --port 3000 Local dashboard at http://localhost:3000

Config

config/wallets.json:

{
  "wallets": [
    {
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "label": "vitalik.eth",
      "chains": ["ethereum", "base", "arbitrum"],
      "costBasisUsd": 5000
    }
  ],
  "settings": { "includeTokens": true, "minUsdToShow": 0.01 },
  "alerts": {
    "changePct": 5,
    "priceThresholds": { "ETH": { "above": 5000, "below": 1000 } }
  }
}
  • chains is optional — omit it to watch all six chains.
  • costBasisUsd is optional — set it to see PnL.
  • minUsdToShow hides dust below that value.

Supported chains & tokens

Chain Native Tokens tracked
Ethereum ETH USDT, USDC, WETH, DAI, WBTC, LINK
BNB Smart Chain BNB USDT, USDC, WBNB, CAKE, ETH
Base ETH USDC, WETH, cbETH, DAI
Arbitrum One ETH USDT, USDC, WETH, ARB
Optimism ETH USDT, USDC, WETH, OP, DAI
Polygon POL USDT, USDC.e, WETH, WMATIC, DAI

Token addresses are the canonical deployments — verify on the chain explorer before relying on them for large sums. Add your own in src/tokens.js.

How it works

  1. eth_getBalance for native assets, eth_call(balanceOf) for ERC-20s, via public RPCs.
  2. Prices in one batched CoinGecko request, cached for 60 seconds.
  3. Amount × price, grouped by chain and token, PnL vs. your cost basis.
  4. Rendered as a terminal table, JSON, CSV, or the web dashboard.

A chain that fails is skipped and listed under ERRORS — one bad RPC never kills the whole snapshot. Missing prices show as n/a, never as a fake number. See docs/ARCHITECTURE.md.

Roadmap

  • Custom token lists per wallet (add any ERC-20 by address)
  • Historical snapshots + charts (SQLite, still zero-dep via node:sqlite on Node 22+)
  • Telegram / webhook alerts in watch mode
  • More chains (Solana via RPC, zkSync, Linea)
  • Price source fallback (CoinGecko → DeFiLlama)

FAQ

Does it need my private key? No — never. Public addresses only, read-only RPC calls.

Does it send transactions? No. It never signs or broadcasts anything.

What if CoinGecko is down? Balances still show; prices show as n/a and the last cached price is reused where available.

Why is a token missing? Either its balance is zero, or it isn't in src/tokens.js yet — add it there (address + decimals + CoinGecko id).

Contributing

See CONTRIBUTING.md. PRs welcome — especially new chains, tokens, and tests.

License

MIT — see LICENSE.


快速开始(中文)

git clone https://github.com/noone52/chainfolio.git
cd chainfolio
cp config/wallets.example.json config/wallets.json
# 把 config/wallets.json 里的地址换成你自己的公开钱包地址
npm start

支持以太坊、BNB Chain、Base、Arbitrum、Optimism、Polygon 六条链,看原生币 + 主流 ERC-20 余额和美元总价,还能跑本地看板(node src/cli.js serve,打开 http://localhost:3000)。

⚠️ 不要把私钥、助记词放进配置文件,这里只需要公开地址。

About

Zero-dependency multi-chain EVM portfolio watcher — CLI + local web dashboard

Resources

Contributing

Stars

51 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages