Skip to content

feat(dex): add nad.fun to monad dex.trades table#9663

Open
kkqzhou wants to merge 4 commits into
duneanalytics:mainfrom
kkqzhou:feat/add-nad-fun-to-dex-trades
Open

feat(dex): add nad.fun to monad dex.trades table#9663
kkqzhou wants to merge 4 commits into
duneanalytics:mainfrom
kkqzhou:feat/add-nad-fun-to-dex-trades

Conversation

@kkqzhou
Copy link
Copy Markdown
Contributor

@kkqzhou kkqzhou commented May 12, 2026

Adds a new platform base-trades model for nad.fun, the memecoin launchpad on Monad. Each launched token graduates from a bonding curve into a Uniswap V3-style pool that emits the standard V3 Swap event; swaps from any router (direct, Metamask delegation manager, MEV bots, etc.) are captured by joining V3 Swap events to the set of pools enumerated from the BondingCurve's CurveGraduate event.

Refs #9662

Thank you for contributing to Spellbook 🪄

Please open the PR in draft and mark as ready when you want to request a review.

Description:

[...]


quick links for more information:

Adds a new platform base-trades model for nad.fun, the memecoin
launchpad on Monad. Each launched token graduates from a bonding curve
into a Uniswap V3-style pool that emits the standard V3 Swap event;
swaps from any router (direct, Metamask delegation manager, MEV bots,
etc.) are captured by joining V3 Swap events to the set of pools
enumerated from the BondingCurve's CurveGraduate event.

Refs duneanalytics#9662
@github-actions github-actions Bot marked this pull request as draft May 12, 2026 23:16
@github-actions github-actions Bot added the WIP work in progress label May 12, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@github-actions github-actions Bot added the dbt: dex covers the DEX dbt subproject label May 12, 2026
@kkqzhou
Copy link
Copy Markdown
Contributor Author

kkqzhou commented May 12, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request May 12, 2026
@kkqzhou kkqzhou marked this pull request as ready for review May 12, 2026 23:48
@github-actions github-actions Bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels May 12, 2026
@kkqzhou kkqzhou changed the title feat(dex): add nad.fun v3 monad base trades feat(dex): add nad.fun monad base trades May 12, 2026
@kkqzhou kkqzhou changed the title feat(dex): add nad.fun monad base trades feat(dex): add nad.fun to monad dex.trades table May 12, 2026
kkqzhou and others added 2 commits May 19, 2026 17:05
Replace the manual monad.logs decode (bonding-curve graduations + V3 Swap
events on every graduated pool) with the union of the two decoded
nad.fun router contracts:
  - swap router 0x003989CD92C31A51D8B20bDBd0c51E444f88d081
  - dex  router 0x0B79d71AE99528D1dB24A4148b5f4F865cc2b137

Pool-level V3 Swap also fires for traffic that does not originate from
nad.fun (aggregators, MEV bots, direct pool callers), so the prior
methodology over-counted nad.fun trades. The decoded
DexRouterBuy / DexRouterSell events are the canonical nad.fun surface.

On 2026-05-15 the rewrite drops 4,955 non-router rows that were inflating
the trade set, landing at 23,338 trades / 2,979,805.87 WMON notional.

Seed CSV: the old 5 rows included 2 non-router pool trades that the new
model intentionally excludes; replaced with 4 rows that exercise both
routers in both directions (swap_buy, swap_sell, dex_buy, dex_sell), all
verified end-to-end against the new model output.
Ensures dex.trades rows for nad_fun resolve a display name / X handle
when joined to dex.info.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jeff-dude jeff-dude linked an issue May 21, 2026 that may be closed by this pull request
@jeff-dude jeff-dude added ready-for-merging and removed ready-for-review this PR development is complete, please review labels May 21, 2026
@jeff-dude jeff-dude self-assigned this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dbt: dex covers the DEX dbt subproject ready-for-merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CONTRIBUTION] Add Nad.fun to dex.trades

2 participants