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

# DEX Trades

> Query DEX swaps volume across multiple blockchain in a single query.

The`crosschain.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 for EVM-compatible blockchain.
This model includes EVM-specific fee details (e.g. priority fees) that are not found on non-EVM chains.

### Blockchain Coverage

<Tabs>
  <Tab title="Overview">
    <Info>
      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.
    </Info>

    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.`
    For trades routed by aggregators, they are found in the `dex.aggregator_trades` models on the respective blockchain.
  </Tab>

  <Tab title="EVM DEX Coverage">
    Coverage of DEX Protocols Across various EVM Blockchains.
    Note that for a single protocol (e.g. uniswap\_v2) there can be multiple dex projects (e.g. uniswap, sushiswap).

    | Chain          | Protocol Version        | Protocols                                                                                                                                                                                                                                                                                                                                                                                                   |
    | -------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | arbitrum       | algebra                 | zyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | arbitrum       | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | arbitrum       | balancer\_v3            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | arbitrum       | camelot\_v3             | camelot                                                                                                                                                                                                                                                                                                                                                                                                     |
    | arbitrum       | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | arbitrum       | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | arbitrum       | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | arbitrum       | fluid\_dex              | fluid                                                                                                                                                                                                                                                                                                                                                                                                       |
    | arbitrum       | gmx\_v1                 | gmx                                                                                                                                                                                                                                                                                                                                                                                                         |
    | arbitrum       | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | arbitrum       | pancakeswap\_v3         | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | arbitrum       | solidly                 | auragi\_finance, chronos, hamburger, magicfox, perfectswap, ramses, solidlizard, solunea, sterling\_finance, x3calibur                                                                                                                                                                                                                                                                                      |
    | arbitrum       | trader\_joe\_v2         | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | arbitrum       | trader\_joe\_v2\_1      | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | arbitrum       | uniswap\_v2             | alienfi, apeswap, arbiswap, arbitrum\_exchange, arbswap, camelot, dxswap, elkfinance, integralsize, lfgswap, mmfinance, oreoswap, pancakeswap, sharkyswap, sushiswap, swapfish, swaprum, trader\_joe, uniswap, wtfdex, zyberswap                                                                                                                                                                            |
    | arbitrum       | uniswap\_v3             | arbitrum\_exchange, chronos, cresentswap, horiza, ramses, solidly, summaswap, sushiswap, thick, uniswap                                                                                                                                                                                                                                                                                                     |
    | arbitrum       | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | avalanche      | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | avalanche      | balancer\_v3            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | avalanche      | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | avalanche      | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | avalanche      | dexalot\_v1             | dexalot                                                                                                                                                                                                                                                                                                                                                                                                     |
    | avalanche      | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | avalanche      | gmx\_v1                 | gmx                                                                                                                                                                                                                                                                                                                                                                                                         |
    | avalanche      | hashflow\_v3            | hashflow                                                                                                                                                                                                                                                                                                                                                                                                    |
    | avalanche      | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | avalanche      | trader\_joe\_v2         | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | avalanche      | trader\_joe\_v2\_1      | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | avalanche      | uniswap\_v2             | alligator, baguette, canary, complusswap, elkfinance, hakuswap, hurricaneswap, lydiafinance, olive, onavax, pandaswap, pangolin, partyswap, pyreswap, radioshackswap, sushiswap, swapsicle, thorus, trader\_joe, uniswap, vapordex, vavalon, yetiswap, zeroswap                                                                                                                                             |
    | avalanche      | uniswap\_v3             | pangolin, pharaoh, sushiswap, uniswap, vapordex                                                                                                                                                                                                                                                                                                                                                             |
    | avalanche      | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | base           | aerodrome\_v2           | aerodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | base           | algebra                 | swapbased, synthswap                                                                                                                                                                                                                                                                                                                                                                                        |
    | base           | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | base           | balancer\_v3            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | base           | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | base           | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | base           | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | base           | fluid\_dex              | fluid                                                                                                                                                                                                                                                                                                                                                                                                       |
    | base           | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | base           | maverick                | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | base           | maverick\_v2            | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | base           | pancakeswap\_v3         | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | base           | solidly                 | archly, baso, infusion, leetswap, scale, velocimeter                                                                                                                                                                                                                                                                                                                                                        |
    | base           | uniswap\_v2             | 9mm, alienbase, alienbase\_area51, baseswap, cbswap, cloudbase, dackieswap, elkfinance, icecreamswap, leetswap, melegaswap, oasisswap, pancakeswap, rocketswap, sharkswap, soswap, sushiswap, swapbased, synthswap, uniswap, virtuals\_protocol                                                                                                                                                             |
    | base           | uniswap\_v3             | aerodrome, alienbase, baseswap, basexfi, candyswap, cresentswap, derpdex, horizondex, kinetix, nftx, realwagmi, solidly, sushiswap, thick, uniswap, yumyumswap                                                                                                                                                                                                                                              |
    | base           | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | base           | woofi\_v2               | woofi                                                                                                                                                                                                                                                                                                                                                                                                       |
    | blast          | algebra                 | bladeswap, fenix                                                                                                                                                                                                                                                                                                                                                                                            |
    | blast          | uniswap\_v2             | akitaswap, bitconnect, blaspace, blastdex, blasterswap, dyorswap, hyperblast, icecreamswap, monoswap, ring\_dex, sushiswap, swapblast, thruster, uniswap                                                                                                                                                                                                                                                    |
    | blast          | uniswap\_v3             | blaster, blasterswap, monoswap, sushiswap, thruster, uniswap                                                                                                                                                                                                                                                                                                                                                |
    | blast          | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | bsc            | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | bsc            | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | bsc            | maverick                | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | bsc            | pancakeswap\_stableswap | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | bsc            | pancakeswap\_v3         | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | bsc            | thena\_fusion           | thena                                                                                                                                                                                                                                                                                                                                                                                                       |
    | bsc            | thena\_v1               | thena                                                                                                                                                                                                                                                                                                                                                                                                       |
    | bsc            | trader\_joe\_v2         | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | bsc            | trader\_joe\_v2\_1      | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | bsc            | uniswap\_v2             | apeswap, babydogeswap, babyswap, bakeryswap, biswap, bscswap, demaxswap, fstswap, hyperswap, jswap, julswap, mdex, melegaswap, nomiswap, pancakeswap, sushiswap, uniswap, youswap                                                                                                                                                                                                                           |
    | bsc            | uniswap\_v3             | apeswap, sheepdex, sushiswap, uniswap                                                                                                                                                                                                                                                                                                                                                                       |
    | bsc            | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | celo           | algebra                 | ubeswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | celo           | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | celo           | uniswap\_v2             | padi, sushiswap, ubeswap                                                                                                                                                                                                                                                                                                                                                                                    |
    | celo           | uniswap\_v3             | ubeswap, uniswap                                                                                                                                                                                                                                                                                                                                                                                            |
    | ethereum       | balancer\_v1            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | balancer\_v3            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | bancor\_v1              | bancor                                                                                                                                                                                                                                                                                                                                                                                                      |
    | ethereum       | bancor\_v3              | bancor                                                                                                                                                                                                                                                                                                                                                                                                      |
    | ethereum       | clipper\_fmm\_v1        | clipper                                                                                                                                                                                                                                                                                                                                                                                                     |
    | ethereum       | clipper\_fmm\_v2        | clipper                                                                                                                                                                                                                                                                                                                                                                                                     |
    | ethereum       | clipper\_fmm\_v3        | clipper                                                                                                                                                                                                                                                                                                                                                                                                     |
    | ethereum       | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | ethereum       | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | ethereum       | dodo\_v1                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | ethereum       | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | ethereum       | fluid\_dex              | fluid                                                                                                                                                                                                                                                                                                                                                                                                       |
    | ethereum       | hashflow\_v3            | hashflow                                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | ethereum       | maverick                | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | maverick\_v2            | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | native\_v1              | native                                                                                                                                                                                                                                                                                                                                                                                                      |
    | ethereum       | pancakeswap\_v3         | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | ethereum       | solidly                 | archly\_finance, solidly                                                                                                                                                                                                                                                                                                                                                                                    |
    | ethereum       | trader\_joe\_v2\_1      | trader\_joe                                                                                                                                                                                                                                                                                                                                                                                                 |
    | ethereum       | uniswap\_v2             | bitberryswap, cityswap, convergence, defiswap, dooar, equalizerfinance, ethervista, fraxswap, gemswap, integralsize, linkswap, luaswap, mintyswap, nineinch, nomiswap, orionprotocol, pancakeswap, plasmafinance, radioshackswap, safeswap, saitaswap, sakeswap, sashimiswap, shibaswap, sumswap, sushiswap, swapr, swipeswap, unicly, uniswap, verse, vulcandex, wallstreetbetsdex, whiteswap, x7\_finance |
    | ethereum       | uniswap\_v3             | blueprint, mauve, nftx, realwagmi, solidly, sushiswap, uniswap                                                                                                                                                                                                                                                                                                                                              |
    | ethereum       | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | fantom         | algebra                 | skullswap, spiritswap                                                                                                                                                                                                                                                                                                                                                                                       |
    | fantom         | balancer\_v2            | beethoven\_x                                                                                                                                                                                                                                                                                                                                                                                                |
    | fantom         | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | fantom         | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | fantom         | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | fantom         | uniswap\_v2             | alium\_finance, bombfinance, defyswap, degenhaus, elkfinance, excalibur, farmtom, hyperjump, jetswap, knightswap, liquidbolt, mageswap, magik\_finance, makiswap, morpheusswap, paintswap, protofi, pyreswap, radioshackswap, redemption, runic, shibaswap, skullswap, soulswap, spiritswap, spookyswap, sushiswap, tombswap, wigoswap, wingswap, yoshiexchange, zoodex                                     |
    | fantom         | uniswap\_v3             | lif3, solidly, spookyswap, sushiswap, thick, wagmi                                                                                                                                                                                                                                                                                                                                                          |
    | fraxtal        | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | fraxtal        | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | fraxtal        | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | fraxtal        | uniswap\_v2             | fraxswap                                                                                                                                                                                                                                                                                                                                                                                                    |
    | fraxtal        | uniswap\_v3             | pharaoh                                                                                                                                                                                                                                                                                                                                                                                                     |
    | gnosis         | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | gnosis         | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | gnosis         | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | gnosis         | uniswap\_v2             | dxswap, honeyswap, sushiswap                                                                                                                                                                                                                                                                                                                                                                                |
    | gnosis         | uniswap\_v3             | sushiswap, uniswap                                                                                                                                                                                                                                                                                                                                                                                          |
    | hyperevm       | algebra                 | hypercat                                                                                                                                                                                                                                                                                                                                                                                                    |
    | hyperevm       | uniswap\_v3             | hx\_finance, hybra\_finance, hyperswap, laminar, noxa\_fi, project\_x, ramses                                                                                                                                                                                                                                                                                                                               |
    | hyperevm       | balancer\_v3            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | hyperevm       | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | hyperevm       | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | hyperevm       | uniswap\_v2             | dyorswap, hyperswap                                                                                                                                                                                                                                                                                                                                                                                         |
    | hyperevm       | solidly                 | hybra, kittenswap                                                                                                                                                                                                                                                                                                                                                                                           |
    | ink            | uniswap\_v2             | dyorswap, inkswap, inkyswap, squidswap, uniswap                                                                                                                                                                                                                                                                                                                                                             |
    | ink            | uniswap\_v3             | uniswap, velodrome                                                                                                                                                                                                                                                                                                                                                                                          |
    | ink            | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | ink            | velodrome\_v2           | velodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | mode           | algebra                 | kim\_exchange                                                                                                                                                                                                                                                                                                                                                                                               |
    | mode           | iziswap\_v1             | iziswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | mode           | uniswap\_v2             | dyorswap, kim\_exchange, supswap, swapmode                                                                                                                                                                                                                                                                                                                                                                  |
    | mode           | uniswap\_v3             | poolshark, swapmode                                                                                                                                                                                                                                                                                                                                                                                         |
    | mode           | velodrome\_v2           | velodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | optimism       | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | optimism       | balancer\_v3            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | optimism       | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | optimism       | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | optimism       | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | optimism       | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | optimism       | uniswap\_v2             | elkfinance, openxswap, sushiswap, uniswap, zipswap                                                                                                                                                                                                                                                                                                                                                          |
    | optimism       | uniswap\_v3             | solidly, sushiswap, uniswap, velodrome                                                                                                                                                                                                                                                                                                                                                                      |
    | optimism       | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | optimism       | velodrome\_v1           | velodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | optimism       | velodrome\_v2           | velodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon        | alegeba                 | quickswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon        | algebra                 | quickswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon        | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | polygon        | curve\_v1               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | polygon        | curve\_v2               | curve                                                                                                                                                                                                                                                                                                                                                                                                       |
    | polygon        | dodo\_v1                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | polygon        | dodo\_v2                | dodo                                                                                                                                                                                                                                                                                                                                                                                                        |
    | polygon        | hashflow\_v3            | hashflow                                                                                                                                                                                                                                                                                                                                                                                                    |
    | polygon        | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon        | quickswap\_v3           | quickswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon        | uniswap\_v2             | apeswap-amm, dfyn-network, elkfinance, fraxswap, gravityfinance, jetswap, mmfinance, polycat, quickswap, sushiswap, uniswap                                                                                                                                                                                                                                                                                 |
    | polygon        | uniswap\_v3             | retro, sushiswap, uniswap                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon        | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | polygon        | woofi\_v2               | woofi                                                                                                                                                                                                                                                                                                                                                                                                       |
    | polygon\_zkevm | algebra                 | quickswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon\_zkevm | balancer\_v2            | balancer                                                                                                                                                                                                                                                                                                                                                                                                    |
    | polygon\_zkevm | kyberswap\_elastic      | kyberswap                                                                                                                                                                                                                                                                                                                                                                                                   |
    | polygon\_zkevm | pancakeswap\_v3         | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | polygon\_zkevm | uniswap\_v2             | doveswap, flashliquidity, leetswap, pancakeswap, potato, zkevmswap, zkmoonswap                                                                                                                                                                                                                                                                                                                              |
    | polygon\_zkevm | uniswap\_v3             | doveswap, quickswap, sushiswap, uniswap                                                                                                                                                                                                                                                                                                                                                                     |
    | scroll         | algebra                 | scribe                                                                                                                                                                                                                                                                                                                                                                                                      |
    | scroll         | iziswap\_v1             | iziswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | scroll         | maverick\_v2            | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | scroll         | solidly                 | keller, nuri\_exchange, skydrome, tokan\_exchange                                                                                                                                                                                                                                                                                                                                                           |
    | scroll         | uniswap\_v2             | canary, chiliswap, icecreamswap, issuaa, ivyswap, luigiswap, metavault, papyrusswap, punkswap, quillswap, sanctuary, scrollswap, spacefi, stoneswap, sushiswap, voltageswap, zebra, zerodex, zprotocol                                                                                                                                                                                                      |
    | scroll         | uniswap\_v3             | chadfinance, keller, kyberswap, metavault, nuri\_exchange, poolshark, sushiswap, uniswap, zebra                                                                                                                                                                                                                                                                                                             |
    | soneium        | solidly                 | velodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | soneium        | uniswap\_v2             | dyorswap, kyo\_fi, sonefi, sonus\_exchange, uniswap                                                                                                                                                                                                                                                                                                                                                         |
    | soneium        | uniswap\_v3             | kyo\_fi, sonex, uniswap, velodrome                                                                                                                                                                                                                                                                                                                                                                          |
    | soneium        | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | tron           | uniswap\_v2             | intercroneswap, justmoney, sunswap, tofuswap, uswap                                                                                                                                                                                                                                                                                                                                                         |
    | tron           | uniswap\_v3             | sunswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | unichain       | solidly                 | unknown                                                                                                                                                                                                                                                                                                                                                                                                     |
    | unichain       | uniswap\_v2             | dyorswap, unichainswap, uniswap, unknown                                                                                                                                                                                                                                                                                                                                                                    |
    | unichain       | uniswap\_v3             | uniswap, velodrome                                                                                                                                                                                                                                                                                                                                                                                          |
    | unichain       | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | unichain       | velodrome\_v2           | velodrome                                                                                                                                                                                                                                                                                                                                                                                                   |
    | worldchain     | uniswap\_v2             | dyorswap, multex, uniswap                                                                                                                                                                                                                                                                                                                                                                                   |
    | worldchain     | uniswap\_v3             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | worldchain     | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | zksync         | maverick                | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | zksync         | maverick\_v2            | maverick                                                                                                                                                                                                                                                                                                                                                                                                    |
    | zksync         | pancakeswap\_v3         | pancakeswap                                                                                                                                                                                                                                                                                                                                                                                                 |
    | zksync         | solidly                 | dracula, solunea, starmaker, velocore, vesync                                                                                                                                                                                                                                                                                                                                                               |
    | zksync         | uniswap\_v2             | ezkalibur, gemswap, megalon, pancakeswap, spacefi, zkswap, zkswap2                                                                                                                                                                                                                                                                                                                                          |
    | zksync         | uniswap\_v3             | derpdex, mute, uniswap, wagmi, zkswapdex                                                                                                                                                                                                                                                                                                                                                                    |
    | zora           | uniswap\_v2             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | zora           | uniswap\_v3             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |
    | zora           | uniswap\_v4             | uniswap                                                                                                                                                                                                                                                                                                                                                                                                     |

    **EVM-Like Blockchain Chains**
    Tron's TVM (Tron Virtual Machine) is partially EVM-compatible, but there are specific differences, particularly in its network fee structure.
    Unlike the EVM, TVM uses energy instead of gas, with TRX as the ecosystem gas token. Additionally, addresses are in Base58.
  </Tab>

  <Tab title="Sui DEX Coverage">
    | Chain | Protocols                                                                  |
    | ----- | -------------------------------------------------------------------------- |
    | sui   | bluefin, bluemove, cetus\_protocol, flowx\_v2, flowx\_v3, turbos\_finance2 |
  </Tab>

  <Tab title="Solana DEX Coverage">
    Projects and Protocol Indexed on Solana.

    | Project              | Protocols                                            |
    | -------------------- | ---------------------------------------------------- |
    | orca                 | orca-v1, orca-v2, orca-whirlpool                     |
    | raydium              | raydium-v4, raydium-clmm, raydium-stable, raydium-cp |
    | saber                | saber-stableswap                                     |
    | lifinity             | lifinity-v2, lifinity-v1                             |
    | mercurial            | mercurial                                            |
    | meteora              | meteora, meteora-dlmm, meteora-vault                 |
    | marinade             | marinade                                             |
    | stepn                | stepn                                                |
    | openbook             | openbook, openbook-v2                                |
    | crema                | clmm-v2                                              |
    | symmetry             | symmetry                                             |
    | invariant            | invariant                                            |
    | phoenix              | phoenix                                              |
    | cropper              | cropper-whirlpool                                    |
    | pumpfun              | pumpfun                                              |
    | goosefx              | goosefx-ssl, goosefx-ssl-v2                          |
    | fluxbeam             | fluxbeam                                             |
    | dexscreener-moonshot | dexscreener-moonshot                                 |
    | stabble              | stabble, stabble-weighted                            |
    | jupiter              | jupiter-perp                                         |
    | obric                | obric-v2                                             |
    | solfi                | solfi                                                |
    | zerofi               | zerofi                                               |
    | aldrin               | aldrin-v1, aldrin-v2                                 |
    | sanctum              | sanctum                                              |
    | virtuals             | virtuals                                             |
    | pumpswap             | pumpswap                                             |
    | gamma                | gamma                                                |
  </Tab>
</Tabs>

### Sample Query

<Tabs>
  <Tab title="DEX Volume">
    Query DEX Volume and Users Across Blockchains indexed by Allium in the last 90 days.

    ```sql theme={null}
    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
    ```
  </Tab>

  <Tab title="DEX Transaction Fees">
    ℹ️ This is only applicable for EVM DEXs in the `crosschain.dex.trades_evm` model.

    Dividing the transaction fees by swap count is required as fees are computed at the transaction level and there are dex trades within a same transaction with multiple hops.

    ```sql theme={null}
    select
        date(block_timestamp) as date,
        chain,
        count(distinct transaction_from_address) as distinct_users,  -- Number of unique users
        avg(usd_amount) as avg_usd_volume,  -- Average swap volume in USD
        sum(usd_amount) as total_usd_volume,  -- Total trade volume in USD by chain
        sum(transaction_fees_usd / swap_count) as total_fees_usd  -- Total fees USD
    from crosschain.dex.trades_evm
    where block_timestamp > current_timestamp - interval '6 months'
    group by all
    order by 1 desc
    ```
  </Tab>
</Tabs>

### Table Columns

<Tabs>
  <Tab title="crosschain.dex.trades">
    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 Name                | Description                                                                                                  |
    | -------------------------- | ------------------------------------------------------------------------------------------------------------ |
    | 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.                                                                           |
  </Tab>

  <Tab title="crosschain.dex.trades_evm">
    The `crosschain.dex.trades_evm` table columns additional fields that are only applicable for EVM-compatible blockchains.

    | Column                          | Description                                                                                                                                                                                           |
    | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | project                         | The project (decentralized exchange) of the liquidity pool that the swap occurred from.                                                                                                               |
    | protocol                        | DEX protocol (& version, if applicable) of the contract address facilitating the swap.                                                                                                                |
    | liquidity\_pool\_address        | Contract address of the liquidity pool holding the asset. For protocol without the concept of LP such as airswap, this will be null.                                                                  |
    | sender\_address                 | The address of the sender emitted on the swap event logs. This can be a router or pool address, which is different from the transaction initiator transaction\_from\_address that initiated the swap. |
    | to\_address                     | Address of the recipient emitted on the swap event logs. For example, we use the to\_address from the uniswap v2 swap event log and the recipient\_address from the uniswap v3 swap event log.        |
    | token\_sold\_address            | Token address of the token sold.                                                                                                                                                                      |
    | token\_sold\_name               | Name of the token sold.                                                                                                                                                                               |
    | token\_sold\_symbol             | Symbol of the token sold.                                                                                                                                                                             |
    | token\_sold\_decimals           | Token decimals of the token sold.                                                                                                                                                                     |
    | token\_sold\_amount\_raw\_str   | Raw amount of tokens sold (unnormalized) in string.                                                                                                                                                   |
    | token\_sold\_amount\_raw        | Raw amount of tokens sold (unnormalized).                                                                                                                                                             |
    | token\_sold\_amount\_str        | Amount of tokens sold in string.                                                                                                                                                                      |
    | token\_sold\_amount             | Amount of tokens sold.                                                                                                                                                                                |
    | usd\_sold\_amount               | Amount of token sold in USD value.                                                                                                                                                                    |
    | 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\_bought\_decimals         | Token decimals of the token bought.                                                                                                                                                                   |
    | token\_bought\_amount\_raw\_str | Raw amount of tokens bought (unnormalized) in string.                                                                                                                                                 |
    | token\_bought\_amount\_raw      | Raw amount of tokens bought (unnormalized).                                                                                                                                                           |
    | token\_bought\_amount\_str      | Amount of tokens bought in string.                                                                                                                                                                    |
    | token\_bought\_amount           | Amount of tokens bought.                                                                                                                                                                              |
    | usd\_bought\_amount             | Amount of token bought in USD value.                                                                                                                                                                  |
    | usd\_amount                     | USD value of the swap. This field preferentially selects the USD value of Native Assets and Stablecoin (USDT/USDC) tokens, as spam/meme token prices may conflate the true swap value.                |
    | extra\_fields                   | This field contains all the extra columns emitted from the event/function call that were not part of the conventional DEX trades columns.                                                             |
    | swap\_count                     | Swap count within the transaction.                                                                                                                                                                    |
    | transaction\_fees               | Fees paid at the transaction level.                                                                                                                                                                   |
    | transaction\_fees\_usd          | Fees paid in USD at the time of the transaction.                                                                                                                                                      |
    | fee\_details                    | Additional fee details of the transaction, including max priority fee, gas price and gas used for the transaction.                                                                                    |
    | transaction\_from\_address      | Transaction sender address. I.e. the address of the transaction initiator. (from\_address in the raw\.transactions field for the transaction\_hash of this swap).                                     |
    | transaction\_to\_address        | Transaction receiver. (to\_address in the raw\.transactions field for the transaction\_hash of this swap).                                                                                            |
    | transaction\_hash               | Transaction hash that this swap belongs to.                                                                                                                                                           |
    | transaction\_index              | The position of this transaction in the block that it belongs to. The first transaction has index 0.                                                                                                  |
    | selector                        | 4-byte selector of the transaction.                                                                                                                                                                   |
    | log\_index                      | The position of the swap event log in the transaction.                                                                                                                                                |
    | block\_timestamp                | Block timestamp of the swap event.                                                                                                                                                                    |
    | block\_number                   | Block number of the swap event.                                                                                                                                                                       |
    | block\_hash                     | Block hash of the swap event.                                                                                                                                                                         |
    | unique\_id                      | Unique ID of each trade.                                                                                                                                                                              |
  </Tab>
</Tabs>
