Intelligence and risk engine for ENSight — decoding wallet intent, enriching on-chain data, and powering real-time safety insights.
ENSight Backend transforms raw blockchain actions into meaningful, human-readable context.
It is responsible for:
- Decoding transaction calldata & method signatures
- Enriching interactions with contract metadata
- Applying risk heuristics & anomaly detection
- Attaching trust & reputation signals
- Generating explanation payloads for the extension & web app
- ENSight Extension intercepts wallet intent
- Structured payload is sent to backend
- Transaction is decoded & classified
- Risk and trust signals are applied
- Context is enriched with on-chain data
- Explanation response is returned in real time
- Transaction calldata & logs
- Contract metadata & histories
- ENS identity resolution
- Wallet interaction graphs
- Behavioral risk heuristics
- Abnormal pattern detection
- Reputation signals
- Context interpretation
Together this powers ENSight’s real-time safety layer.
- Node.js / TypeScript (or your actual backend stack)
- Blockchain RPC providers
- Transaction decoding utilities
- REST / WebSocket APIs
ENSight Extension
↓
ENSight Backend (intent + risk engine)
↓
ENSight Web (dApp & context views)
↓
Ethereum + ENS
- Node.js 18+
- npm or pnpm
git clone https://github.com/eth-ensight/ensight-backend.git
cd ensight-backend/backend
npm install
npm run devThe server runs on http://localhost:3000. For ENS-only use you do not need any env vars. For risk lookup and ScamSniffer cron you need Upstash Redis and CRON_SECRET; see backend/README.md and copy backend/.env.example to backend/.env.
From backend/ run npm test. Unit tests use mocked RPC and Redis, so no secrets are required.
The repo is structured for Vercel serverless: the Express app lives in backend/app.js and is exported from api/index.js. Deploy with Vercel; set UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN, and CRON_SECRET in the project environment. A daily cron for /api/cron/scamsniffer-sync is configured in vercel.json; configure the cron to send Authorization: Bearer <CRON_SECRET>.
- ENS:
GET /api/ens/resolve/:name,/api/ens/reverse/:address,/api/ens/text/:name/:key,/api/ens/avatar/:name,/api/ens/info/:name,/api/ens/contenthash/:name,/api/ens/records/:name,POST /api/ens/batch - Risk:
GET /api/risk/address/:address— returns{ flagged, lastUpdated }from ScamSniffer data in Redis - Cron:
GET /api/cron/scamsniffer-sync(BearerCRON_SECRET) — syncs ScamSniffer blacklist to Redis - Graph:
POST /api/graph/interaction,GET /api/graph/address/:address,GET /api/graph/address/:address/neighbors
Full endpoint docs, env vars, and curl examples: backend/README.md.
See backend/README.md and backend/.env.example. Summary:
PORT(default 3000),RPC_URL(optional)UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN(for risk + cron)CRON_SECRET(for/api/cron/scamsniffer-sync)SCAMSNIFFER_JSON_URL(optional override)
🤝 Contributing Contributions welcome across:
- Transaction decoding improvements
- Risk detection heuristics
- Performance optimizations
- API design
- On-chain data enrichment
Part of the ENSight ecosystem • Built for open Web3 infrastructure
