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_tokensfor symbol/decimals - Joins price data from
price.ez_prices_hourlyfor USD values - Can be related to bridge activity in
defi.ez_bridge_activityfor cross-protocol analysis
Commonly-used Fields
tx_hash,event_index: Unique identifiers for each swap eventplatform: DEX protocol namesymbol_in,symbol_out: Token symbols for swap input/outputamount_in,amount_out: Decimal-adjusted swap amountsamount_in_usd,amount_out_usd: USD value of swap amountsswapper: Address of the user executing the swapblock_timestamp: Time of the swap event
Columns
| Column Name | Data Type | Description |
|---|---|---|
| BLOCK_NUMBER | NUMBER | Also 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. |
- 12345678
- 98765432
- 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.
- 2024-01-15 14:30:25.123456
- 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.
- 0 (genesis transaction)
- 12345678
- 98765432
- 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.
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
- 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.
- 0 (first event in transaction)
- 1 (second event in transaction)
- 5 (sixth event in transaction)
- 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.
- PancakeSwap
- Uniswap
- SushiSwap
- 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.
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
- 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.
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
- 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.
- USDC
- WETH
- APT
- 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.
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
- 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.
- USDC
- WETH
- APT
- 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.
- 1500000 (for 1.5 tokens with 6 decimals)
- 1000000000000000000 (for 1 token with 18 decimals)
- 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.
- 1.5 (for 1.5 tokens)
- 100.0 (for 100 tokens)
- 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.
- 1500.00 (for $1,500 worth of tokens)
- 0.50 (for $0.50 worth of tokens)
- 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.
- 1500000 (for 1.5 tokens with 6 decimals)
- 1000000000000000000 (for 1 token with 18 decimals)
- 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.
- 1.5 (for 1.5 tokens)
- 100.0 (for 100 tokens)
- 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.
- 1500.00 (for $1,500 worth of tokens)
- 0.50 (for $0.50 worth of tokens)
- 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.
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
- 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.
- 2024-01-15 14:30:25.123456
- 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.
- 2024-01-15 14:30:25.123456
- 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. |