Skip to main content
Schema: aptos.defi Table: ez_dex_swaps Type: Base Table

Description

This table provides enriched DEX swap data for Aptos, combining raw on-chain swap events from multiple protocols with token metadata (symbols, decimals) and price information. It includes decimal-adjusted amounts, token symbols, and USD values, making it suitable for analytics and reporting.

Key Use Cases

  • Analyzing DEX trading volumes and protocol market share in USD
  • Building dashboards for token flows, swap trends, and user activity
  • Comparing swap activity across protocols and tokens
  • Supporting DeFi research, trading strategies, and liquidity analysis
  • Powering downstream models for DeFi aggregations and reporting

Important Relationships

  • Sources raw swap data from defi.fact_dex_swaps
  • Joins token metadata from core.dim_tokens for symbol/decimals
  • Joins price data from price.ez_prices_hourly for USD values
  • Can be related to bridge activity in defi.ez_bridge_activity for cross-protocol analysis

Commonly-used Fields

  • tx_hash, event_index: Unique identifiers for each swap event
  • platform: DEX protocol name
  • symbol_in, symbol_out: Token symbols for swap input/output
  • amount_in, amount_out: Decimal-adjusted swap amounts
  • amount_in_usd, amount_out_usd: USD value of swap amounts
  • swapper: Address of the user executing the swap
  • block_timestamp: Time of the swap event

Columns

Column NameData TypeDescription
BLOCK_NUMBERNUMBERAlso known as block height. The block number indicates the position of a block in the blockchain, increasing sequentially after the addition of each new block.
Data type: Integer Example:
  • 12345678
  • 98765432
Business Context:
  • Primary identifier for ordering and filtering blockchain data chronologically.
  • Essential for block-level analysis and network growth tracking.
  • Enables correlation of transactions, transfers, and events to specific blocks. | | BLOCK_TIMESTAMP | TIMESTAMP_NTZ | The date and time at which the block was produced on the Aptos blockchain.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Primary field for time-series analysis and temporal filtering of blockchain activity.
  • Essential for trend analysis, volume calculations, and historical comparisons.
  • Enables time-based grouping and aggregation for analytics and reporting. | | VERSION | NUMBER | The version number, also known as the height, represents the sequential position of a transaction in the Aptos blockchain. The first transaction has a version of 0, and each subsequent transaction increments by 1.
Data type: Integer Example:
  • 0 (genesis transaction)
  • 12345678
  • 98765432
Business Context:
  • Unique identifier for ordering transactions chronologically across the entire blockchain.
  • Essential for transaction sequencing and version-based analysis.
  • Enables precise transaction tracking and blockchain state verification. | | TX_HASH | TEXT | Transaction hash is a unique 66-character identifier that is generated when a transaction is executed on the Aptos blockchain.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Primary identifier for linking transaction data across all related tables.
  • Essential for transaction verification and blockchain explorer lookups.
  • Enables correlation of transfers, events, and state changes to specific transactions. | | EVENT_INDEX | NUMBER | Unique identifier for an event within a transaction, representing the sequential order of events emitted during transaction execution.
Data type: Integer Example:
  • 0 (first event in transaction)
  • 1 (second event in transaction)
  • 5 (sixth event in transaction)
Business Context:
  • Essential for determining the chronological order of events within a transaction.
  • Critical for event correlation and transaction flow analysis.
  • Enables precise event sequencing and debugging of complex transactions. | | PLATFORM | TEXT | The name of the platform where the swap occurred.
Data type: String Example:
  • PancakeSwap
  • Uniswap
  • SushiSwap
Business Context:
  • Used for identifying and analyzing DEX platform usage.
  • Enables platform-level analytics, volume tracking, and protocol comparisons.
  • Supports DEX ecosystem analysis and user behavior insights. | | EVENT_ADDRESS | TEXT | | | SWAPPER | TEXT | Address that initiated the swap.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Used for tracking swap users and their trading activity.
  • Enables user-level analytics, trading patterns, and swapper behavior analysis.
  • Supports linking to address labels and user profiles. | | TOKEN_IN | TEXT | The address of the inbound token in the swap.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Used for identifying input tokens and their swap activity.
  • Enables token-level analytics, volume tracking, and cross-token analysis.
  • Supports DEX ecosystem monitoring and token flow visualization. | | TOKEN_IN_IS_VERIFIED | BOOLEAN | A flag indicating if the asset has been verified by the Flipside team. | | SYMBOL_IN | TEXT | The token symbol for the inbound token in the swap.
Data type: String Example:
  • USDC
  • WETH
  • APT
Business Context:
  • Used for user-friendly analytics, reporting, and dashboards.
  • Enables token-level filtering, grouping, and visualization.
  • Supports cross-token comparisons and swap analysis. | | TOKEN_OUT | TEXT | The address of the outbound token in the swap.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Used for identifying output tokens and their swap activity.
  • Enables token-level analytics, volume tracking, and cross-token analysis.
  • Supports DEX ecosystem monitoring and token flow visualization. | | TOKEN_OUT_IS_VERIFIED | BOOLEAN | A flag indicating if the asset has been verified by the Flipside team. | | SYMBOL_OUT | TEXT | The token symbol for the outbound token in the swap.
Data type: String Example:
  • USDC
  • WETH
  • APT
Business Context:
  • Used for user-friendly analytics, reporting, and dashboards.
  • Enables token-level filtering, grouping, and visualization.
  • Supports cross-token comparisons and swap analysis. | | AMOUNT_IN_UNADJ | NUMBER | The non-decimal adjusted amount of the inbound token for the swap.
Data type: Integer Example:
  • 1500000 (for 1.5 tokens with 6 decimals)
  • 1000000000000000000 (for 1 token with 18 decimals)
Business Context:
  • Essential for reconstructing the exact on-chain value of swap inputs.
  • Used for technical audits, protocol analytics, and downstream decimal adjustment.
  • Enables accurate calculation of swap volumes and liquidity flows. | | AMOUNT_IN | FLOAT | The decimal-adjusted amount of the inbound token for the swap.
Data type: Decimal Example:
  • 1.5 (for 1.5 tokens)
  • 100.0 (for 100 tokens)
Business Context:
  • Used for financial analysis, reporting, and user-friendly analytics.
  • Enables value-based calculations and cross-token comparisons.
  • Supports dashboards and business intelligence for DEX platforms. | | AMOUNT_IN_USD | FLOAT | The USD value of the inbound token amount, converted at the time of the swap.
Data type: Decimal Example:
  • 1500.00 (for $1,500 worth of tokens)
  • 0.50 (for $0.50 worth of tokens)
Business Context:
  • Used for financial analysis and reporting of swap volumes in USD terms.
  • Enables value-based analytics and aggregation of swap volumes in USD.
  • Supports dashboards and business intelligence for DEX platforms. | | AMOUNT_OUT_UNADJ | NUMBER | The non-decimal adjusted amount of the outbound token for the swap.
Data type: Integer Example:
  • 1500000 (for 1.5 tokens with 6 decimals)
  • 1000000000000000000 (for 1 token with 18 decimals)
Business Context:
  • Essential for reconstructing the exact on-chain value of swap outputs.
  • Used for technical audits, protocol analytics, and downstream decimal adjustment.
  • Enables accurate calculation of swap volumes and liquidity flows. | | AMOUNT_OUT | FLOAT | The decimal-adjusted amount of the outbound token for the swap.
Data type: Decimal Example:
  • 1.5 (for 1.5 tokens)
  • 100.0 (for 100 tokens)
Business Context:
  • Used for financial analysis, reporting, and user-friendly analytics.
  • Enables value-based calculations and cross-token comparisons.
  • Supports dashboards and business intelligence for DEX platforms. | | AMOUNT_OUT_USD | FLOAT | The USD value of the outbound token amount, converted at the time of the swap.
Data type: Decimal Example:
  • 1500.00 (for $1,500 worth of tokens)
  • 0.50 (for $0.50 worth of tokens)
Business Context:
  • Used for financial analysis and reporting of swap volumes in USD terms.
  • Enables value-based analytics and aggregation of swap volumes in USD.
  • Supports dashboards and business intelligence for DEX platforms. | | EZ_DEX_SWAPS_ID | TEXT | The unique primary key identifier for each row in the table, ensuring data integrity and uniqueness.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for data integrity and unique row identification.
  • Critical for join operations and data relationship management.
  • Enables precise data retrieval and referential integrity maintenance. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the row was inserted into the table, representing when the data was first recorded.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for data lineage tracking and insertion timing analysis.
  • Critical for understanding data freshness and processing delays.
  • Enables data quality analysis and processing performance monitoring. | | MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the row was last modified, representing when the data was most recently updated.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for data freshness analysis and update tracking.
  • Critical for understanding data modification patterns and change frequency.
  • Enables data quality monitoring and update performance analysis. |