Skip to content

feat(solana): add WhaleStreet DEX integration#9286

Closed
karimhass wants to merge 3 commits intoduneanalytics:mainfrom
karimhass:karim/whalestreet-dex-integration
Closed

feat(solana): add WhaleStreet DEX integration#9286
karimhass wants to merge 3 commits intoduneanalytics:mainfrom
karimhass:karim/whalestreet-dex-integration

Conversation

@karimhass
Copy link
Copy Markdown
Contributor

  • Add WhaleStreet DEX models (stg_raw_swaps, base_trades, trades, schema)
  • Uses optimized 3-step semi-join pattern for tokens_solana.transfers
  • project_start_date 2026-02-03 with 1-day cap for CI efficiency
  • Add whalestreet_solana_base_trades to dex_solana_base_trades union

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:

- Add WhaleStreet DEX models (stg_raw_swaps, base_trades, trades, schema)
- Uses optimized 3-step semi-join pattern for tokens_solana.transfers
- project_start_date 2026-02-03 with 1-day cap for CI efficiency
- Add whalestreet_solana_base_trades to dex_solana_base_trades union
@cursor
Copy link
Copy Markdown

cursor Bot commented Feb 6, 2026

PR Summary

Medium Risk
Introduces new incremental models and expands the sector-wide dex_solana_base_trades union, which can affect downstream DEX aggregates and performance if the transfer matching logic is incorrect or expensive.

Overview
Adds WhaleStreet as a new Solana DEX source by introducing whalestreet_solana_stg_raw_swaps, whalestreet_solana_base_trades (incremental/merge), and a whalestreet_solana_trades view exposed via expose_spells.

The new pipeline extracts swaps from solana.instruction_calls for the WhaleStreet program and derives buy/sell legs by looking up matching SPL token transfers using an optimized semi-join/lookup pattern, then includes WhaleStreet output in the global dex_solana_base_trades UNION.

Written by Cursor Bugbot for commit 9c5313d. Configure here.

@github-actions github-actions Bot marked this pull request as draft February 6, 2026 21:35
@github-actions github-actions Bot added WIP work in progress dbt: solana covers the Solana dbt subproject labels Feb 6, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

post_hook='{{ expose_spells(\'["solana"]\',
"project",
"whalestreet",
\'["Eekeyguy"]\') }}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trades view uses expose_spells instead of hide_spells

Medium Severity

The whalestreet_solana_trades view uses expose_spells as its post_hook, but every other per-project DEX trades view (aquifer, goonfi, humidifi, obric, tessera, goosefx) uses hide_spells(). Only the main dex_solana_trades table uses expose_spells. This will incorrectly make the WhaleStreet convenience view publicly visible in Dune's data explorer (setting dune.public to true), when it is meant to be a hidden internal view that filters from the already-public dex_solana_trades.

Fix in Cursor Fix in Web

@karimhass karimhass marked this pull request as ready for review February 6, 2026 21:42
@github-actions github-actions Bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Feb 6, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@karimhass karimhass force-pushed the karim/whalestreet-dex-integration branch from 79cf3d0 to ade3eb3 Compare February 8, 2026 22:25
Co-authored-by: Cursor <cursoragent@cursor.com>
karimhass added a commit to karimhass/spellbook that referenced this pull request Feb 10, 2026
@karimhass karimhass closed this Feb 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dbt: solana covers the Solana dbt subproject ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant