Kapish Bansal Résumé
← All work

04 / 06DeFi security · Smart contracts

Autonomous defence for DeFi capital: detect a threat, agree on it, evacuate funds.

Role
Full stack + contracts
Year
2026
Status
Live demo
8contracts on Somnia testnet
5invariant checks before execution
60 sTVL polling interval
~100 msSomnia block time

The problem

When a DeFi exploit starts, humans react in minutes. The capital is gone in blocks.

What it is

Invariant-Bounded Escalation Architecture: a multi-tier defence system on Somnia that watches protocol TVL, validates threats with M-of-N consensus, and, when the threshold is crossed, moves funds cross-chain to pre-approved safe harbours, guarded by on-chain invariant checks.

IBEA landing page: Autonomous Defense Infrastructure, with ~500ms threat detection, ~2.5s semantic reasoning and ~3.0s time to evacuation.
IBEA landing page: Autonomous Defense Infrastructure, with ~500ms threat detection, ~2.5s semantic reasoning and ~3.0s time to evacuation.

How it flows

  1. 01DefiLlama TVL
  2. 02Reflex engine
  3. 03M-of-N gate
  4. 04ODIGGuard (5 invariants)
  5. 05LI.FI evacuation

What I built

01

Reflex engine

Node/Hono service polls DefiLlama TVL every 60 s and publishes over Redis pub/sub.

02

Consensus gate

M-of-N threat validation and tier classification before anything escalates.

03

ODIGGuard

Five invariant checks, atomically, right before execution; only SafeHarborRegistry destinations allowed.

04

Evacuation

A custom relayer routes funds cross-chain through LI.FI, streamed live to an SRO dashboard.

Stack

  • Solidity
  • Foundry
  • Next.js 15
  • Hono
  • Redis
  • PostgreSQL
  • WebSockets
  • LI.FI
  • viem / wagmi

Limits

Runs on the Somnia Shannon testnet.

Next project

Do Not Resurrect Decide, while you're alive, whether AI may imitate you after you die.

← Hallmark All work