Search projects, hackathons, sponsors and tech

    ← All projects

    pebble

    Swap crypto on Uniswap V2 using chat, backed by automated risk rails and on-chain receipts.

    Demo

    About

    SwapChat is an AI-powered conversational decentralized trading terminal built on Ethereum Sepolia. It simplifies decentralized finance (DeFi) by allowing users to check balances, query live market prices, and execute on-chain token swaps entirely through intuitive natural language. Traditional DEX interfaces present complex forms, routing selectors, and manual slippage inputs that confuse newcomers and slow down traders. SwapChat solves this with a real-time conversational agent capable of: 1. Conversational Balances & Price Discovery: Querying live ERC-20 token reserves and Uniswap V2 liquidity pools on Sepolia for real-time exchange rates. 2. Intelligent Multi-Turn Intent Resolution: Handling incomplete prompts (e.g., "swap ETH for USDC") by prompting for missing amounts, computing routing paths, slippage tolerance, and generating interactive Trade Proposal cards. 3. Secure On-Chain Execution: Signing and broadcasting transactions directly to the Uniswap V2 Router via funded burner wallets, instantly generating verified on-chain Trade Receipts with Etherscan verification links. 4. Session Memory & Transaction Auditing: Persisting trade histories in local SQLite and conversational state, allowing users to ask "what was my last transaction" or "show my transaction history" to inspect past trades and live search filter session receipts.

    How it's made

    SwapChat is architected with a decoupled full-stack Web3 design combining a React frontend with a Node.js NLP and Web3 execution engine: - Smart Contract & Web3 Layer: Built on Ethereum Sepolia using ethers.js v6 to interface directly with the Uniswap V2 Router (0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3) and Uniswap V2 Factory. It features an automated burner wallet system with local key management for zero-friction testnet trading. - Conversational NLP & State Machine: Engineered an intent parsing pipeline that handles entity extraction (amounts, token symbols, slippage) and multi-turn conversational session states. If a trade prompt is missing parameters, the session memory stores the context and prompts the user for clarification before constructing the proposal. - Risk & Slippage Engine: Computes real-time reserves via Uniswap Pair contracts (getReserves), simulates expected output amounts using the standard constant product formula (x * y = k with 0.3% fees), and provides automated price impact warnings. - Persistent Ledger: SQLite and in-memory session logging track all executed trades, gas used, transaction hashes, and block confirmations, enabling instant natural language history retrieval. - Frontend: Built with React, Vite, and Tailwind CSS, featuring glassmorphic trading cards, animated trade proposal modals, and live searchable receipt tables.