We support balances for the following asset types:

Asset TypeDescription
FungibleFungible assets models contains erc20 tokens and native (gas) token.
NativeNative tokens are the gas tokens of the blockchain, such as ETH, BNB, POL, AVAX, etc.
ERC20ERC20 tokens are the tokens that follow the ERC20 standard, such as USDC, USDT, etc.
ERC721ERC721 tokens are the tokens that follow the ERC721 standard, such as Pudgy Penguins, etc.
ERC1155ERC1155 tokens are the tokens that follow the ERC1155 standard, such as OpenSea Collection StoreFront, etc.

Balance Tracking Methodology

Asset TypeMethodology
Fungible (ERC20 & Native)We detect balance-changing events (transfers, mints, burns) and fetch balance at each relevant block height directly from the blockchain and index it into the balances table.
Non-Fungible (ERC721 & ERC1155)We track transfers through standard events: ERC721: Transfer() events and ERC1155: TransferSingle() and TransferBatch() events. From there, we build credit-debit tables to calculate cumulative ownership, accounting for multiple token transfers.

Precision Handling

To maintain numerical precision, especially for tokens with large supplies or many decimal places:

  1. Raw balances are stored as VARCHAR to preserve exact values.
  2. Normalized balances are calculated using high-precision arithmetic with custom Snowflake UDFs.
  3. Both raw and human-readable balances are provided.

This approach ensures:

  • No loss of precision from floating-point arithmetic.
  • Accurate balance tracking over time.
  • Reliable historical data for analysis.