-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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_Swappancakeswap_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.ymldbt_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