← Back to home

DailyBridge

AI-powered cross-chain USDC bridge with real-time blockchain intelligence

Problem Statement

LIVE on mainnet and powered by blockscout MCP and SDKDailyBridge is a next-generation cross-chain bridge application that seamlessly combines traditional DeFi functionality with AI-powered blockchain analytics. The platform enables users to bridge USDC tokens between EDU Chain and five major blockchains (Ethereum, Polygon, Arbitrum, Optimism, and Base) while providing instant transaction feedback and conversational blockchain intelligence.Core Features Smart Bridging Interface The application provides an intuitive bridge interface that leverages Stargate Protocol's cross-chain infrastructure to facilitate USDC transfers. Users can select source and destination chains, input amounts, and view multiple routing options with real-time fee calculations. The bridge supports:Multi-chain USDC transfers (6 chains supported) Dynamic route selection with time and cost optimization Real-time quote fetching with multiple route comparisons Automatic network switching and transaction approval flow Live balance updates and transaction status tracking Instant Explorer Feedback with Blockscout SDK Every transaction submitted through the bridge immediately triggers interactive notifications powered by Blockscout's SDK. When users approve USDC spending or execute bridge transactions, they receive instant toast notifications with direct links to Blockscout explorers, allowing them to:Track transaction confirmations in real-time View detailed transaction data on Blockscout Monitor cross-chain message status Access comprehensive block explorer information without leaving the app This integration transforms the typical "transaction submitted" experience into an interactive, informative journey where users maintain full visibility into their on-chain activities.AI-Powered Blockchain Assistant The platform features a dedicated chat interface that connects users to an AI agent equipped with comprehensive blockchain analysis capabilities through Blockscout's Model Context Protocol (MCP) server. This conversational interface enables users to:Query blockchain data using natural language Analyze wallet activities and transaction histories Inspect smart contract code and ABIs Look up token information and NFT holdings Retrieve ENS names and address information Access multi-chain data across all networks supported by Blockscout The AI assistant processes queries through 18 specialized MCP tools, including get_transactions_by_address, inspect_contract_code, transaction_summary, get_token_transfers_by_address, and more. Users can ask questions like "Show me recent transactions for 0x..." or "What tokens does this address hold?" and receive contextual, AI-interpreted responses rather than raw API data.Unified User Experience The application creates a cohesive workflow where users can bridge assets and immediately query the blockchain for transaction details, all within the same interface. After initiating a bridge transaction, users can switch to the chat interface and ask the AI to analyze their transaction, inspect the bridge contract, or monitor their token balances across chains—creating a self-contained DeFi experience enhanced by real-time blockchain intelligence.

Solution

DailyBridge is architected as a modern React application that integrates multiple blockchain infrastructure layers to deliver a seamless user experience.Frontend Architecture The application is built with React 18 and TypeScript, using Vite as the build tool for optimal performance. The UI leverages Shadcn/ui components built on top of Radix UI primitives, providing accessible and customizable components styled with Tailwind CSS. The design system includes custom theming with dark mode support and glassmorphism effects for a modern aesthetic.State management utilizes React hooks and TanStack Query (React Query) for efficient server state synchronization. The application features two main routes:Bridge Interface (/) - The primary landing page with the bridging functionality AI Chat Interface (/chat) - A dedicated chat page for blockchain queries Wallet Connectivity User authentication and transaction signing are handled through Wagmi v2 and RainbowKit, providing a polished wallet connection experience. The configuration supports all six chains (Ethereum, Polygon, Arbitrum, Optimism, Base, and EDU Chain) with automatic network switching capabilities. Viem is used for Ethereum interactions and utility functions like parsing/formatting units.Blockscout SDK Integration The Blockscout App SDK (@blockscout/app-sdk) is integrated at the application root level through two provider components:NotificationProvider - Manages notification state and configuration TransactionPopupProvider - Handles transaction toast displays In the bridge component (BridgeCard.tsx), the useNotification hook exposes the openTxToast() function, which is called immediately after both approval and bridge transactions are submitted (lines 155 and 177). This function accepts the chain ID and transaction hash, automatically generating interactive notifications with links to the appropriate Blockscout explorer for that network.This implementation is particularly valuable because it provides instant feedback across multiple chains without requiring manual explorer URL construction. The SDK handles chain-specific explorer routing, ensuring users always land on the correct Blockscout instance for their transaction.Blockscout MCP Server Integration The AI chat functionality is powered by a backend API route (api/chat.ts) that establishes a connection to Blockscout's Model Context Protocol server. The implementation uses:Vercel AI SDK v5 - Manages streaming AI responses and tool orchestration Groq AI - Provides the language model (kimi-k2-instruct) for natural language understanding MCP SDK (@modelcontextprotocol/sdk) - Connects to Blockscout's MCP server via HTTP transport The architecture works as follows:User sends a message through the chat UI The frontend calls /api/chat with the conversation history The API establishes an MCP client connection to https://mcp.blockscout.com/mcp using StreamableHTTPClientTransport The MCP client retrieves 18+ available tools from Blockscout's server These tools are passed to the AI SDK's streamText() function alongside the user's messages The AI model decides which tools to invoke based on the query Responses stream back to the client with tool calls, inputs, outputs, and AI-generated explanations The UI renders each message part differently (text, tool calls, reasoning, etc.) The chat interface (Chat.tsx) implements a sophisticated rendering system that displays:Dynamic tool calls - Shows which Blockscout MCP tools were invoked with their arguments Tool outputs - Displays the raw blockchain data returned from each tool AI reasoning - Reveals the model's thought process (if available) Contextual responses - AI-interpreted summaries of the blockchain data This approach transforms Blockscout's comprehensive API into a conversational interface, making blockchain data accessible to users who may not be familiar with block explorers or API endpoints.Cross-Chain Bridge Infrastructure The bridging functionality integrates with Stargate Protocol, a composable liquidity transport protocol. The implementation (lib/stargate.ts) fetches quotes from Stargate's API, comparing multiple routing options based on duration and fees. When a user initiates a bridge:The app fetches available routes via getAllStargateQuotes() Routes are sorted by estimated duration, with the fastest auto-selected Users can manually select alternative routes through a comparison modal The selected route provides step-by-step transaction data The app executes each step sequentially (approve → bridge) After each transaction, Blockscout SDK notifications are triggered Price Feeds and UX Enhancements Token price data is fetched from CoinGecko API (lib/coingecko.ts) and refreshed every 60 seconds to display USD-denominated fees. The bridge displays comprehensive cost breakdowns including:Message fees (in USD based on native token price) Protocol fees (USDC difference between source and destination amounts) Estimated transfer time Route information (e.g., "Stargate V2" or "Stargate V1")

Hackathon

ETHOnline 2025

2025

Contributors