> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dex.trades on viction

> The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on viction.

> [!NOTE]
>
> This is a cross-chain table but can be filtered for viction transactions.

## Table Description

The `dex.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

The `dex.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:

<ul><li>**Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.</li>
<li>**Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools</li>
<li>**Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.</li>
<li>**Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.</li></ul>

## Table Coverage

The following table shows which projects and versions of those projects are covered in the `dex.trades` table on viction.

[https://dune.com/embeds/3740060/6289929?blockchain\_t6c1ea=viction](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=viction)

## Column Descriptions

<table><thead><tr><th>Column</th><th>Type</th><th>Description</th></tr></thead>
<tbody><tr><td>`blockchain`</td><td>`varchar`</td><td>Blockchain network (e.g., ethereum, arbitrum)</td></tr>
<tr><td>`project`</td><td>`varchar`</td><td>DEX project name (e.g., uniswap, curve)</td></tr>
<tr><td>`version`</td><td>`varchar`</td><td>Version of the DEX protocol</td></tr>
<tr><td>`block_month`</td><td>`date`</td><td>Month of the block (for partitioning)</td></tr>
<tr><td>`block_date`</td><td>`date`</td><td>Date of the block (UTC)</td></tr>
<tr><td>`block_time`</td><td>`timestamp`</td><td>Timestamp of the block containing this trade</td></tr>
<tr><td>`block_number`</td><td>`bigint`</td><td>Block number containing this trade</td></tr>
<tr><td>`token_bought_symbol`</td><td>`varchar`</td><td>Symbol of the token bought</td></tr>
<tr><td>`token_sold_symbol`</td><td>`varchar`</td><td>Symbol of the token sold</td></tr>
<tr><td>`token_pair`</td><td>`varchar`</td><td>Token pair (e.g., WETH-USDC)</td></tr>
<tr><td>`token_bought_amount`</td><td>`double`</td><td>Decimal-adjusted amount of the token bought</td></tr>
<tr><td>`token_sold_amount`</td><td>`double`</td><td>Decimal-adjusted amount of the token sold</td></tr>
<tr><td>`token_bought_amount_raw`</td><td>`uint256`</td><td>Raw amount of the token bought (no decimal adjustment)</td></tr>
<tr><td>`token_sold_amount_raw`</td><td>`uint256`</td><td>Raw amount of the token sold (no decimal adjustment)</td></tr>
<tr><td>`amount_usd`</td><td>`double`</td><td>Trade value in USD</td></tr>
<tr><td>`token_bought_address`</td><td>`varbinary`</td><td>Contract address of the token bought</td></tr>
<tr><td>`token_sold_address`</td><td>`varbinary`</td><td>Contract address of the token sold</td></tr>
<tr><td>`taker`</td><td>`varbinary`</td><td>Address of the trade taker</td></tr>
<tr><td>`maker`</td><td>`varbinary`</td><td>Address of the trade maker (liquidity provider)</td></tr>
<tr><td>`project_contract_address`</td><td>`varbinary`</td><td>Address of the DEX contract (pool/router)</td></tr>
<tr><td>`tx_hash`</td><td>`varbinary`</td><td>Hash of the transaction containing this trade</td></tr>
<tr><td>`tx_from`</td><td>`varbinary`</td><td>Address that initiated the transaction</td></tr>
<tr><td>`tx_to`</td><td>`varbinary`</td><td>Address the transaction was sent to</td></tr>
<tr><td>`evt_index`</td><td>`bigint`</td><td>Index of the event log within the transaction</td></tr></tbody></table>

## Table Sample

[https://dune.com/embeds/3793075/6376888?param\_col\_t6c1ea=blockchain\&param\_value\_t6c1ea=viction\&table\_name\_t6c1ea=trades\&table\_schema\_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\&param_value_t6c1ea=viction\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.