ChainCFO
AI-powered DeFi treasury manager optimized by LLMs and powered by Chainlink CRE.
What it is
ChainCFO is an autonomous treasury management system for DeFi protocols, DAOs, and institutional funds. It acts as an "AI CFO," designed to maximize yield while strictly adhering to on-chain risk and governance policies.
ChainCFO leverages an off-chain Chainlink Customizable Routing Engine (CRE) workflow that runs on a schedule (Cron) and dynamically in response to on-chain governance events. During a cycle, the CRE fetches real-time yield data from money markets (e.g., Aave, Compound, Morpho), verifies stablecoin parity via Chainlink Data Feeds, and checks Proof of Reserve parameters. It then prompts an LLM with this context to determine an optimal capital allocation strategy. Crucially, before execution, the CRE deterministically validates the AI’s allocation matrix against the DAO’s on-chain GovernancePolicy bounds. Upon passing the checks, the workflow initiates a cross-chain rebalance via Chainlink CCIP.
Human multisig governance is simply too slow to react to fast-changing market condition, potentially missing millions in yield drops or failing to extract capital during crisis events (like a sudden stablecoin depeg or missing reserves). Conversely, purely AI-driven agents often hallucinate and lack the verifiable guardrails required by institutional capital. ChainCFO marries the dynamic adaptability of AI with the deterministic safety of Chainlink and smart contracts, letting DAOs automate scaling without compromising extreme risk tolerance.
How it Works
- On-chain Contracts (.sol): We built TreasuryVault and GovernancePolicy contracts utilizing Hardhat and Solidity deployed to Sepolia, alongside ChainCFOCCIPReceiver to accept and execute cross-chain capital messages.
- CRE Workflow (TS): We utilized the newly released Chainlink CRE framework, building robust TypeScript definitions to fetch APIs, run ML inference pipelines via LLMs, listen to an EVM oracle via getPolicy(), and encode ABI execution paths to push rebalances forward.
- Frontend/Backend: We constructed an immersive Next.js frontend utilizing Recharts and Wagmi, communicating with a custom Node/Express API that implements an event indexer persisting on-chain execution states to a PostgreSQL database for full LP auditability.
Links
Created by
- Tomiwa Adeyemi
- Okikiola Akintunde