RWAGpt

An AI agent that lets you invest in Real-World Assets just by talking to it.

RWAGpt

Created At

ETHGlobal New Delhi

Project Description

Project Description: RWA-GPT

-> The Problem: The Real-World Asset Paradox

The tokenization of Real-World Assets (RWAs)—representing everything from U.S. Treasury bills to real estate on the blockchain—is universally seen as the next trillion-dollar opportunity in Web3. Projections estimate a market size of over $16 trillion by 2030.

However, we are facing a paradox: despite this immense potential, the user experience for discovering, analyzing, and investing in these assets is deeply fragmented and prohibitively complex. The ecosystem is a maze of dozens of protocols spread across multiple chains, each with its own unique interface and investment process. Investors lack the tools to easily search for opportunities across the entire market, compare risk profiles, or execute investment strategies without manually navigating and signing transactions on numerous different websites. This complexity creates a massive barrier to entry, confining the RWA market to only the most sophisticated crypto-native users.

-> The Solution: RWA-GPT, an Agentic Interface

RWA-GPT is not just a chatbot; it's an AI-powered agentic interface that serves as a universal, intelligent entry point to the entire RWA ecosystem. We replace the current paradigm of complex clicks with simple, natural language conversation, abstracting away all underlying protocol and blockchain complexity.

Instead of navigating a web of dApps, users interact with our agent to perform sophisticated tasks:

Discovery A user can ask, "Show me all tokenized real estate in the United States with a projected annual yield of over 8% and a loan-to-value ratio below 60%." Analysis"Compare the historical performance of the private credit pools on Centrifuge and Ondo." Investment: "Invest $1,000, allocating 60% to tokenized U.S. Treasury bills and 40% to a private credit fund, optimizing for the best yield."

Crucially, our agent is "agentic"—it doesn't just display information. Upon receiving a user's intent, it translates that intent into a concrete, multi-step, on-chain execution plan. For the investment command, it might generate a plan to swap USDC for a tokenized T-bill, then swap another portion for a private credit token, and present this entire sequence to the user as a single, batched transaction for one-click approval.

-> Technical Architecture & Key Technologies

We built RWA-GPT on a powerful and modern stack, strategically selecting technologies to bring our agentic vision to life.

  1. The Brain (Intelligence Layer):The core of our system is a Large Language Model fine-tuned on RWA-specific data. We implemented the agent's reasoning and tool-using capabilities using the Fetch.ai uAgents framework. This allowed us to give the LLM a set of "tools"—specialized functions it can call to query data or construct transactions, transforming it from a simple chatbot into an autonomous agent that can reason and act.

  2. The Senses (Data Layer): An agent is only as good as its data. To provide a comprehensive market view, we built a robust data pipeline. We use The Graph Protocol to index RWA protocol smart contracts on-chain in real-time, creating custom subgraphs to track asset issuance, performance, and key metrics. This indexed data serves as the agent's primary source of truth.

  3. The Hands (Execution Layer):When the user approves a plan, the agent acts. To ensure capital efficiency, it calls the "1inch Aggregator API" to find the most optimal swap routes for acquiring the desired RWA tokens. These swaps are then bundled into a single transaction using the principles of "Account Abstraction", allowing the user to approve a complex, multi-protocol strategy with a single signature, dramatically improving the user experience.

-> The Vision: From GUIs to IUIs (Intentional User Interfaces)

RWA-GPT is more than just a tool for RWAs; it's a proof-of-concept for the future of dApp interaction. As the Web3 ecosystem becomes more multi-chain and asset-diverse, the primary user interface must evolve from being graphical (GUIs) to being intentional (IUIs).

Users should not be expected to be blockchain experts. They should simply be able to state their intent—"I want to achieve this financial goal"—and have an intelligent agent handle the execution. This paradigm shift from manually clicking through complex UIs to simply conversing with an agent represents a 10x leap in user experience. It's this leap that will be necessary to abstract away the complexity of Web3 and onboard the next billion users. The agentic model we've built is a blueprint that can be applied to any on-chain domain, from complex DeFi to DAO governance.

How it's Made

RWA-GPT: How We Built an AI Agent for Real-World Assets

At its core, RWA-GPT is an AI-powered conversational agent designed to be the single, intelligent interface for the trillion-dollar Real-World Asset (RWA) market. Our goal for ETHGlobal New Delhi was to build a system that could translate natural human language into complex, on-chain financial strategies, abstracting away the friction of Web3. Here's a deep dive into the nitty-gritty of how we pieced it all together.

System Architecture & Technology Stack

We adopted a modular monorepo structure to keep our project organized and scalable, even within the tight constraints of a hackathon. The architecture is broken down into four distinct layers: a frontend for user interaction, a backend for agentic logic, a subgraph for data indexing, and smart contracts for on-chain event generation.

  1. The Brain: The AI Agent Layer (Fetch.ai uAgents) The heart of our project is the AI agent, built in Python using the Fetch.ai uAgents framework. This was a strategic choice because uAgents is purpose-built for creating autonomous, message-driven agents. Instead of building a state machine from scratch, we could leverage its built-in message routing and context management to focus on the core logic. The agent processes natural language commands (e.g., "invest 100 USDC"), recognizes the user's intent, and orchestrates the necessary actions by calling other tools and services.

  2. The Nerves: The API Layer (FastAPI) To connect our frontend to the agent, we built a lightweight, asynchronous API using FastAPI. Its Pydantic models allowed for robust, type-safe validation of requests and responses, which was crucial for preventing bugs between our TypeScript frontend and Python backend. Hacky Solution: For rapid development and transaction tracking, we used a simple in-memory Python list (TRANSACTION_HISTORY) instead of a full-fledged database. This was a pragmatic hackathon tradeoff that allowed us to demonstrate the full transaction lifecycle without the overhead of database setup.

  3. The Senses: Data Indexing (The Graph Protocol) An intelligent agent is useless without good data. We used The Graph Protocol to index on-chain events from our RWA smart contracts in real-time. We wrote a custom subgraph with a GraphQL schema to model Pools and Investments, and used AssemblyScript to create mapping logic that translates Invested events into structured, queryable data. This gave our agent and frontend a high-performance, decentralized API to access live on-chain activity.

  4. The Hands: DEX Integration & Execution (1inch API) To execute trades, our agent needed a way to efficiently swap tokens. We integrated the 1inch Aggregation API, which was a massive benefit. It allowed our agent to find the optimal swap routes across multiple DEXs, ensuring the user gets the best possible price. Hacky Solution & Resilience: We built a comprehensive fallback system. If the 1inch API failed for any reason, our code would automatically fall back to the 0x API. If both aggregators failed, it would generate a safe, no-op transaction to prevent the user experience from breaking, ensuring the demo was always functional.

  5. The Interface: Modern Frontend (Next.js 14) The user experience was built with Next.js 14, TypeScript, and Tailwind CSS. We created a professional chat interface that handles real-time transaction status updates. We used ethers.js for all wallet interactions. Hacky Solution: To ensure a seamless demo for judges on the correct network, we implemented a forceful wallet_switchEthereumChain request on page load to automatically prompt the user to switch to Polygon Amoy, with a fallback to wallet_addEthereumChain if they didn't have the network configured.

  6. The Playground: Smart Contracts (Solidity) To generate realistic on-chain data for our subgraph to index during the hackathon, we wrote and deployed a simple MockRWAPool contract in Solidity. This contract emits Invested and YieldDistributed events, providing a live data source for our entire system to react to.

Notable Challenges & Innovative Solutions

Building a complex system like this in a weekend presented several challenges:

Real-time Data Integration: We needed a way to feed our agent with live data without directly querying slow RPC nodes. We integrated the RealT API to pull off-chain real estate data, with a synthetic data generator as a fallback. This hybrid approach gave our demo a rich, realistic feel even when external APIs were unavailable. Multi-Chain Complexity: Managing token addresses across different chains is tedious. We built a dynamic token address resolver function that returns the correct USDC and WETH addresses based on the provided chain_id, making our backend logic cleaner and ready for multi-chain expansion. Error Handling: With so many external dependencies (The Graph, 1inch, 0x, RealT), our system needed to be incredibly resilient. We implemented a comprehensive "try-except-fallback" pattern throughout our backend, ensuring that a failure in one service didn't cascade and bring down the entire application.

By combining the agent-native framework of Fetch.ai, the powerful data indexing of The Graph, and the capital efficiency of the 1inch API, we were able to build a truly innovative application that showcases the future of user interaction in DeFi.

background image mobile

Join the mailing list

Get the latest news and updates