sui.defi Table: ez_dex_swaps Type: Base Table
Description
This table provides comprehensive cross-protocol DEX swap activity with token pricing, metadata, and user labeling from major Sui DEX protocols including Cetus, Turbos, Bluefin, Aftermath, FlowX, DeepBook, and Momentum. It combines raw swap events with token metadata (symbols, decimals) and price information, providing decimal-adjusted amounts and USD values ideal for DeFi analytics and reporting.Data Coverage
Full Historical Coverage: This table contains complete DEX swap data from May 2023 through
the present, with 91.3M rows of swap history across all supported protocols.
Key Use Cases
- Cross-protocol DeFi volume analysis and market share comparison
 - Token pair trading volume and liquidity analysis
 - Trader behavior analysis and wallet clustering
 - Fee revenue analysis and protocol economics modeling
 - DEX aggregation and routing analysis
 - Price impact and slippage monitoring
 - Protocol adoption tracking and ecosystem growth analysis
 
Important Relationships
- Sources raw swap events from 
core.fact_events(filtered by DEX protocols) - Joins token metadata from 
core.dim_tokensfor symbol/decimals - Joins price data for USD value calculations
 - Links to 
core.fact_transaction_blocksviatx_digest - Links to 
core.fact_checkpointsviacheckpoint_number 
Commonly-used Fields
tx_digest,event_index: Unique identifiers for each swap eventplatform_name: DEX protocol name for cross-protocol analysisplatform_address: Smart contract address of the DEXpool_address: Liquidity pool identifiertrader_address: Address executing the swaptoken_in_symbol,token_out_symbol: User-friendly token symbolsamount_in,amount_out: Decimal-adjusted swap amountsamount_in_usd,amount_out_usd,swap_volume_usd: USD valuesblock_timestamp: Primary field for time-series analysis
Columns
| Column Name | Data Type | Description | 
|---|---|---|
| CHECKPOINT_NUMBER | NUMBER | Sequential checkpoint identifier where this swap occurred. | 
- 12345678
 - 98765432
 
- Primary identifier for linking to checkpoint-level analysis.
 - Essential for checkpoint-based filtering and aggregation.
 - Enables correlation to consensus milestones. | | BLOCK_TIMESTAMP | TIMESTAMP_NTZ | The date and time at which the swap was finalized on the Sui blockchain.
 
- 2023-05-15 14:30:25.123456
 
- Primary field for time-series analysis and temporal filtering of swap activity.
 - Essential for trend analysis, volume calculations, and historical comparisons.
 - Enables time-based grouping and aggregation for analytics and reporting. | | TX_DIGEST | TEXT | 32-byte cryptographic transaction hash (Base58) identifying the transaction containing this swap.
 
- 8vKzD3qFqE9yH2wN1xR5tB7aL4mP6sC3jG9kF1nV8xT2
 
- Primary identifier for linking swaps to transaction context.
 - Essential for transaction verification and correlation.
 - Enables joining with transfers and other transaction data. | | EVENT_INDEX | NUMBER | Zero-based sequential index of this swap event within the transaction.
 
- 0 (first swap in transaction)
 - 1 (second swap in transaction)
 - 3 (fourth swap in transaction)
 
- Essential for uniquely identifying swaps within multi-swap transactions.
 - Critical for routing analysis and multi-hop swap tracking.
 - Enables precise swap sequencing. | | PLATFORM_ADDRESS | TEXT | Smart contract address of the DEX protocol.
 
- 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb (Cetus)
 
- Essential for protocol identification and verification.
 - Critical for protocol-specific analytics and filtering.
 - Enables protocol adoption tracking. | | PLATFORM_NAME | TEXT | Human-readable name of the DEX platform.
 
- Cetus
 - Turbos
 - Bluefin
 - Aftermath
 - FlowX
 - DeepBook
 - Momentum
 
- Used for user-friendly protocol displays and reports.
 - Enables cross-protocol comparisons and market share analysis.
 - Supports protocol ecosystem analytics. | | POOL_ADDRESS | TEXT | Liquidity pool contract identifier where the swap occurred.
 
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
 
- Essential for pool-specific analytics and liquidity tracking.
 - Critical for identifying trading pairs and liquidity depth.
 - Enables pool performance analysis. | | POOL_NAME | TEXT | Human-readable name or identifier for the liquidity pool.
 
- SUI/USDC
 - CETUS/SUI
 
- Used for user-friendly pool identification in reports.
 - Enables pool-based filtering and comparison.
 - Supports liquidity analytics and pool tracking. | | TRADER_ADDRESS | TEXT | Sui address that initiated the swap transaction.
 
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
 
- Essential for trader behavior analysis and wallet tracking.
 - Critical for user cohort analysis and trading pattern recognition.
 - Enables address-based filtering and user analytics. | | TOKEN_IN_TYPE | TEXT | Full Move type identifier of the input token.
 
- 0x2::sui::SUI
 - 0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN
 
- Essential for token-specific filtering and analysis.
 - Critical for linking to token metadata and pricing.
 - Enables token flow tracking. | | TOKEN_IN_SYMBOL | TEXT | User-friendly symbol for the input token.
 
- SUI
 - USDC
 - CETUS
 
- Used for user-friendly displays and reports.
 - Enables token-based filtering and grouping.
 - Supports cross-token swap analysis. | | TOKEN_IN_DECIMALS | NUMBER | Decimal places for the input token.
 
- 9 (SUI)
 - 6 (USDC)
 
- Critical for converting raw amounts to decimal-adjusted values.
 - Essential for accurate value calculations.
 - Enables proper amount normalization. | | TOKEN_IN_PRICE | FLOAT | Price per unit of input token in USD at swap time.
 
- 1.50
 - 0.99
 - null (if price unavailable)
 
- Essential for USD value calculations.
 - Critical for value-based analytics.
 - Enables financial reporting in USD terms. | | TOKEN_OUT_TYPE | TEXT | Full Move type identifier of the output token.
 
- 0x2::sui::SUI
 - 0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN
 
- Essential for token-specific filtering and analysis.
 - Critical for linking to token metadata and pricing.
 - Enables token flow tracking. | | TOKEN_OUT_SYMBOL | TEXT | User-friendly symbol for the output token.
 
- SUI
 - USDC
 - CETUS
 
- Used for user-friendly displays and reports.
 - Enables token-based filtering and grouping.
 - Supports cross-token swap analysis. | | TOKEN_OUT_DECIMALS | NUMBER | Decimal places for the output token.
 
- 9 (SUI)
 - 6 (USDC)
 
- Critical for converting raw amounts to decimal-adjusted values.
 - Essential for accurate value calculations.
 - Enables proper amount normalization. | | TOKEN_OUT_PRICE | FLOAT | Price per unit of output token in USD at swap time.
 
- 1.50
 - 0.99
 - null (if price unavailable)
 
- Essential for USD value calculations.
 - Critical for value-based analytics.
 - Enables financial reporting in USD terms. | | AMOUNT_IN_RAW | NUMBER | Input token quantity before decimal adjustment.
 
- 1000000000 (for 1 SUI with 9 decimals)
 - 1500000 (for 1.5 USDC with 6 decimals)
 
- Essential for reconstructing exact on-chain swap values.
 - Used for technical audits and precise calculations.
 - Enables accurate volume tracking. | | AMOUNT_IN | FLOAT | Decimal-adjusted amount of input tokens.
 
- 1.0
 - 1.5
 - 100.5
 
- Used for financial analysis and user-friendly reporting.
 - Enables value-based calculations.
 - Supports dashboards and analytics. | | AMOUNT_IN_USD | FLOAT | USD value of the input token amount.
 
- 1.50
 - 100.00
 - null (if price unavailable)
 
- Used for financial analysis in USD terms.
 - Enables value-based volume tracking.
 - Supports revenue and economics analysis. | | AMOUNT_OUT_RAW | NUMBER | Output token quantity before decimal adjustment.
 
- 1000000000 (for 1 SUI with 9 decimals)
 - 1500000 (for 1.5 USDC with 6 decimals)
 
- Essential for reconstructing exact on-chain swap values.
 - Used for technical audits and precise calculations.
 - Enables accurate volume tracking. | | AMOUNT_OUT | FLOAT | Decimal-adjusted amount of output tokens.
 
- 1.0
 - 1.5
 - 100.5
 
- Used for financial analysis and user-friendly reporting.
 - Enables value-based calculations.
 - Supports dashboards and analytics. | | AMOUNT_OUT_USD | FLOAT | USD value of the output token amount.
 
- 1.50
 - 100.00
 - null (if price unavailable)
 
- Used for financial analysis in USD terms.
 - Enables value-based volume tracking.
 - Supports revenue and economics analysis. | | SWAP_VOLUME_USD | FLOAT | Total USD value of the swap (typically average of in/out USD values).
 
- 1.50
 - 100.00
 - null (if price unavailable)
 
- Primary metric for swap volume analysis.
 - Essential for protocol comparison and market share.
 - Critical for DEX ecosystem analytics. | | FEE_AMOUNT_RAW | NUMBER | Protocol and LP fees charged (before decimal adjustment).
 
- 3000 (0.3% fee)
 - 10000 (1% fee)
 
- Essential for fee revenue analysis.
 - Critical for protocol economics modeling.
 - Enables fee comparison across protocols. | | A_TO_B | BOOLEAN | Boolean swap direction flag indicating token ordering in the pool.
 
- true
 - false
 
- Technical field for understanding pool mechanics.
 - Used for price impact calculations.
 - Enables directional swap analysis. | | PARTNER_ADDRESS | TEXT | Affiliate/partner contract address if applicable.
 
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
 - null
 
- Essential for affiliate program tracking.
 - Critical for partnership revenue analysis.
 - Enables partner performance monitoring. | | STEPS | NUMBER | Number of routing hops in the swap (1 for direct swaps, >1 for multi-hop).
 
- 1 (direct swap)
 - 2 (one intermediary token)
 - 3 (two intermediary tokens)
 
- Essential for routing analysis and optimization.
 - Critical for understanding swap complexity.
 - Enables multi-hop swap tracking. | | SWAP_INDEX | NUMBER | Sequential swap number within the transaction.
 
- 0
 - 1
 - 2
 
- Essential for ordering swaps within transactions.
 - Critical for multi-swap transaction analysis.
 - Enables swap sequence tracking. | | DEX_SWAPS_ID | TEXT | Unique primary key identifier for each row.
 
- 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
 
- Essential for data integrity.
 - Critical for join operations.
 - Enables precise data retrieval. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the row was inserted.
 
- 2024-01-15 14:30:25.123456
 
- Essential for data lineage tracking.
 - Critical for data freshness monitoring.
 - Enables pipeline performance analysis. | | MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the row was last modified.
 
- 2024-01-15 14:30:25.123456
 
- Essential for update tracking.
 - Critical for data quality monitoring.
 - Enables change detection. |