Skip to content

Portfolio · Ops automation

Node Validator Automation

A dependency-free Node.js job that reads validator balances from the Avalanche P-Chain every morning, works out burn rate and runway, and emails a red or green report before any validator runs dry.

All projects

Daily health checks for Avalanche L1 validators.

What it does

  • Pulls the current validator set live from the P-Chain over JSON-RPC
  • Works out daily burn rate and remaining runway from day-over-day balances
  • Four alert rules: low balance, runway under a week, inactive validator and a sharp one-day drop
  • HTML, plain-text and JSON reports with a red or green status header
  • Email delivery through Resend, with exit codes that hand off to a fallback when sending fails
  • Runs on a daily GitHub Actions schedule and commits each run's data as an audit trail

The problem

Validators on an Avalanche L1 pay a continuous fee from their P-Chain balance. If a validator is not topped up in time it goes inactive, so the balances need checking every day rather than whenever someone remembers.

How it is built

Plain Node.js using only built-in modules: raw HTTPS calls to the P-Chain RPC and the Resend API, JSON files instead of a database, and a GitHub Actions cron that runs it every morning Bangkok time. Having no third-party dependencies keeps the job small and easy to audit.