Run the Oracles
Both oracles must be running for the full DPX agent stack to work. The Stability Oracle (port 3000) handles pricing and settlement. The ESG Oracle (port 3001) provides live ESG scores.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- Both repos cloned and dependencies installed
# Stability Oraclecd ~/Documents/GitHub/Stability-Oracle/stability-oraclenpm install
# ESG Oraclecd ~/Documents/GitHub/ESG-Oracle/esg-oraclenpm installStart both with one command
Section titled “Start both with one command”From the repo root:
bash start-dpx.shThis starts both oracles concurrently and prints all agent endpoint URLs.
Start individually
Section titled “Start individually”# Terminal 1 — Stability Oraclecd stability-oraclenpm start # node server.js on port 3000
# Terminal 2 — ESG Oraclecd esg-oraclenpm start # node server.js on port 3001Verify both are live
Section titled “Verify both are live”curl localhost:3000/health# {"status":"healthy","oracle":"SUCCESS","network":"base"}
curl localhost:3001/health# {"status":"healthy","esgOracle":"SUCCESS"}Environment variables
Section titled “Environment variables”Create .env in the Stability Oracle directory for on-chain settlement:
ROUTER_ADDRESS=0x... # DPXSettlementRouter on BaseSETTLER_PRIVATE_KEY=0x... # Wallet with DPX balanceRPC_URL=https://mainnet.base.orgThe pricing and discovery endpoints work without .env. Settlement requires all three variables.
Quick agent test
Section titled “Quick agent test”Once both oracles are running, run the full 5-step loop:
# Step 1 — Discovercurl localhost:3000/manifest | jq '.onboarding.humanRequired'# false
# Step 2 — ESG scorecurl localhost:3001/esg-score | jq '.scores.average'# 77
# Step 3 — Quotecurl "localhost:3000/quote?amountUsd=1000000&hasFx=true&esgScore=77" | jq '.fees.total'
# Step 4 — Verify on-chaincurl "localhost:3000/verify-fees?amountUsd=1000000&hasFx=true&esgScore=77" | jq '.feesMatch'# true
# Step 5 — Reliabilitycurl localhost:3000/reliability | jq '.isHealthy'# trueAll five steps passing means the stack is ready for agent settlement.