All projects

SenateAI

Multi-agent AI debate system that evaluates DeFi governance proposals using Chainlink CRE and Tenderly.

CRE & AI Risk & Compliance Tenderly

What it is

DeFi protocols face 5–10 governance proposals weekly, each capable of moving billions. Attacks like Beanstalk ($182M), Tornado Cash (full takeover), and Compound Prop 289 ($24M) show the cost of unchecked proposals. No automated risk layer exists between submission and execution.
SENATE AI fixes this with a Chainlink CRE workflow that triggers a 7-step pipeline: simulate the proposal on a Tenderly Virtual TestNet, scan it against historical attack patterns via Gemini AI, run a structured debate between four AI agents with distinct risk perspectives, then have a fifth agent deliver a final verdict with a 0–100 risk score. The result is published on-chain as a DON-signed report to SenateReport.sol, and the SenateRiskOracle is updated for other protocols to query.
Three CRE triggers activate the pipeline: HTTP (manual submission), EVM log (on-chain ProposalCreated events), and cron (stale risk score monitoring every 6 hours).

How it Works

CRE workflow in TypeScript using @chainlink/cre-sdk with three triggers (HTTP, EVM Log, Cron) and five capabilities: HTTPClient, EVMClient.callContract, EVMClient.writeReport, runtime.report, and runtime.getSecret. Consensus via consensusIdenticalAggregation.
Tenderly Virtual TestNet forks Sepolia. The workflow sends eth_sendTransaction to simulate proposals, extracts gasUsed/logCount from receipts, and derives risk metrics (TVL change, liquidation risk, price impact) via heuristic formulas passed to AI agents.
Solidity 0.8.24 contracts on Sepolia (verified): SenateGovernor (Aave, Compound, Uniswap), SenateReport (DON-signed reports), SenateRiskOracle (per-protocol risk scores). Frontend: Next.js 16, React 19, SSE for live pipeline visualization, Gemini streaming for real-time debate display. MongoDB for persistence.

AI: Google Gemini 2.5 Flash.

Tenderly Explorer Link - https://dashboard.tenderly.co/explorer/vnet/e9d3fd02-270b-4e10-847f-db1f59922429/transactions

Links

Created by

  • Vagish Dilawari