All projects

BlockStory: Institutional-Grade Intelligence Gateway

Institutional-grade multichain analytics powered by AI, x402 micropayments, and Chainlink CRE.

CRE & AI

What it is

BlockStory is a premium, institutional-grade analytics gateway designed to provide cost-controlled, verifiable access to blockchain data. It combines raw historical RPC queries (Base, Ethereum, Solana) with high-level Nansen AI market intelligence (Smart Money Radar, Token Pulse, Wallet Profiler) into a single conversational interface.

Traditional blockchain analytics and historical data providers operate on rigid, expensive monthly subscription models that involve API keys and risks associated with their unauthorised exposure. This creates a barrier for developers, institutional researchers, and individual traders who only need specific data points at irregular intervals. Furthermore, data fetched via traditional RPCs lacks a built-in "proof of source" or "proof of cost" layer, making it difficult to verify the integrity of historical records in a multi-stakeholder environment.

Users interact with the platform using natural language, which is parsed by an AI Planner (Google Gemini) into executable query plans. Each query is monetized via the x402 protocol, enabling a transparent pay-per-request model that replaces expensive, rigid subscription services, avoiding the need to store sensitive API keys - promoting security and cost efficiency. To ensure data integrity, every query and its result are hashed and attested onchain via Chainlink CRE (Chainlink Runtime Environment), providing a verifiable “proof of session” and “proof of result” record in the QueryRegistry contract.

How it works:

  1. Intent Resolution: Gemini AI identifies user intent (e.g., "Fetch block info" or "Check smart money flow").
  2. Paid Execution: The request triggers a micropayment (e.g., $0.01 USDC) via the x402 rail.
  3. Data Retrieval: The server pulls historical data from RPCs or Nansen APIs (via Corbits Proxy).
  4. Verifiable Attestation: Chainlink CRE orchestrates a workflow that hashes the query/result and records it on Base Sepolia.
  5. Interactive Visualization: Results are rendered as dynamic UI cards with verifiable attestation receipts.

Problem it solves: BlockStory eliminates the “all-or-nothing” cost structure of traditional analytics platforms (Subscription vs Free) while adding a much-needed layer of cryptographic verification to historical data retrieval.

How it Works

Frontend: Next.js 14 (App Router) with Tailwind CSS for a premium institutional dashboard. Uses viem for blockchain interactions and x402-fetch for micropayment integration.
Backend: Express.js server orchestrating AI planning, standard RPC queries, and Nansen data fetching via the Corbits proxy.
AI Core: Google Gemini 2.0 Flash for low-latency intent resolution and query planning.
Chainlink Orchestration: Every payment-verified query triggers a Chainlink CRE (Chainlink Runtime Environment) workflow. This workflow (in cre/history-fetcher/) fetches the requested data, generates a queryHash and resultHash, and reports them as an onchain attestation.
Onchain Registry: A custom QueryRegistry.sol contract on Base Sepolia accepts reports from the CRE forwarder, providing a verifiable “Single Source of Truth” for every analytics session.
Payment Rail: The x402 protocol handles sub-cent micropayments in USDC on Base, allowing a “Pay-Per-Request” alternative to legacy subscriptions.

Links

Created by

  • Elio Jordan Lopes