This is a cross-chain table but can be filtered for sophon transactions.
Table Description
Thedex.trades table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized.Functional Overview
Thedex.trades table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the dex.trades table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry.This detailed approach allows for granular analysis of trade execution paths, enabling users to:- Analyze Liquidity Sources: Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
- Track Trade Execution Paths: Follow the exact route a trade takes across different DEXs and liquidity pools
- Assess Slippage and Execution Quality: Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
- Monitor Market Dynamics: Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
Table Coverage
The following table shows which projects and versions of those projects are covered in thedex.trades table on sophon. Column Descriptions
| Column | Type | Description |
|---|---|---|
blockchain | varchar | Blockchain network (e.g., ethereum, arbitrum) |
project | varchar | DEX project name (e.g., uniswap, curve) |
version | varchar | Version of the DEX protocol |
block_month | date | Month of the block (for partitioning) |
block_date | date | Date of the block (UTC) |
block_time | timestamp | Timestamp of the block containing this trade |
block_number | bigint | Block number containing this trade |
token_bought_symbol | varchar | Symbol of the token bought |
token_sold_symbol | varchar | Symbol of the token sold |
token_pair | varchar | Token pair (e.g., WETH-USDC) |
token_bought_amount | double | Decimal-adjusted amount of the token bought |
token_sold_amount | double | Decimal-adjusted amount of the token sold |
token_bought_amount_raw | uint256 | Raw amount of the token bought (no decimal adjustment) |
token_sold_amount_raw | uint256 | Raw amount of the token sold (no decimal adjustment) |
amount_usd | double | Trade value in USD |
token_bought_address | varbinary | Contract address of the token bought |
token_sold_address | varbinary | Contract address of the token sold |
taker | varbinary | Address of the trade taker |
maker | varbinary | Address of the trade maker (liquidity provider) |
project_contract_address | varbinary | Address of the DEX contract (pool/router) |
tx_hash | varbinary | Hash of the transaction containing this trade |
tx_from | varbinary | Address that initiated the transaction |
tx_to | varbinary | Address the transaction was sent to |
evt_index | bigint | Index of the event log within the transaction |