Hemera Doc
  • 👋Welcome
    • Introduction
    • Quick Start
    • Account Centric Indexing Protocol
      • What is Account-Centric Indexing?
      • Why "account-centric" indexing?
      • The advantages of Account-Centric Indexing
      • What's next for account-centric indexing?
      • Why create a new protocol here?
      • The Hemera Network
        • Network Roles
        • Indexers
        • Validators
        • Proprietary models & knowledge
        • Proprietary data and labels
        • Smart Contracts
        • Key roadmap items
        • Supported blockchains
      • Example Hemera use cases
        • SocialScan Explorers
        • Anti-sybil UML algorithm
        • Ethereum long term DA
        • EVM chain history preservation
        • Ecosystem AI Agents
        • User-defined AI Agents
  • 👩‍💻Developer Resources
    • Smart Contract Developers
    • EVM-compatible chains
      • Blockchain explorers
      • SocialScan explorer API doc
      • Ecosystem AI Agents
    • Dapp developers
    • User-defined Agent creators
    • AVS Operator
  • 🖥️Hemera Indexer
    • Introduction
    • Installation
      • Prerequisites
      • Install & Run
      • Export Result
    • Configurations
    • Benchmark
    • Data Class
      • Raw Data Tables
        • Blocks
        • Transactions
        • Logs
        • Traces
      • Generated Tables
        • Contract Internal Transactions
        • ERC20 Token Transfers
        • Tokens
        • ERC20 Token Holders
        • ERC721 Token Transfers
        • ERC721 Token Holders
        • ERC1155 Token Transfers
        • ERC1155 Token Holders
        • Address Coin Balances
        • Address Token Balances
        • Address Current Token Balances
        • Daily Wallet Address Stats
        • Contracts
      • Other Tables
        • Inscriptions
        • Bridges
          • L1 to L2 Transactions
          • L2 to L1 Transactions
          • Optimistic Rollup Data Availability Batches
          • Optimistic Rollup State Batches
    • Use Cases
      • UniSwap V3
        • Data Class
        • Trigger and Function
        • Run & Query
      • ENS
        • Data Class
        • Trigger and Function
        • Run & Query
      • OpenSea
        • Data Class
        • Trigger and Function
        • Run & Query
      • Deposit to L2
        • Data Class
        • Trigger and Function
        • Run & Query
      • User Profile
  • UDFs - User Defined Functions
    • Introduction
    • Components of UDFs
    • Building User Defined Functions(UDF)
    • Testing and Running UDF
    • Troubleshooting and Support
    • Supported UDFs
    • FAQs
  • 😄About us
    • The story behind building Hemera
    • Partners & Backers
    • Partnership inquiries
    • Hemera Powered Explorers
    • Active Developer Hackathons
    • Developer Contribution
  • Documentation feedback
Powered by GitBook
On this page
  • Challenges
  • What use cases is account-centric indexing addressing?
  • Real-time access to on-chain activities
  • Semantic understanding of user's on-chain activities
  1. Welcome
  2. Account Centric Indexing Protocol

Why "account-centric" indexing?

Retrieving and computing semantics out of crypto data is repetitive, complicated and expensive. Hemera Protocol abstracts away the complexity and makes the task simple.

Challenges

To have a full grasp of the complications behind programming for account-level semantic data, it is crucial to first dissect the blockchain data structures. Ethereum blockchain data can be categorized into two types of non-overlapping datasets: state, needed to build and validate new blocks; and history, necessary for syncing a node from Genesis to the latest block. State is composed of contract bytecode, contract storage, account balance (i.e. Ether balance) and account nonces. History is composed of blocks and transactions.

From these definitions, when it comes to programming for account-level semantic data, i.e. assets tracking, social graph etc., developers need to perform at least the following three types of operations touching both states and history data:

  1. Account to contract address mapping: for each account, iterate through all historical transactions and record the respective contract addresses it has transacted with, and keep this mapping updated in real-time. Since transactions are stored chronically, developers will have to first search for the raw data transaction by transaction using Remote Procedure Call (RPC) services, which is time consuming and expensive. This mapping enables operations in type 2 & 3 operations.

  2. Retrieve asset balances: each asset’s (except for Ether) current balance is stored in contract storage. If asset balance history is needed, developers need to replay and store the balance change history by iterating through transactions. Further complications exist when considering the differences in assets types and respective implications.

  3. interpret transactions' semantic meaning: this task is most time consuming and repetitive. It requires developers to have access to the deployed smart contract source code as well as traces and logs in order to interpret the functionality of each smart contract. Developers can access smart contract source code via blockchain explorers, which host the compiled and verified smart contract code alongside the contract bytecode on-chain. Third-party developers would invest additional time and efforts to parse smart contracts, as they need to delve into trace and log data. One could imagine that blockchain explorers transform into interfaces where contract developers submit adapters to help third party developers interpret their contracts. This is crucial, as without this capability, basic metrics such as portfolio net worth or profit and loss (P&L) may be inaccurately calculated.

In today’s modular blockchain ecosystem, with the emergence of more rollups, high-performance chains, and Danksharding to continuously scale the EVM ecosystem, account-level data becomes fragmented across multiple blockchains. As a result, Dapp developers often find themselves reinventing the wheel, compelled to build programmable indexers from scratch in-house.

What use cases is account-centric indexing addressing?

Developers who are building applications that need access to end users' on-chain activities need account-centric indexing. The use cases can be broadly categorized as follows:

  1. Real-time (or as fast as blockchains' block time is) access to on-chain activities

  2. Semantic understanding of user's on-chain activities

Real-time access to on-chain activities

User-facing applications often build product features based on users' on-chain activities.

Wallet applications need to provide essential portfolio management features for better user experience; Web3 social applications rely on on-chain records to foster trust among users; Quest-based applications incentivize users' on-chain actions both in-app and outside of app for calculated rewards.

Semantic understanding of user's on-chain activities

Web3 user-facing builders often find themselves wondering about their community, figuring and rewarding the most loyal users, performing the airdrops properly etc. Yet none of this is possible without being able to extract semantics beyond raw on-chain transaction records.

PreviousWhat is Account-Centric Indexing?NextThe advantages of Account-Centric Indexing

Last updated 8 months ago

👋