Skip to content

iamomm-hack/Injective-Intelligence

Repository files navigation

Injective Intelligence

Injective Intelligence Logo

AI Behavioral Intelligence Engine for Injective Traders

Built natively on Injective β€” Sentry RPC nodes Β· Explorer Indexers Β· Keplr Verification

Features β€’ Architecture β€’ Tech Stack β€’ Injective Synergy β€’ API Reference β€’ Quick Start β€’ Contributing

Important

Overview:

  • What the project does & how users interact with it: Injective Intelligence is the first AI-powered behavioral profiling dashboard for Injective. Users input any wallet address (or connect Keplr) to inspect a decrypted visual report of their trading archetype, psychological scorecards, risk indices, and transaction logs, or download them as collectible RPG cards.
  • How AI is used: The platform uses an on-chain behavioral profiling engine that processes gas logs, trade types, timestamps, and order histories through heuristic classification algorithms to map wallet footprints to dynamic psychological metrics (Risk, Conviction, FOMO) and trader DNA archetypes.
  • Injective Integration: Integrated natively with Injective Sentry LCD nodes (/cosmos/bank/v1beta1/balances) and indexers (grpc-web Sentries) to fetch real-time wallet balances, verify active sequences, and capture historical transactions.

🎯 Philosophy: Why Injective Intelligence?

In standard decentralized finance (DeFi), block explorers display raw, contextless data: transactions hashes, gas limits, and raw token quantities. They do not tell you the psychology behind the trade. They don't reveal if a trader cut their loss in panic, chased an overextended trend out of FOMO, or has high emotional discipline.

Injective Intelligence is the cognitive audit layer for the autonomous future. By parsing historical chain state, orderbook execution, and liquid balance traces, it decodes raw address logs into a Behavioral DNA Profile.

Problem (Legacy Block Explorers) Solution (Injective Intelligence)
Raw, uncontextualized transaction lists Dynamic Archetype Classification (e.g. Swing Sniper, Volatility Surfer)
No indicators of emotional patterns or FOMO Quantitative Reputation & Behavioral Scorecards (1-100)
Static list of wallet balances Real-Time On-Chain Balance Resolution via Sentry Node query
Hard to share trading metrics WebGL/Canvas generated Shareable RPG Trading Cards
Hardcoded simulated fallbacks Dynamic Inactive Wallet Zeroing (Only actual metrics, 0 for empty logs)

Target Users: Algorithmic traders seeking psychological reviews, Retail investors auditing their leverage discipline, and Swarm organizers looking to identify high-conviction alpha addresses on Injective.


✨ Features

  • 🧠 Behavioral DNA Engine β€” Analyzes on-chain activity to assign 1 of 6 unique trading archetypes (Swing Sniper, Volatility Surfer, Conviction Hunter, Liquidity Farmer, Momentum Predator, or Whale Follower).
  • πŸ“Š Psychological Scorecards β€” Computes precise score ratings (0-100) for Risk Discipline, Emotional Stability, Conviction, Patience, FOMO Probability, and Loss Recovery.
  • ⚑ Live Indexer Integration β€” Fetches transactions and sequences from mainnet and testnet sentry RPC endpoints in real-time.
  • πŸͺͺ Keplr Wallet Authentication β€” Connect and verify real wallet identities with stateful session tracking that persists across routes.
  • πŸ“ˆ Market Intelligence Feed β€” Real-time event streams displaying recent trading actions, patient accumulations, and leverage indicators from other active addresses.
  • 🎨 Premium Glassmorphic Dashboard β€” Stunning futuristic styling, dark-mode overlays, responsive visual charts (PnL curves, win rates), custom Outfit/Outfit-Sans typography, and micro-animations.
  • πŸ“₯ Zero-State Fallback Resolution β€” Inactive, new, or empty/fake addresses automatically render clean, zeroed-out stats, scores, and charts to guarantee data accuracy.
  • πŸ“¦ RPG Card Downloader β€” Render your trader scorecard onto an interactive RPG collector card format and download it with a single click to share on social media.

πŸ—οΈ Architecture

Layered System Design

Injective Intelligence connects web interface actions to raw on-chain nodes using a server-side proxy route and a client-side visualization layer.

graph TD
    subgraph Client [Client Layer - Next.js SPA]
        A[React UI Components] -->|useParams / Navigation| B[Dashboard & Share Page]
        C[Keplr Wallet Connector] -->|localStorage Session| A
    end

    subgraph API [Backend API Proxy - Next.js Server Route]
        B -->|HTTP GET /api/wallet/:address| D[API route.ts]
        D -->|Invokes| E[Behavioral Profiling Engine]
    end

    subgraph Blockchain [On-Chain Integration - Injective Node API]
        E -->|CORS Bypassed Fetch| F[Injective Sentry REST Nodes]
        E -->|CORS Bypassed Fetch| G[Injective Explorer Indexers]
        F -->|Return Bank Balances| E
        G -->|Return Transaction Sequences| E
    end

    style Client fill:#0d1117,stroke:#30363d,stroke-width:1px
    style API fill:#0d1117,stroke:#30363d,stroke-width:1px
    style Blockchain fill:#0d1117,stroke:#30363d,stroke-width:1px
    style A fill:#161b22,stroke:#78fcd6,stroke-width:2px,color:#fff
    style B fill:#161b22,stroke:#78fcd6,stroke-width:2px,color:#fff
    style C fill:#161b22,stroke:#78fcd6,stroke-width:2px,color:#fff
    style D fill:#161b22,stroke:#a855f7,stroke-width:2px,color:#fff
    style E fill:#161b22,stroke:#a855f7,stroke-width:2px,color:#fff
    style F fill:#161b22,stroke:#f97316,stroke-width:2px,color:#fff
    style G fill:#161b22,stroke:#f97316,stroke-width:2px,color:#fff
Loading
Layer Description
Client Layer Built with Next.js App Router (React 19), utilizing dynamic hooks for UI tab navigation and Keplr wallet connectors.
Backend Layer Dynamic Server Routes (/api/wallet/[address]) bypass CORS headers and securely fetch RPC parameters from blockchain sentries.
Analysis Layer The logic engine parses gas logs, transaction types (Send, Execute, Withdraw, Burn), and timestamps to map performance characteristics.
Data Source Layer Live Injective Chain Testnet/Mainnet RPC sentries serve as the decentralized source of truth.

System Design & Processing Pipeline

The architecture is built around a non-blocking, asynchronous profiling pipeline:

graph LR
    Input[Wallet Address Input] --> Validation{Format Check}
    Validation -->|Valid inj1...| CacheCheck[Active Session Registry]
    CacheCheck --> APIFetch[Parallel LCD & Indexer Queries]
    APIFetch --> Engine[Behavioral Profiling Engine]
    Engine --> Scoring[Reputation & Archetype Logic]
    Scoring --> Output[Premium Dashboard Render]
    Scoring --> ShareCard[HTML5 Canvas Social Share Card]
Loading
  1. Modular Ingestion Pipeline:

    • Addresses are validated matching the Injective Bech32 regex format (^inj[0-9a-z]{39}$).
    • The query pulls balance records and tx history logs concurrently to minimize first-load latency.
  2. Heuristic Engine Processing:

    • Processes transaction logs sequentially to map execution types (swaps, liquidities, transfers) into trade models.
    • Computes behavioral scoring factors based on historical holding windows, volume ratios, and gas spending.
    • Evaluates archetype parameters (e.g. high volatility swaps identify a Volatility Surfer, while long holding windows yield a Conviction Hunter).
  3. Sovereign Client Session Design:

    • The interface acts completely client-side for credentials, retaining wallet connection flags dynamically inside isolated state objects.
    • Search parameters and session parameters do not intersect, maintaining session status securely across different pages.

πŸ’» Tech Stack

Frontend & UI

  • React / Next.js (v15.5.18) β€” Next.js 19 Server Components and App Routing.
  • Tailwind CSS (v3.4.17) β€” Utility classes optimized for glow effects, borders, and animations.
  • Recharts (v2.15.4) β€” Beautifully integrated dynamic area and bar charts for equity/PnL curves.
  • Framer Motion β€” Fluid transitions and interactive micro-animations for card hovers.
  • Lucide React β€” Premium, developer-focused iconography for dashboard panels.

API Proxy & Engine

  • Injective RPC Query Nodes β€” Sentry nodes for address-to-balance inquiries.
  • Explorer API Indexer β€” Injective indexer proxies for transaction tracking.
  • HTML5 Canvas API β€” Custom RPG card generator script supporting cross-origin image download.

⚑ The Injective Synergy: On-Chain Integration

Injective Intelligence interacts directly with the core chain infrastructure:

  1. πŸ—„οΈ Real-Time Balance Query: Queries live balances by converting the target address to standard Cosmos format and hitting REST sentries:

    • Mainnet Sentry: https://lcd.injective.network/cosmos/bank/v1beta1/balances/...
    • Testnet Sentry: https://testnet.sentry.lcd.injective.network/cosmos/bank/v1beta1/balances/...
  2. πŸ” Indexed Transaction Auditing: Retrieves history for both Mainnet and Testnet instantly:

    • Mainnet Indexer: https://explorer-api.injective.network/api/v1/account/txs/...
    • Testnet Indexer: https://testnet.sentry.exchange.grpc-web.injective.network/api/explorer/v1/account/txs/...
  3. πŸͺͺ Keplr Verification: Enables users to connect Keplr wallets securely. Keeps connected addresses isolated from searched history, saving states dynamically to local storage keys (connected_injective_address, last_analyzed_address).


🌐 API Reference

The Next.js backend exposes a proxy route to handle data fetching:

Method Endpoint Description
GET /api/wallet/:address Resolves live Injective balances and transactions, computes scoring metrics, and returns the full Behavioral Profile object.

Sample Response Output

{
  "address": "inj1deejc66vhcqen5qju2edlc8wjs3x92shv3kats",
  "archetype": "Volatility Surfer",
  "overallScore": 61,
  "scores": {
    "riskDiscipline": 55,
    "emotionalStability": 60,
    "convictionScore": 65,
    "patienceScore": 45,
    "fomoProbability": 70,
    "lossRecoveryAbility": 80
  },
  "stats": {
    "winRate": 46,
    "totalTrades": 98,
    "netPnLUsd": -6020,
    "volumeTradedUsd": 149744
  },
  "isSimulated": false,
  "injBalance": 144460.902552
}

πŸ“ Project Structure

injective-intelligence/
β”œβ”€β”€ πŸ“ app/                          # Next.js App Router Pages
β”‚   β”œβ”€β”€ layout.tsx                   #   Global Layout & Metadata (Favicon config)
β”‚   β”œβ”€β”€ globals.css                  #   Global Tailwind Styles
β”‚   β”œβ”€β”€ page.tsx                     #   Landing Screen / Search Form
β”‚   β”œβ”€β”€ πŸ“ analyze/                  #   Preload/Redirect Router Page
β”‚   β”œβ”€β”€ πŸ“ market-intelligence/      #   Market Intelligence Feed Screen
β”‚   β”œβ”€β”€ πŸ“ wallet/                   #   Behavioral Dashboard Workspace
β”‚   β”‚   └── [address]/
β”‚   β”‚       β”œβ”€β”€ page.tsx             #     Main Dashboard interface
β”‚   β”‚       └── πŸ“ share/
β”‚   β”‚           └── page.tsx         #     RPG Card Social Share Page
β”‚   └── πŸ“ api/                      #   Backend Server Route Proxy
β”‚       └── πŸ“ wallet/
β”‚           └── πŸ“ [address]/
β”‚               └── route.ts         #     On-Chain Data Resolver
β”‚
β”œβ”€β”€ πŸ“ components/                   # Reusable UI Blocks
β”‚   β”œβ”€β”€ header.tsx                   #   Header Navigation with Keplr Dropdown
β”‚   β”œβ”€β”€ hero-section.tsx             #   Homepage Search / Scanner
β”‚   β”œβ”€β”€ cta-section.tsx              #   Dynamic Landing CTA Redirect
β”‚   β”œβ”€β”€ footer-section.tsx           #   Footer with Branding Logo
β”‚   └── πŸ“ ui/                       #   Basic Tailwind Atoms (Button, Table, etc.)
β”‚
β”œβ”€β”€ πŸ“ lib/                          # Core Logic & Utilities
β”‚   β”œβ”€β”€ engine.ts                    #   Seeded Profiling & Analytics Engine
β”‚   β”œβ”€β”€ card-downloader.ts           #   Canvas Card rendering exporter
β”‚   └── utils.ts                     #   Classname merging helpers
β”‚
└── πŸ“ public/                       # Static Assets & Logo Assets
    └── πŸ“ logos/
        └── logo.png                 #   Brand Logo png file

πŸš€ Quick Start

Prerequisites

  • Node.js: 18.17.0 or higher (compatible with Next.js 15)
  • Package Manager: npm or pnpm

1. Clone & Install

git clone https://github.com/iamomm-hack/Injective-Intelligence.git
cd Injective-Intelligence

# Install dependencies
npm install

2. Run Local Development

npm run dev

Open http://localhost:3000 in your browser to inspect the application.

3. Build & Production Start

# Create optimized production build
npm run build

# Start production server
npm run start

πŸ”§ Network Config Parameters

Parameter Value
Mainnet REST URL https://lcd.injective.network
Mainnet Explorer URL https://explorer-api.injective.network
Testnet REST URL https://testnet.sentry.lcd.injective.network
Testnet Explorer URL https://testnet.sentry.exchange.grpc-web.injective.network
Keplr Chain ID (Mainnet) injective-1
Keplr Chain ID (Testnet) injective-888

🚒 Production Deployment

The project is fully pre-configured for one-click deployment to Vercel:

  1. Create a new project on the Vercel Dashboard.
  2. Connect your GitHub repository.
  3. Keep the default Next.js configurations.
  4. Click Deploy.
  5. Bind your custom domain (e.g. injdna.vercel.app) in project settings under Domains.

🀝 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your Changes (git commit -m 'feat: Add some AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Injective Intelligence β€” Decoding on-chain behavioral psychology for the future of trading.

About

The first AI-powered behavioral intelligence engine built natively for Injective. Decodes raw on-chain transaction history, bank balances, and gas records into structured trader psychology profiles, cognitive scorecards, and collectible RPG cards.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors