Skip to content
chain.sentinel

chain.sentinel

Autonomous On-Chain Defense

Created on 15th March 2026

•

chain.sentinel

chain.sentinel

Autonomous On-Chain Defense

The problem chain.sentinel solves

Decentralized Finance operates at block speed. When lending collateral devalues or a whale unloads a multi-million-dollar position, human reaction time is fundamentally too slow. By the time a treasury risk manager or DeFi user receives an email or Discord bot alert, their collateral has already crossed the liquidation cliff—resulting in massive liquidation penalties, bad protocol debt, and permanent capital loss.

Chain Sentinel solves this by replacing passive, post-mortem alerting with an autonomous, preventive multi-agent defense layer for DeFi treasuries, DAOs, and lending market participants:

1. Intercepting Threats Before Block Inclusion (WhaleWatch)

Traditional analytics dashboards only inform users after a transaction has already been mined. Chain Sentinel’s WhaleWatch Mempool Radar streams pending transactions directly from the mempool via Alchemy WebSockets. It intercepts transfers and swaps exceeding $500,000 USD before block confirmation, automatically classifying the intent (Accumulation, Distribution, CEX Dump, or Flash Loan).

2. Autonomous Liquidation Prevention (LiquidShield)

For lending protocols (currently integrated with Aave V3), Chain Sentinel continuously monitors health factors, collateralization ratios, and exact distance-to-liquidation. Instead of just showing a red warning badge, it computes the exact partial debt repayment required to restore the position to a healthy buffer (HF ≥ 1.25), preventing cascading liquidations.

3. Sub-Second Compound Threat Correlation

A whale dump alone might just be volatility; an at-risk lending position alone might just be high leverage. But when a whale dumps the exact collateral token backing an at-risk lending position within a 15-minute sliding window, it triggers a lethal squeeze. Chain Sentinel's Cross-Agent Threat Correlator cross-references these two independent data streams in real time and escalates alerts into high-priority compound risks.

4. Zero-Hallucination Multi-Agent Governance (ADK-TS)

Using ADK-TS (@iqai/adk), Chain Sentinel orchestrates specialized agents (Watcher, Risk, Planner, Governance):

  • Strategic Reasoning: An LLM agent evaluates macro exposure and synthesizes an actionable mitigation plan.
  • Deterministic Veto Failsafe: Financial executions are never left entirely to generative models. Hard deterministic circuit breakers mathematically enforce emergency mitigations if health factors drop below safety thresholds, guaranteeing zero hallucinations and immunity against prompt injection.

5. Verifiable Tokenized Security Quotas (ATP)

Registered on the Agent Tokenization Platform (ATP) under the cSNT symbol, treasuries and DAOs can tokenize and verify their autonomous surveillance quotas on-chain, creating transparent accountability and verifiable agent execution.

Challenges we ran into

Building a high-throughput, autonomous multi-agent defense platform spanning mempool ingestion, Aave V3 lending logic, and a high-performance frontend brought several significant engineering hurdles:

1. Zero-Hallucination Guarantee in Agent Governance

  • The Challenge: Traditional LLM agents can hallucinate or fail unexpectedly due to API rate limits, provider downtime, or malformed JSON responses. In DeFi security, an agent failing open or proposing an irrational debt adjustment can cause irreversible financial loss.
  • How We Solved It: We implemented a Dual-Arbitration Architecture. While the Planner Agent uses Google Gemini / Qwen via ADK-TS for strategic natural language reasoning, all proposed actions must pass through a strict Deterministic Governance Circuit Breaker. If a position's health factor drops below critical levels (HF < 1.05) or exposure exceeds threshold limits, deterministic mathematical safety rules veto the LLM and enforce hard-coded defensive rebalancing. Furthermore, if the LLM API is unavailable, the pipeline falls back seamlessly to deterministic rules without interrupting real-time monitoring.

2. Mempool Stream Bottlenecks & Real-Time Threat Correlation

  • The Challenge: Subscribing to high-frequency pending transactions in the Ethereum mempool quickly flooded memory and threatened to choke the Node.js event loop. Additionally, cross-referencing whale transactions with active lending positions in real time required low latency.
  • How We Solved It: We built an in-memory sliding-window ring buffer (alertCorrelator.ts) with $O(1)$ token and borrower address hash index lookups. Low-value transactions are discarded immediately at the WebSocket boundary (filtering strictly for transfers/swaps ≥ $500,000 USD), allowing sub-second correlation with Aave V3 positions without degrading API response times.

3. Next.js 16 React Compiler & Strict Purity Rules

  • The Challenge: Upgrading to Next.js 16 (Turbopack) with the React Compiler introduced strict runtime and lint rules (react-hooks/purity and react-hooks/set-state-in-effect). Calling dynamic methods like Date.now() during card renders or triggering data fetches without unmount lifecycle handlers resulted in hard build failures during GitHub Actions CI and Vercel builds.
  • How We Solved It: We audited and refactored our component tree: replaced render-time timestamp generations with deterministic payload fallbacks, wrapped surveillance fetchers in useCallback, and implemented clean subscription lifecycle teardowns (isSubscribed cancellation guards) to ensure zero memory leaks and pristine CI pass rates.

4. Monorepo Alignment across Dual Hosting Environments (Render & Vercel)

  • The Challenge: Coordinating a multi-package pnpm monorepo containing Fastify (API), ADK-TS (agents-core), and Next.js 16 (web) caused cross-environment lockfile and engine mismatch warnings during dual deployment to Render (Linux container) and Vercel (Edge serverless).
  • How We Solved It: We pinned Node engine targets to "node": "20.x" across root and workspace package.json files, regenerated an immutable pnpm-lock.yaml, configured dedicated filter commands (pnpm --filter api start on port 10000 for Render, and root directory apps/web on Vercel), and established continuous GitHub Actions CI (ci.yaml and lint.yaml) to validate builds across all packages on every push.

Tracks Applied (2)

Electrothon 8.0 Honors Track

Chain Sentinel is submitted for the ELECTROTHON 8.0 Honours Track for demonstrating exceptional end-to-end engineering r...Read More

IQ AI

Chain Sentinel is deeply integrated with the IQ AI ecosystem, natively implementing both the ADK-TS (@iqai/adk) framewor...Read More

IQ AI

Discussion

Builders also viewed

See more projects on Devfolio