Skip to content

Trenzora is an all-in-one platform for discovering, analyzing, and trading trending Zora coins on Base.

Notifications You must be signed in to change notification settings

MakindeAhmed2110/trenzora

Repository files navigation

Trenzora πŸš€

Trenzora is an all-in-one platform for discovering, analyzing, and trading trending Zora coins on Base. It combines real-time market intelligence, a powerful Telegram trading bot, and automated alerts to help users act fast and trade securelyβ€”right from their favorite messaging app.

🚩 Problem Statement

Crypto traders on Zora ecosystems struggle to:

  • Discover trending coins in real time.
  • Act quickly on new opportunities.
  • Trade securely and efficiently from mobile devices.
  • Get timely alerts about market trends.
  • Manage wallets and execute trades without complex dApps.

πŸ’‘ Solution

Trenzora solves these challenges through three innovative components:

  1. Dexscreener

    • Real-time tracking of trending Zora coins on Base
    • On-chain analytics: price, volume, holders, market cap
    • Social and sentiment data integration for deeper insights
  2. Telegram Trading Bot

    • Secure wallet management and encrypted key storage
    • Instant buy/sell of Zora tokens with MEV protection
    • Live price quotes, gas estimation, and trade history
    • User-friendly trading directly from Telegram
  3. Alerts & Autonomous Agent

    • Continuous market scanning and trend detection
    • Automated buy/sell/hold recommendations with confidence scores
    • Proactive alerts for trending coins and market anomalies
    • Extensible, fully autonomous or user-triggered operation

🟒 Trenzora Products

  • Dexscreener
  • Telegram Trading Bot
  • Alerts Agent

Trenzora Products & Key Features

1. Dexscreener

  • Uses the @zoralabs/coins-sdk to fetch trending coins, price, volume, holders, and social data.
  • Analyzes coins for buy/sell signals based on price, volume, market cap, and social presence.

2. Telegram Trading Bot

  • Built with TypeScript.
    • Features:
      • Wallet creation/import/export (encrypted).
      • Balance/history tracking (ETH & Zora Tokens).
      • Buy/sell tokens with MEV protection.
      • Gas cost estimation and optimization.
      • Deposit/withdraw ETH.
      • Customizable slippage and gas settings.
  • Integrates with QuickNode’s Base DeFi Power Bundle (OpenOcean API, Sentio Gas, MEV protection).

Telegram Trading Bot: Codebase Breakdown & Zora Token Trading

Overview

The Telegram Trading Bot is a TypeScript-based backend that allows users to trade Zora tokens directly from Telegram. It is designed for the Zora Coinathon Hackathon to showcase seamless, secure, and user-friendly DeFi trading on Base.

Codebase Structure

  • Entry Point: telegram-trading-bot/index.ts initializes the bot, loads environment variables, and sets up command handlers.
  • Commands: All user interactions (buy, sell, balance, deposit, withdraw, trending, etc.) are handled in src/commands/.
  • Core Logic:
    • src/lib/swap.ts: Handles swaps, price quotes, and gas estimation using OpenOcean and Sentio APIs.
    • src/lib/database.ts: Manages user wallets, balances, and transaction history (SQLite).
    • src/lib/history.ts: Fetches and tracks token balances and historical data.
    • src/lib/encryption.ts: Encrypts/decrypts private keys for secure storage.
  • Types: All data structures and command types are defined in src/types/.
  • Utils: Helper functions for formatting, validation, and keyboard UI in src/utils/.

How It Trades Zora Tokens

  1. Wallet Management:
    • Users can create or import a wallet directly in Telegram. Private keys are encrypted and stored securely.
  2. Token Discovery:
    • The bot fetches trending Zora tokens using the @zoralabs/coins-sdk and presents them to the user.
  3. Buy/Sell Flow:
    • User selects a token and enters the amount to buy/sell.
    • The bot fetches a live price quote and gas estimate using OpenOcean and Sentio APIs.
    • The user confirms the trade; the bot signs and sends the transaction on Base Mainnet.
    • MEV protection is applied for optimal execution.
  4. Transaction Feedback:
    • The bot provides real-time status updates, transaction hashes, and error handling.
  5. History & Alerts:
    • Users can view their balance and trade history for both ETH and Zora tokens.
    • The bot can send alerts for price changes, new trends, or completed trades.

Why This Matters for Zora Coinathon

  • Onboarding: Lowers the barrier for new users to trade Zora tokensβ€”no dApp or browser wallet required.
  • Speed: Enables instant trading and trend reaction from any device via Telegram.
  • Security: Private keys are encrypted; MEV protection ensures fair execution.
  • Innovation: Demonstrates how Zora’s ecosystem can be integrated into mainstream messaging apps for mass adoption.

3. πŸ€– Alerts Agent

  • Scans Zora trending coins automatically and on-demand.
  • Sends detailed analysis and buy/sell recommendations to users.
  • Notifies users instantly when a coin starts trending.
  • Accessible via Telegram commands and inline buttons.

Alert Agent: Market Intelligence, Decision Making, and Autonomy

Market Intelligence

  • Continuously monitors Zora and Base for trending coins, price spikes, volume surges, and new mints.
  • Aggregates on-chain data (price, volume, holders, market cap) and off-chain data (social, news, sentiment).
  • Uses the @zoralabs/coins-sdk and custom logic to build a real-time intelligence feed.

Decision Making

  • The agent's core logic is in telegram-trading-bot/agent/index.ts.
  • Each coin is scored using a multi-factor model:
    • Price Change: 24h, 1h, and 5m momentum
    • Volume: Trading activity and liquidity
    • Market Cap: Growth potential vs. risk
    • Holder Distribution: Community spread and whale risk
    • Social Presence: Twitter, Telegram, website
    • Risk Assessment: Volatility, liquidity, and contract safety
  • The agent generates a buy/sell/hold/alert decision for each coin, with confidence and risk level.
  • Example (from code):
// agent/index.ts (simplified)
if (coin.priceChange24h > 50) buyAdvice = "STRONG_BUY";
else if (coin.priceChange24h > 20) buyAdvice = "BUY";
else if (coin.priceChange24h < -30) buyAdvice = "SELL";
// ...plus volume, cap, holders, social, risk

Autonomous Features

  • Runs on a schedule or on-demand (via Telegram commands or triggers).
  • Sends proactive alerts to users when:
    • A coin starts trending
    • A buy/sell threshold is crossed
    • Market anomalies are detected
  • Can operate fully autonomously or in response to user queries.
  • Designed for extensibility: add new data sources, signals, or alert types easily.

🧠 Decision/Strategy Engine

The core of Trenzora's alert agent is a multi-factor decision engine that analyzes each trending coin and generates actionable recommendations. Here’s a simplified version of the actual code:

// telegram-trading-bot/agent/index.ts (actual implementation)
export class TrenzoraAgent {
  // ... constructor and other methods ...

  /**
   * Analyze a coin and provide buy advice
   */
  private async analyzeCoin(coin: TrendingCoin): Promise<CoinAnalysis> {
    const reasoning: string[] = [];
    let buyAdvice: "STRONG_BUY" | "BUY" | "HOLD" | "SELL" | "STRONG_SELL" = "HOLD";
    let confidence = 50;
    let riskLevel: "LOW" | "MEDIUM" | "HIGH" = "MEDIUM";
    let potentialReturn = 0;

    // Analyze price change
    if (coin.priceChange24h > 50) {
      reasoning.push("πŸš€ Strong 24h price increase");
      buyAdvice = "STRONG_BUY";
      confidence += 20;
      potentialReturn = 100;
    } else if (coin.priceChange24h > 20) {
      reasoning.push("πŸ“ˆ Good 24h price increase");
      buyAdvice = "BUY";
      confidence += 15;
      potentialReturn = 50;
    } else if (coin.priceChange24h < -30) {
      reasoning.push("πŸ“‰ Significant price decline");
      buyAdvice = "SELL";
      confidence += 10;
    }

    // Analyze volume
    if (coin.volume24h > 500000) {
      reasoning.push("πŸ’ͺ High trading volume");
      confidence += 10;
    } else if (coin.volume24h < 10000) {
      reasoning.push("⚠️ Low trading volume");
      confidence -= 10;
      riskLevel = "HIGH";
    }

    // Market cap
    if (coin.marketCap < 1_000_000) {
      reasoning.push("πŸ’° Low market cap - high potential");
      confidence += 15;
      potentialReturn += 200;
    } else if (coin.marketCap > 10_000_000) {
      reasoning.push("🏒 High market cap - lower potential");
      confidence -= 10;
    }

    // Holders
    if (coin.holders > 1000) {
      reasoning.push("πŸ‘₯ Good holder distribution");
      confidence += 5;
    } else if (coin.holders < 100) {
      reasoning.push("⚠️ Low holder count - risky");
      confidence -= 15;
      riskLevel = "HIGH";
    }

    // Social presence
    if (coin.twitter || coin.telegram) {
      reasoning.push("πŸ“± Active social presence");
      confidence += 5;
    }

    // Normalize confidence
    confidence = Math.max(0, Math.min(100, confidence));

    return {
      coin,
      buyAdvice,
      confidence,
      reasoning,
      riskLevel,
      potentialReturn
    };
  }
}

How it works:

  • The TrenzoraAgent class encapsulates the decision logic.
  • The analyzeCoin method scores each coin based on price, volume, market cap, holders, and social data.
  • Returns a recommendation, confidence, risk, and reasoning for transparency.

4. πŸ€– Alert Agent Architecture

The Alert Agent is responsible for scanning, analyzing, and generating actionable recommendations on trending Zora coins. Its architecture is modular and data-driven, ensuring extensibility and transparency.

Architecture Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Zora Data & Signals  │───▢│ Intelligence Engine│───▢│ Strategy Engine    β”‚
β”‚ - Trending Coins     β”‚    β”‚ (Decision Making)  β”‚    β”‚ (Execution Logic)  β”‚
β”‚ - Price/Volume       β”‚    β”‚                    β”‚    β”‚ - Trade/Alert Flow β”‚
β”‚ - Social Sentiment   β”‚    β”‚                    β”‚    β”‚ - User Actions     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β–²                        β”‚                        β”‚
         β”‚                        β–Ό                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Market Analytics     β”‚    β”‚   Risk Management  β”‚    β”‚  Performance       β”‚
β”‚ - Statistics         │────▢ - Confidence/Risk  │────▢  Tracking &        β”‚
β”‚ - Patterns           β”‚    β”‚   Levels           β”‚    β”‚  Learning          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Section Breakdown

  • Zora Data & Signals:

    • Sources trending coins, price, volume, and social sentiment data from Zora APIs and other feeds.
  • Intelligence Engine (Decision Making):

    • Processes raw data, applies multi-factor scoring, and generates actionable insights.
  • Strategy Engine (Execution Logic):

    • Converts insights into trade/alert flows and user-facing actions.
  • Market Analytics:

    • Provides statistical analysis and pattern recognition to support decision making.
  • Risk Management:

    • Assesses confidence and risk levels for each recommendation.
  • Performance Tracking & Learning:

    • Monitors outcomes and adapts strategies for continuous improvement.

Agent Flow Structure

  • Startup: On bot start, agent scans trending coins and sends analysis.
  • Manual Trigger: Users can run /trending or /quicktrending for instant analysis.
  • Analysis: Each coin is scored for price change, volume, market cap, holders, and social presence.
  • Buy Advice: Generates STRONG_BUY, BUY, HOLD, SELL, or STRONG_SELL with confidence and risk level.
  • Alerts: Sends top recommendations and summary to users.

πŸ— Codebase Architecture

High-Level Structure

trenzora/
  β”œβ”€β”€ src/
  β”‚   β”œβ”€β”€ app/                # Next.js frontend (UI, pages, components)
  β”‚   └── components/
  β”‚   └── utils/
  β”œβ”€β”€ telegram-trading-bot/   # Telegram bot backend
  β”‚   β”œβ”€β”€ agent/              # Agent for trending/alerts/analysis
  β”‚   β”œβ”€β”€ src/
  β”‚   β”‚   β”œβ”€β”€ commands/       # Telegram bot commands (buy, sell, balance, etc.)
  β”‚   β”‚   β”œβ”€β”€ lib/            # Core logic (swap, database, history, etc.)
  β”‚   β”‚   β”œβ”€β”€ types/          # TypeScript types
  β”‚   β”‚   └── utils/          # Helpers, constants, formatters
  β”‚   β”œβ”€β”€ index.ts            # Bot entry point
  β”‚   └── README.md           # Detailed README for the Trenzora Trading Bot
  └── README.md

Key Files

  • agent/index.ts: Main agent logic (scanning, analysis, recommendations).
  • src/commands/: Telegram bot commands (buy, sell, trending, etc.).
  • src/lib/: Core logic for swaps, database, history, encryption.
  • src/app/: Next.js frontend (UI, features, support, trending, etc.).

Summary Table

Feature Description
DexScreener( Zora Coins Integration ) Real-time trending coin data, price, volume, holders, social, analysis
Telegram Trading Bot Wallet, buy/sell, MEV protection, history, settings, all in Telegram
Alerts Agent Auto/manual trending scans, buy/sell advice, instant notifications
Codebase Architecture Modular: Next.js frontend, Telegram bot backend, agent, commands, libraries

πŸš€ Getting Started

Follow these steps to set up and run Trenzora locally:

# 1. Clone the repository
 git clone https://github.com/MakindeAhmed2110/trenzora.git
 cd trenzora

# 2. Install dependencies
 npm install

# 3. Configure environment variables
cp .env.example .env
# Edit .env with your API keys and settings

# 4. Start the Next.js web app
npm run dev

Open http://localhost:3000 in your browser to see the app.

Running the Telegram Trading Bot

# In a new terminal, from the project root:
cd telegram-trading-bot
npm install # if not already done
npm run start

πŸ› οΈ Environment Configuration

Main Trenzora App (.env)

# Zora API Key (public for frontend usage)
NEXT_PUBLIC_ZORA_API_KEY=

# Privy Auth App ID (for authentication)
NEXT_PUBLIC_PRIVY_APP_ID=

Telegram Trading Bot (.env)

# Telegram Bot Token
TELEGRAM_BOT_TOKEN=

# Zora API Key (for agent/analysis)
ZORA_API_KEY=

# QuickNode RPC URL (Base Mainnet)
QUICKNODE_RPC=

# Wallet Encryption Key (for secure storage)
WALLET_ENCRYPTION_KEY=

# SQLite Database Path (optional, default: ./database.sqlite)
DB_PATH=

Edit these files with your actual API keys and secrets before running the app or bot.


πŸ“š Documentation

Detailed documentation is available in the docs directory:


πŸ“ˆ Performance

  • Near-instant trade execution via Telegram bot and optimized backend
  • Automated risk management and proactive alerts for trending coins
  • Lower slippage and MEV protection compared to standard AMM swaps
  • Real-time analytics and decision engine for fast, data-driven trading

πŸ›£ Roadmap

Phase 1: Core Platform (Current)

  • Dexscreener integration for Zora coins
  • Telegram trading bot with MEV protection
  • Automated alerts and intelligence agent
  • Secure wallet management
  • Enhanced UI dashboard

Phase 2: Advanced Features (Q4 2025)

  • Multi-chain and multi-DEX support
  • Advanced analytics and custom alerts
  • Social sentiment and news integration
  • Portfolio tracking and optimization

πŸ‘₯ Target Users

  1. Active Crypto Traders

    • Real-time trend discovery and instant execution
    • Telegram-based trading for speed and convenience
    • Lower slippage and MEV protection
  2. Zora Ecosystem Enthusiasts

    • Early access to trending Zora coins
    • Automated alerts and buy/sell recommendations
    • Secure, mobile-first trading experience

πŸ“’ Stay Connected

Follow us for updates, insights, and behind-the-scenes development:

🐦 Follow us on X: @Trenzora

πŸ€– Try Trenzora Trading Bot: @Trenzora_bot

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ for Zora Coinathon 2025

About

Trenzora is an all-in-one platform for discovering, analyzing, and trading trending Zora coins on Base.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages