hackquest logo

Alpha402

Alpha402: The First Verifiable Autonomous Agent Hub "Verifiable Intelligence. Immutable Strategy. Guaranteed Execution." In the current DeFi landscape, traders are forced to choose between manual bab

Videos

Project image 1
Project image 2
Project image 3
Project image 4

Tech Stack

React
Next
Web3
Node
Solidity

Description

Alpha402: The Verifiable Autonomous Agent Protocol

Alpha402 is a decentralized multi-agent AI orchestration protocol built entirely on the 0G Network, designed to solve the fundamental trust problem in AI-driven applications: the "Black Box" nature of agent reasoning. In traditional systems, there is no way to verify how an AI reached its conclusion, who ran the inference, or whether the output was tampered with before it was executed.

Alpha402 solves this by treating every AI inference task as a first-class on-chain event, anchored by 0G's infrastructure at every layer of the pipeline.

The problem

Today’s DeFi agents are "black boxes." Users are forced to trust that an agent’s decision was based on real data and that the model wasn't compromised or manipulated. There is no objective, replicable record of the reasoning path from "User Intent" to "On-Chain Execution." Audit trails are non-existent, and risk scoring is often just "vibes" reported by a centralized server.

The solution

Every agent action in Alpha402 is a verifiable on-chain event: (strategyId, agentType, riskScore, zeroGCID, zeroGTxn, txHash). The audit trail on 0G Storage contains the raw user intent, the inter-agent reasoning transcripts, and TEE-verified risk signatures. Any third party can:

  1. Read AgentRegistry to verify the iNFT identity and metadata of the agent.

  2. Pull the trace from 0G Storage by its content-addressed Merkle root (CID).

  3. Verify TEE Signatures via the 0G Compute Broker to prove the model ran in a secure enclave.

  4. Audit the Execution by matching the 0G Storage record to the final transaction hash on Sepolia.

0G components used

  • 0G Storage (Galileo/Newton) — Every agent-to-agent (A2A) message and strategy transcript is prepared as a Merkle-tree segment and uploaded via the @0glabs/0g-ts-sdk. We use redundant replication across indexers to ensure audit permanence.

  • 0G Compute (Galileo) — TEE-verified Risk scoring. We utilize the ZGComputeNetworkBroker to perform decentralized inference, providing cryptographic proof of intelligence for every trade approval.

  • 0G Settlement Ledger — Automated OG token management for compute fees. Our orchestrator manages a real-time ledger balance to ensure continuous, pay-per-use agent operations.

  • AgentRegistry (iNFTs) — ERC-721 based identity layer on Sepolia (ERC-7857 inspired). Each agent (Commander, Intel, Risk, Execution) mints its own identity token, linking its on-chain soulbound state to its 0G provenance records.

0G Storage & Compute Logic

  • Immutable Logs — We curated a structure for "Run Records" where user intent is cryptographically linked to the 0G Storage CID.

  • TEE Risk Engine — Developed the zeroGCompute client that interfaces with 0G Galileo providers to perform verifiable inference, effectively using the network's compute capacity as a trust anchor for DeFi execution.

Documentation

  • ALPHA402_PRD.md — Full product requirements and architectural deep-dive.

  • 0G_PROOF.md — Dedicated technical proof for 0G Labs integration.

  • HACKATHON_PROGRESS.md — Comprehensive milestone report.

Repo

  • github.com/SamuelDharshi/Alpha402 — Monorepo containing: agents/ (Core Swarm), alpha402/ (Frontend), bot/ (Telegram), contracts/ (Hardhat/Foundry), and shared/ (ENS/A2A logic).

🧠 Decentralized Inference via 0G Compute

Instead of routing LLM calls to a centralized API, Alpha402 dispatches all inference tasks through the 0G Compute SDK to decentralized TEE (Trusted Execution Environment) provider nodes. When a user submits a trading strategy via Telegram, the Orchestrator (Commander Agent) spawns a committee of specialized agents—Intel, Risk, and Execution—and distributes their inference jobs in parallel across 0G Compute. By running these models in a TEE, we provide cryptographic proof that the agent's reasoning was performed in a secure enclave, ensuring that outputs are untampered and verifiable.

💾 Immutable Provenance via 0G Storage

Once the agent committee reaches consensus on a trade, the Orchestrator compiles a structured Audit Record—a complete JSON artifact containing the raw prompt, each agent's reasoning transcript, risk scores, TEE signatures, and on-chain transaction hashes. This artifact is submitted to the 0G Storage SDK, which handles segmentation into Merkle-tree hashed chunks and redundant replication across storage nodes. The network returns an immutable rootHash that is displayed directly in the dashboard, giving users a permanent, cryptographically verifiable audit trail of every decision the AI committee made.

⚡ Fee Settlement on the 0G Ledger

Every inference call and storage operation carries an economic cost settled on the 0G Settlement Ledger in OG tokens. We built a live auto-funding system inside our Orchestrator that manages the Broker-Mode interaction, querying unsettled fee balances and topping up the ledger programmatically. This ensures the pipeline operates continuously without manual intervention—every compute cycle is economically accounted for, every provider is fairly compensated, and the entire fee flow is transparent on-chain.

🆔 On-Chain Agent Identity via AgentRegistry

Each AI agent in Alpha402 exists as an Intelligent NFT (iNFT) registered in our AgentRegistry smart contract on Sepolia. Before any agent participates in a swarm, the Orchestrator verifies its identity, retrieving its tokenId, metadataHash, and operational history. This identity check ensures that only verified, registered agents can contribute to a strategy—creating a trustless, permissionless system where agent credentials are enforced at the protocol level.

🚀 What 0G Enables That Nothing Else Can

Alpha402 required three things to exist: a decentralized compute layer with cryptographic verifiability (0G Compute), a permanent and immutable provenance layer (0G Storage), and an on-chain economic settlement engine (0G Ledger). The 0G Network provided all three under a single cohesive infrastructure, making it uniquely positioned as the backbone for the next generation of trustless AI applications.

Progress During Hackathon

1. 🏗️ The Foundational Infrastructure (0G Labs)

Our primary mission was to move AI reasoning from centralized silos into a verifiable on-chain environment. We treated the 0G Network as the core trust layer of the protocol.

  • 0G Compute (TEE-Verified Inference):

    • Integrated the @0gfoundation/0g-compute-ts-sdk to power our agent "brains."

    • Developed a custom Broker-Mode implementation that manages TEE signatures, ensuring every risk score and trade decision is cryptographically proven to have occurred within a secure enclave.

    • Implemented automated 0G Settlement Ledger management, enabling seamless OG token payments to decentralized compute providers.

  • 0G Storage (Immutable Provenance):

    • Built a "Black Box" audit trail system. Every agent interaction is serialized, hashed into Merkle trees, and persisted to 0G Storage nodes.

    • Developed resilient failover logic for the 0G Indexers, ensuring 100% log persistence even during high network congestion.

    • Every trade now carries a permanent rootHash (CID) that acts as an immutable proof of reasoning.

🤖 2. Multi-Agent Swarm Orchestration

We designed and implemented a specialized "Trading Crew" of four agents that collaborate autonomously:

  • Commander Agent: The orchestrator. It parses natural language intents from Telegram and translates them into structured JSON strategies.

  • Intel Agent: The observer. It monitors live market data and x402 micropayment feeds to trigger strategies when conditions are met.

  • Risk Agent: The validator. It runs TEE-verified models to evaluate slippage, gas prices, and volatility before any trade is approved.

  • Execution Agent: The settler. It routes approved trades through KeeperHub to ensure guaranteed settlement on-chain.

📡 3. Decentralized Communication (Gensyn AXL)

To prevent centralized points of failure in agent communication, we integrated Gensyn AXL.

  • P2P Agent Bus: Developed a dual-mode communication layer. Agents communicate via an encrypted P2P mesh (AXL) when nodes are active, with a high-speed EventEmitter fallback for local development.

  • ENS Identity Layer: Assigned each agent a verified identity (e.g., intel.alpha402.eth). Every message in the bus is verified against the sender's ENS address to prevent spoofing.

📜 4. Smart Contract Architecture (Sepolia & Unichain)

We built a robust on-chain execution layer to ground the agents' AI logic.

  • StrategyVault.sol: A custom vault that manages user collateral and enforces agent-only execution via cryptographic authorizations.

  • Uniswap v4 Hook Integration: Developed specialized hooks for the Unichain testnet. These hooks allow the agents to dynamically adjust trade parameters (like fees or routing) based on the Risk Agent’s TEE-verified scores.

  • AgentRegistry (iNFT): Implemented an ERC-721 registry where agents exist as Intelligent NFTs. This allows for on-chain identity verification and persistent metadata tracking for every agent in the swarm.

🎨 5. Cyberpunk Dashboard & UX

  • 3D Mission Control: Built a high-performance dashboard using React Three Fiber. The 3D UI visualizes the agent swarm as a living pipeline, showing the real-time flow of data from 0G Compute to the execution layer.

  • Live Audit Terminal: Developed a real-time activity feed that decodes agent-to-agent (A2A) messages and provides clickable links to 0G Storage CIDs and Sepolia explorer transactions.

  • Telegram Bot Interface: Launched @Alpha402Bot to allow users to deploy their entire trading swarm via a single message, bridging the gap between mobile UX and complex DeFi logic.

🛠️ 6. Technical Breakthroughs & Challenges

  • Ethers.js Conflict Resolution: Solved a critical version mismatch between the 0G SDK (v6) and other legacy dependencies by building a custom abstraction layer for the Compute Broker.

  • Render Cloud Deployment: Orchestrated a complex production environment on Render, synchronizing the frontend, agent mesh, and WebSocket server into a cohesive platform.

  • TEE Performance Tuning: Optimized prompt structures and provider selection logic to reduce the latency of decentralized AI inference, making real-time autonomous trading viable.

Fundraising Status

Still not raised any funds for this project, but will, for sure, in the future ;)

Team Leader
SSamuel Dharshi N
Project Link
Deploy Ecosystem
0G0G
Sector
DeFiAIInfra