Skip to content

[CONTRIBUTION] Add PancakeSwap V3 to Monad dex.trades #9075

@imekss

Description

@imekss

Description

I would like to contribute by adding PancakeSwap v3 DEX trades on Monad to the dex.trades table in Spellbook.

Sub-project Affected

spellbook/tree/main/dbt_subprojects/dex

Implementation Approach

This contribution will follow the pattern for Uniswap V3 compatible DEXs, similar to existing implementations on Ethereum and Base:

Ethereum: pancakeswap_v3_ethereum_base_trades.sql
Base: pancakeswap_v3_base_base_trades.sql

The implementation will use the existing uniswap_compatible_v3_trades macro from uniswap_compatible_trades.sql, which handles the standardized swap event structure shared by PancakeSwap V3 and Uniswap V3 forks.

Currently, only Kuru is tracked for Monad DEX trades (added in PR #9042).
PancakeSwap V3 contracts are already decoded in Dune under the pancakeswap_v3_monad namespace, with the following tables available:

  • pancakeswap_v3_monad.PancakeV3Pool_evt_Swap
  • pancakeswap_v3_monad.PancakeV3Factory_evt_PoolCreated

Files to Add / Update

New Model

  • dbt_subprojects/dex/models/trades/monad/platforms/pancakeswap_v3_monad_base_trades.sql

Additional Files to Update

  • dbt_subprojects/dex/models/trades/monad/_schema.yml
  • dbt_subprojects/dex/models/trades/monad/dex_monad_base_trades.sql

Benefits to the Community:

PancakeSwap V3 is currently the second largest DEX on Monad by trading volume (by Coingecko), but is not yet tracked in dex.trades yet.
Adding it will:

  • Provide comprehensive DEX coverage for the Monad ecosystem
  • Enable accurate trading volume and liquidity tracking for the community
  • Benefit analysts and dashboards tracking Monad DeFi activity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions