🔁DEX Trades

Contains DEX trades of multiple blockchains aggregated into a single table.

Sample Query

DEX Volume Across Blockchains.

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 non-evm compatible chains, the additional fields are added at the end of this table.

Project and protocols coverage is available at the chain's respective DEX trades page.

Column NameDescription

chain

Blockchain where the dex trade was executed.

project

Name of the project e.g. uniswap, balancer, curve, sushiswap, pancakeswap, fraxswap.

protocol

Version of the protocol used e.g. uniswap_v2, uniswap_v3, balancer_v1, balancer_v2, curve_v1, curve_v2

liquidity_pool_address

Contract address of the liquidity pool holding the asset.

sender_address

Address of the sender of the swap event log, which can be the Router.

to_address

Address of the recipient of the swap event.

token_bought_address

Token address of the token bought, i.e. the asset acquired from the trade.

token_bought_name

Name of the token bought.

token_bought_symbol

Symbol of the token bought.

token_sold_address

Address of the token sold.

token_sold_name

Name of the token sold.

token_sold_symbol

Symbol of the token sold.

token_bought_amount_raw

Amount of token bought (not divided by the number of decimals).

token_bought_amount

token_bought_amount_raw divided by the number of decimals of the token.

token_sold_amount_raw

Amount of token sold (not divided by the number of decimals).

token_sold_amount

token_sold_amount_raw divided by the number of decimals of the token.

usd_amount

USD value of the swap.

transaction_from_address

The address of the sending party of this transaction (Signer on Solana).

transaction_to_address

The address of the receiving party of this transaction, which could be a contract address. (Null for Solana)

transaction_hash

Transaction hash of this trade. (txn_id For Solana)

transaction_index

Transaction index of this trade in the block.

log_index

Log index of this trade. (Null for Solana)

block_timestamp

Block timestamp of this trade.

block_number

Block number of this trade. (block_slot for Solana)

block_hash

Block hash of this trade.

unique_id

Unique 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.

Last updated