Skip to main content
Schema: 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_tokens for symbol/decimals
  • Joins price data for USD value calculations
  • Links to core.fact_transaction_blocks via tx_digest
  • Links to core.fact_checkpoints via checkpoint_number

Commonly-used Fields

  • tx_digest, event_index: Unique identifiers for each swap event
  • platform_name: DEX protocol name for cross-protocol analysis
  • platform_address: Smart contract address of the DEX
  • pool_address: Liquidity pool identifier
  • trader_address: Address executing the swap
  • token_in_symbol, token_out_symbol: User-friendly token symbols
  • amount_in, amount_out: Decimal-adjusted swap amounts
  • amount_in_usd, amount_out_usd, swap_volume_usd: USD values
  • block_timestamp: Primary field for time-series analysis

Columns

Column NameData TypeDescription
CHECKPOINT_NUMBERNUMBERSequential checkpoint identifier where this swap occurred.
Data type: Integer Example:
  • 12345678
  • 98765432
Business Context:
  • 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.
Data type: Timestamp Example:
  • 2023-05-15 14:30:25.123456
Business Context:
  • 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.
Data type: String Example:
  • 8vKzD3qFqE9yH2wN1xR5tB7aL4mP6sC3jG9kF1nV8xT2
Business Context:
  • 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.
Data type: Integer Example:
  • 0 (first swap in transaction)
  • 1 (second swap in transaction)
  • 3 (fourth swap in transaction)
Business Context:
  • 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.
Data type: String Example:
  • 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb (Cetus)
Business Context:
  • 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.
Data type: String Example:
  • Cetus
  • Turbos
  • Bluefin
  • Aftermath
  • FlowX
  • DeepBook
  • Momentum
Business Context:
  • 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.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • 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.
Data type: String Example:
  • SUI/USDC
  • CETUS/SUI
Business Context:
  • 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.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • 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.
Data type: String Example:
  • 0x2::sui::SUI
  • 0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN
Business Context:
  • 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.
Data type: String Example:
  • SUI
  • USDC
  • CETUS
Business Context:
  • 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.
Data type: Integer Example:
  • 9 (SUI)
  • 6 (USDC)
Business Context:
  • 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.
Data type: Decimal Example:
  • 1.50
  • 0.99
  • null (if price unavailable)
Business Context:
  • 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.
Data type: String Example:
  • 0x2::sui::SUI
  • 0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN
Business Context:
  • 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.
Data type: String Example:
  • SUI
  • USDC
  • CETUS
Business Context:
  • 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.
Data type: Integer Example:
  • 9 (SUI)
  • 6 (USDC)
Business Context:
  • 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.
Data type: Decimal Example:
  • 1.50
  • 0.99
  • null (if price unavailable)
Business Context:
  • 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.
Data type: Integer Example:
  • 1000000000 (for 1 SUI with 9 decimals)
  • 1500000 (for 1.5 USDC with 6 decimals)
Business Context:
  • 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.
Data type: Decimal Example:
  • 1.0
  • 1.5
  • 100.5
Business Context:
  • 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.
Data type: Decimal Example:
  • 1.50
  • 100.00
  • null (if price unavailable)
Business Context:
  • 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.
Data type: Integer Example:
  • 1000000000 (for 1 SUI with 9 decimals)
  • 1500000 (for 1.5 USDC with 6 decimals)
Business Context:
  • 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.
Data type: Decimal Example:
  • 1.0
  • 1.5
  • 100.5
Business Context:
  • 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.
Data type: Decimal Example:
  • 1.50
  • 100.00
  • null (if price unavailable)
Business Context:
  • 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).
Data type: Decimal Example:
  • 1.50
  • 100.00
  • null (if price unavailable)
Business Context:
  • 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).
Data type: Integer Example:
  • 3000 (0.3% fee)
  • 10000 (1% fee)
Business Context:
  • 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.
Data type: Boolean Example:
  • true
  • false
Business Context:
  • Technical field for understanding pool mechanics.
  • Used for price impact calculations.
  • Enables directional swap analysis. | | PARTNER_ADDRESS | TEXT | Affiliate/partner contract address if applicable.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
  • null
Business Context:
  • 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).
Data type: Integer Example:
  • 1 (direct swap)
  • 2 (one intermediary token)
  • 3 (two intermediary tokens)
Business Context:
  • 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.
Data type: Integer Example:
  • 0
  • 1
  • 2
Business Context:
  • 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.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for data integrity.
  • Critical for join operations.
  • Enables precise data retrieval. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the row was inserted.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • 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.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for update tracking.
  • Critical for data quality monitoring.
  • Enables change detection. |