← Back to home

Nexu

Nexu — an AI Telegram bot for cross-chain stablecoin bridging, deposits, and DeFi tracking.

Problem Statement

Nexu is an AI-powered Telegram bot that simplifies cross-chain asset management using Web3 infrastructure. Built on the Avail Nexus SDK and Blockscout APIs, Nexu enables users to seamlessly bridge and deposit stablecoins (USDC/USDT) across supported chains and automatically track their token balances, yields, and transaction activity — all within a simple chat interface.Designed for accessibility and transparency, Nexu removes the complexity of multi-chain navigation by offering real-time analytics, protocol insights, and one-click yield optimization directly from Telegram.Core Features: • Cross-chain stablecoin bridging and deposits via Avail Nexus SDK • Unified token and yield tracking across protocols (Aave, Morpho) • Transaction analytics powered by Blockscout • Secure, chat-based interface with instant responses and notificationsGoal: To make decentralized finance intuitive, conversational, and cross-chain unified — starting with a fast, user-friendly Telegram experience.

Solution

Here’s a technical, “nitty-gritty” project description for Nexu, written like an internal engineering or hackathon report — clear, concise, and implementation-focused 👇⸻Project Title: NexuTagline: An AI-assisted Telegram bot for unified cross-chain stablecoin management.⸻What Technologies We Used • Core Bot Framework: • Node.js with the Telegraf library for Telegram integration. • Backend & APIs: • Express.js for the REST API layer that connects the bot to blockchain SDKs. • PostgreSQL as the main database for user, wallet, and transaction caching. • Web3 Integrations: • Avail Nexus SDK for unified cross-chain bridging and liquidity access. • Blockscout APIs for querying balances, token metadata, and transaction statistics. • Infrastructure & Tooling: • Docker for containerization and portable deployments. • Render (or Railway) for server hosting and continuous deployment. • Jest for unit and integration testing. • GitHub Actions for CI/CD automation and linting.⸻How They’re Pieced TogetherThe system follows a modular three-layer architecture:Telegram Interface (Telegraf) ↓Backend Logic (Express.js) ├── Avail Nexus SDK (bridging, deposits) ├── Blockscout APIs (balances, stats) ↓Database (PostgreSQL)Telegram Layer: Handles all user interactions — /start, /bridge, /deposit, /stats. Each command triggers a backend call via HTTP.Backend Layer: Processes logic-heavy operations: • Routes API calls to Avail Nexus SDK for cross-chain functions. • Queries Blockscout endpoints to retrieve balance and transaction stats. • Normalizes all outputs into standardized JSON responses.Database Layer: • Caches results from Blockscout to reduce API overhead. • Logs every user interaction for analytics and error recovery.The Telegram bot and backend share the same codebase for simplicity. The SDK and API modules are wrapped in service classes so that the same backend can later serve a React dashboard.⸻Partner Technologies & Benefits 1. Avail Nexus SDK: • Provided a unified interface for cross-chain bridging and liquidity without manually handling RPC endpoints or chain IDs. • Reduced development time by 60–70% compared to writing raw smart contract calls for each network. • Automatically handled proof-of-bridge and message validation, ensuring secure transfers. 2. Blockscout API: • Gave consistent, chain-agnostic access to transaction data and token balances across EVM-compatible chains. • Eliminated the need for separate indexers or TheGraph subgraphs. • Simplified our multi-chain balance aggregation logic into a single query pattern.⸻Hacky or Notable Implementations • Hybrid SDK Invocation via Backend: Telegram bots can’t directly call Node SDKs due to async wallet signing issues, so we proxied all SDK calls through an Express backend using a “command dispatch” pattern. Each Telegram action sends a job payload (chain, token, amount), and the backend executes the Avail Nexus SDK call asynchronously. • Dynamic Inline Commands: Built a custom inline keyboard that dynamically populates token or chain options based on real-time data fetched from Avail’s network registry. This made the bot feel interactive and context-aware without a heavy frontend. • Unified Token Abstraction: Instead of treating USDC and USDT separately per chain, we implemented a “unified stablecoin model” — one internal class that maps all wrapped versions (e.g., USDC.e, USDT.b) to a single internal ID. This allowed cross-chain yield routing to be handled seamlessly. • Optimistic Caching: Blockscout data is cached for 60 seconds, with a background job updating stats asynchronously. This hack reduced API latency from 3–5s to under 1s for repeated queries. • Ephemeral Signing Keys (for Testing): During testnet bridging, we used temporary signing keys spun up in-memory and destroyed after each run — simulating user-side wallets securely during development.

Hackathon

ETHOnline 2025

2025

Contributors