Skip to content

feat(solana): add AlphaQ DEX integration#9282

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

feat(solana): add AlphaQ DEX integration#9282
karimhass wants to merge 3 commits intoduneanalytics:mainfrom
karimhass:karim/alphaq-dex-integration

Conversation

@karimhass
Copy link
Copy Markdown
Contributor

  • Add AlphaQ 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 alphaq_solana_base_trades to dex_solana_base_trades union
  • Fix contributor name: Eekeguy → Eekeyguy

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 AlphaQ 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 alphaq_solana_base_trades to dex_solana_base_trades union
- Fix contributor name: Eekeguy → Eekeyguy
@cursor
Copy link
Copy Markdown

cursor Bot commented Feb 6, 2026

PR Summary

Medium Risk
Adds new incremental models and joins into tokens_solana.transfers and the sector-wide base-trades union, which can impact performance and trade correctness if the transfer-key logic is off. Changes are additive with limited blast radius beyond the new AlphaQ rows.

Overview
Adds an AlphaQ Solana DEX integration by introducing new dbt models to extract swap instructions, map them to SPL token transfers, and emit standardized trade rows.

The new alphaq_solana_base_trades model uses an optimized semi-join pattern (build expected transfer keys → EXISTS prune tokens_solana.transfers → rejoin and aggregate) and enforces one bought + one sold transfer per swap; all AlphaQ models are incremental/partitioned and limit non-incremental runs to a single day starting 2026-02-03 for CI.

Exposes alphaq_solana_trades as a filtered view of dex_solana_trades, adds schema/tests/metadata for the AlphaQ models, and includes alphaq_solana_base_trades in the dex_solana_base_trades union so AlphaQ flows into the sector-wide dataset.

Written by Cursor Bugbot for commit e2d632a. Configure here.

@github-actions github-actions Bot marked this pull request as draft February 6, 2026 21:15
@github-actions github-actions Bot added WIP work in progress dbt: solana covers the Solana dbt subproject labels Feb 6, 2026
@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/alphaq-dex-integration branch from 2995891 to 992fa08 Compare February 8, 2026 22:24
Co-authored-by: Cursor <cursoragent@cursor.com>
@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