| TX_ID | TEXT | The unique identifier (hash) for a transaction on the Flow blockchain. Data type: STRING. Each transaction is assigned a cryptographic hash that ensures its uniqueness and immutability. Used for joining transaction data across tables, tracing transaction execution, and verifying transaction integrity. Example: âe3f1c2d4âŚâ. Essential for transaction-level analytics, debugging, and cross-referencing with block and event data. |
| BLOCK_TIMESTAMP | TIMESTAMP_NTZ | The timestamp (in UTC) when the block or transaction was recorded on the Flow blockchain. Data type: TIMESTAMP_NTZ. This field is essential for time-series analysis, ordering events, and joining with other tables by time. For example, a block with block_height 100,000 may have a block_timestamp of â2023-01-01 12:00:00â. Used for analytics on network activity, transaction throughput, and historical state reconstruction. |
| BLOCK_HEIGHT | NUMBER | Block height is the unique, sequential integer assigned to each block as it is added to the Flow blockchain. It serves as the primary identifier for block ordering and is used to reference the position of a block within the chain. Data type: INTEGER. Block height is essential for joining block, transaction, and event tables, and for analyzing blockchain growth over time. For example, block height 100,000 refers to the 100,000th block produced on Flow. This field is critical for time-series analytics, chain reorganization analysis, and historical state reconstruction. |
| CONTRACT_ADDRESS | TEXT | The smart contract address of the DEX swap pool or liquidity pool involved in the transaction. Data type: STRING. This field identifies the specific contract facilitating the swap, which is essential for protocol attribution, pool-level analytics, and tracing liquidity movements. For Metapier swaps, all pools may use the same master contract (e.g., âA.609e10301860b683.PierPairâ), so the âpool_idâ is required to differentiate between pools. Example: âA.609e10301860b683.PierPairâ for Metapier, or a unique contract address for other DEXs. Important for understanding liquidity routing, protocol usage, and swap path analysis. |
| SWAP_INDEX | NUMBER | The position of the swap within a transaction, indicating the order of execution in multi-hop or multi-pool swaps. Data type: NUMBER (integer). The first swap in a transaction is indexed at 0. If a transaction routes through multiple pools, each swap is assigned an incrementing index (e.g., 0, 1, 2). Used to reconstruct swap paths, analyze routing strategies, and understand complex DeFi trades. Example: A single-pool swap has swap_index 0; a two-pool route has swaps with indices 0 and 1. Important for path analysis, DEX routing analytics, and multi-hop trade reconstruction. |
| TRADER | TEXT | The account address of the trader performing the swap action. |
| PLATFORM | TEXT | The name of the protocol, platform, or DEX where the event (swap, trade, or other DeFi action) occurred. Data type: STRING. Used to attribute activity to a specific protocol (e.g., âbloctoâ, âmetapierâ, âtopshot_marketplaceâ) for analytics, filtering, and reporting. This field is essential for protocol-level analysis, market share tracking, and understanding user behavior across DeFi platforms. Example: âbloctoâ for BloctoSwap, âmetapierâ for Metapier DEX. Important for protocol attribution, competitive analysis, and cross-platform comparisons. |
| ORIGIN_FROM_ADDRESS | TEXT | The address from which the token is withdrawn (âtoken outâ) in a DEX swap. Data type: STRING. For the first swap in a transaction, this is typically the traderâs address; for subsequent swaps in a multi-hop route, it may be a pool address. Used to trace token flow and participant roles in swaps. Example: â0x1cf0e2f2f715450â (trader) or a pool address for later hops. Important for swap path analysis and wallet attribution. |
| TOKEN_OUT | TEXT | The smart contract address for the token being swapped out of the traderâs wallet (or previous pool) in a DEX swap. Data type: STRING. Used to identify the specific token being sent out, supporting token-level analytics and swap path tracing. Example: âA.1654653399040a61.FlowTokenâ. Directionality is always from the trader to the pool or next hop in multi-pool swaps. |
| TOKEN_OUT_SYMBOL | TEXT | Short-name symbol for the crypto token or asset, such as âFLOWâ, âUSDCâ, or âBLTâ. Data type: STRING. Used to identify the asset in analytics, dashboards, and reporting. This field is critical for token-level analysis, price lookups, and filtering. Example: âFLOWâ for Flowâs native token, âUSDCâ for USD Coin. Important for user-facing analytics, protocol attribution, and cross-chain comparisons. |
| AMOUNT_OUT | FLOAT | The amount of tokens sent out from the traderâs wallet (or previous pool) in a DEX swap. Data type: NUMBER (decimal adjusted). Represents the quantity of the âoutâ token in the swap, from the traderâs perspective. Used for volume analysis, price impact, and swap path tracing. Example: 50.0 (for 50 tokens swapped out). Directionality is always from the trader to the pool or next hop in multi-pool swaps. |
| AMOUNT_OUT_USD | FLOAT | The value of the amount field denominated in US dollars, based on available pricing data at the time of the transaction. Data type: NUMBER (decimal adjusted). Used for financial analysis, protocol revenue tracking, and cross-chain comparisons. Example: 100.25 (for $100.25 USD). This field is essential for normalizing value across different tokens and blockchains, enabling USD-based analytics and dashboards. Important for DeFi analytics, cost analysis, and protocol performance measurement. |
| ORIGIN_TO_ADDRESS | TEXT | The address receiving the token being swapped in (âtoken inâ) during a DEX swap. Data type: STRING. For the initial deposit, this is typically the pool address; for the final swap, it is usually the traderâs address. Used to trace token flow, swap completion, and participant roles. Example: pool address for intermediate hops, trader address for final destination. Important for swap path analysis and wallet attribution. |
| TOKEN_IN | TEXT | The smart contract address for the token that is being swapped into the traders wallet. |
| Token OUT / IN is from the perspective of the trader. So, an out token is leaving the wallet while the in token is being deposited to the wallet. This perspective is not changing for multi-pool trades - think of it directionally, the tokens continue flowing from out to in. Out of wallet, into pool, out of pool, into (another pool / wallet), with the final movement being tokens into final wallet. | | |
| TOKEN_IN_SYMBOL | TEXT | Short-name symbol for the crypto token or asset, such as âFLOWâ, âUSDCâ, or âBLTâ. Data type: STRING. Used to identify the asset in analytics, dashboards, and reporting. This field is critical for token-level analysis, price lookups, and filtering. Example: âFLOWâ for Flowâs native token, âUSDCâ for USD Coin. Important for user-facing analytics, protocol attribution, and cross-chain comparisons. |
| AMOUNT_IN | FLOAT | The amount of tokens received by the trader (or next pool) in a DEX swap. Data type: NUMBER (decimal adjusted). Represents the quantity of the âinâ token in the swap, from the traderâs perspective. Used for volume analysis, price impact, and swap path tracing. Example: 49.5 (for 49.5 tokens received). Directionality is always from the pool to the trader or next hop in multi-pool swaps. |
| AMOUNT_IN_USD | FLOAT | The value of the amount field denominated in US dollars, based on available pricing data at the time of the transaction. Data type: NUMBER (decimal adjusted). Used for financial analysis, protocol revenue tracking, and cross-chain comparisons. Example: 100.25 (for $100.25 USD). This field is essential for normalizing value across different tokens and blockchains, enabling USD-based analytics and dashboards. Important for DeFi analytics, cost analysis, and protocol performance measurement. |
| EZ_DEX_SWAPS_ID | TEXT | pk_id is a surrogate primary key, uniquely generated for each row in the table. Data type: STRING or INTEGER (implementation-specific). This field ensures every record is uniquely identifiable, even if the source data lacks a natural primary key. Used for efficient joins, deduplication, and as a reference in downstream models. Example: an auto-incremented integer or a UUID string. Essential for maintaining data integrity and supporting dbt tests for uniqueness. |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the record was first created and inserted into this table. Data type: TIMESTAMP_NTZ. Used for ETL auditing, tracking data freshness, and identifying when data was loaded or updated in the analytics pipeline. Example: â2023-01-01 12:00:00â. This field is critical for monitoring data latency, troubleshooting ETL issues, and supporting recency tests in dbt. |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when this record was last updated or modified by an internal ETL or dbt process. Data type: TIMESTAMP_NTZ. Used for change tracking, ETL auditing, and identifying the most recent update to a record. Example: â2023-01-02 15:30:00â. This field is important for troubleshooting data issues, monitoring pipeline health, and supporting recency or freshness tests in dbt. |