project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

chatDeFi.app

Democratizing DeFi trading. Create trading strategies via a chatbot -- no programming required!

chatDeFi.app

Created At

ETHGlobal Taipei

Winner of

Saga

Saga - Best dApp built on Saga Chainlet 3rd place

Celo

Celo - Celo L2 Pool Prize

Prize Pool

Project Description

Project Overview

The chatDeFi.app AI agent democratizes DeFi by enabling anyone to create and execute DeFi investment strategies by simply typing in their desired DeFi investment strategy into a user-friendly chatbot interface. Our AI agent then executes these strategies automatically.

For example, you could instruct our AI agent to:

“Please allocate my wallet funds to the highest yielding DeFi lending pools that earn at least 5% APY. Also, to manage my risk, split my wallet funds across 2 lending pools with 70% of my funds in one pool and 30% in another. If my portfolio loses 10% of its funds, then stop managing my portfolio.”

Our AI agent will parse your natural language request into the corresponding DeFi strategy and actively manage and rebalance your portfolio according to the parameters you define.

Key Components

  • Front-end:
    • chatDeFi.app houses the chatbot interface to enter in your desired DeFi strategy in plain english.
  • Back-end:
    • Our AI agent will process/interpret your strategy, manage your wallet funds by depositing/withdrawing your wallet funds to/from the approriate DeFi protocol according to your investment strategy parameters, and auto-stop if certain risk parameters are reached.

Key Features

  • Blockchains supported:
    • Celo, Polygon, Saga, Rootstock
  • DeFi protocols supported:
    • DeFi lending (i.e. Aave, Compound, etc. (varies by blockchain))
  • Strategies supported:
    • i) Portfolio allocation strategy (i.e. 80%/20% or 70/30% splits across x number of DeFi lending pools),
    • ii) Risk management strategy (i.e. auto-stop AI agent if portfolio value falls 10%)
    • iii) Min. Return requirements (i.e. only invest in pools with min. return of x%)

Future Roadmap

  • Support additional DeFi protocols (DEX trading, perpetual trading, yield optimizers)
  • "Invest" feature - co-invest alongside an existing DeFi strategy (aka vault) on the platform (instead of creating your own DeFi investment)

How it's Made

Our project is a decentralized platform that allows users to create and publish personalized vaults based on their own investment strategies. Other users can then deposit into these vaults, and the management of funds is delegated to an AI agent. This agent operates within predefined rules set by the vault creator and autonomously executes DeFi actions on their behalf.

One of the standout features of this platform is the ability for users to customize strategies by setting specific constraints and rules. The AI agent adheres strictly to these parameters, ensuring personalized yet autonomous vault management.

Architecture & Technology Stack Smart Contracts: Each vault is represented by a dedicated smart contract deployed when a user creates a new strategy. These contracts can be updated or rebalanced based on changing strategies. The agent periodically evaluates the vault’s strategy and triggers rebalancing actions as needed.

AI Agent: We utilized the Elize framework to build our DeFi-native AI agent. It has been fine-tuned for our use case to interact with major DEXs and lending protocols. The agent can:

Dynamically generate calldata for protocol interactions.

Execute contract functions using a generic execute() function.

Handle complex transaction flows such as approving tokens before depositing.

The agent continuously seeks to maximize yield. For instance, if it detects higher APY opportunities on Aave for a different asset, it automatically swaps the current asset and reinvests into the higher-yield pool—always staying within the creator-defined strategy.

Frontend: We used Next.js with TypeScript and React to develop the user interface, providing an intuitive experience for creating, customizing, and monitoring vaults.

Blockchain Integration: The platform is deployed across multiple chains to ensure accessibility for a broad user base.

Storage: We use IPFS to store and retrieve strategy metadata in a decentralized manner.

Smart Contract Development: We leveraged the Foundry framework for writing, testing, and deploying our contracts efficiently.

Notable Hacks & Challenges We initially explored using Crossmint’s agent wallet for full wallet delegation to the AI agent, but integrating it within the limited timeframe of a 2-day hackathon proved too complex. However, the flexible execute() function in our contract allowed the AI to operate across diverse DeFi protocols without needing extensive additional integrations.

Architectural Diagram https://excalidraw.com/#room=dbf02233d7f50bceb730,J-UOJTDqkBcGEYCBMvabiw

background image mobile

Join the mailing list

Get the latest news and updates