Thecrosschain.dex.trades table aggregates DEX trades indexed by Allium across multiple blockchains (EVM and non-EVM) into a single table.

The crosschain.dex.trades_evm table aggregates DEX trades on EVM-compatible blockchain. This model includes EVM-specific fee details (e.g. priority fees) that are not found on non-EVM chains.

Blockchain Coverage

This table currently does not contain aggregator swaps to avoid double-counting volume.

The dex trades table only contains swap events/instructions from DEXs with liquidity pools/vaults.

For example, suppose a DEX swap was executed by an aggregator (e.g. Openocean or 0x) and routed to liquidity pools on Uniswap and Balancer, only the volume on Uniswap and Balancer is included dex.trades.

Sample Query

Query DEX Volume and Users Across Blockchains indexed by Allium in the last 90 days.

select

    date(block_timestamp) as date,

    chain,

    sum(usd_amount) as usd_volume,

    count(distinct transaction_from_address) as traders

from crosschain.dex.trades

where block_timestamp >= current_timestamp - interval '90 days'

group by all

Table Columns

For blockchains (e.g. Solana) that are not EVM-compatible, the additional fields only relevant to these chains (e.g. Signer for Solana) are added and appended at the end of this table.

Column NameDescription
chainBlockchain where the dex trade was executed.
projectName of the project e.g. uniswap, balancer, curve, sushiswap, pancakeswap, fraxswap.
protocolVersion of the protocol used e.g. uniswap_v2, uniswap_v3, balancer_v1, balancer_v2, curve_v1, curve_v2
liquidity_pool_addressContract address of the liquidity pool holding the asset.
sender_addressAddress of the sender of the swap event log, which can be the Router.
to_addressAddress of the recipient of the swap event.
token_bought_addressToken address of the token bought, i.e. the asset acquired from the trade.
token_bought_nameName of the token bought.
token_bought_symbolSymbol of the token bought.
token_sold_addressAddress of the token sold.
token_sold_nameName of the token sold.
token_sold_symbolSymbol of the token sold.
token_bought_amount_rawAmount of token bought (not divided by the number of decimals).
token_bought_amounttoken_bought_amount_raw divided by the number of decimals of the token.
token_sold_amount_rawAmount of token sold (not divided by the number of decimals).
token_sold_amounttoken_sold_amount_raw divided by the number of decimals of the token.
usd_amountUSD value of the swap.
transaction_from_addressThe address of the sending party of this transaction (Signer on Solana).
transaction_to_addressThe address of the receiving party of this transaction, which could be a contract address. (Null for Solana)
transaction_hashTransaction hash of this trade. (txn_id For Solana)
transaction_indexTransaction index of this trade in the block.
log_indexLog index of this trade. (Null for Solana)
block_timestampBlock timestamp of this trade.
block_numberBlock number of this trade. (block_slot for Solana)
block_hashBlock hash of this trade.
unique_idUnique ID of each trade.
aggregator(Solana) Aggregator used for the trade. (Only applicable for Solana trades currently).
block_height(Solana) Block height of the trade.
instruction_index(Solana) Instruction index of the trade.
signer(Solana) Signer of the trade.
program_id(Solana) program_id of the trade.