Skip to content

feat(solana): add GoonFi v2 DEX integration#9257

Closed
eekey-cloud wants to merge 1 commit intoduneanalytics:mainfrom
eekey-cloud:feat/add-goonfi-v2-dex
Closed

feat(solana): add GoonFi v2 DEX integration#9257
eekey-cloud wants to merge 1 commit intoduneanalytics:mainfrom
eekey-cloud:feat/add-goonfi-v2-dex

Conversation

@eekey-cloud
Copy link
Copy Markdown

@eekey-cloud eekey-cloud commented Jan 29, 2026

Summary

  • Add GoonFi v2 DEX spellbook integration for Solana
  • Includes staging table, base trades model, and trades view
  • Updates existing goonfi schema with v2 models

Test plan

  • CI tests pass for GoonFi v2 models
  • Verify data accuracy against on-chain transactions

Add GoonFi v2 DEX spellbook integration for Solana with:
- Staging table for raw swaps
- Base trades model
- Trades view
- Updated schema with v2 models

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 29, 2026

PR Summary

Medium Risk
Adds new incremental models that parse on-chain instructions/transfers and feeds them into the unified Solana DEX trades pipeline; risk is mainly around correctness/duplication due to surrogate key + instruction index assumptions and incremental merge boundaries.

Overview
Adds GoonFi v2 Solana DEX ingestion by introducing new goonfi_v2_solana models: a staging incremental model sourcing solana.instruction_calls, an incremental base_trades model that joins token transfers to derive bought/sold amounts/mints/vaults, and a trades view filtered to project='goonfi' + version=2.

Wires GoonFi v2 into the unified dex_solana_base_trades union so it flows through dex_solana_trades, updates goonfi_solana_trades to use expose_spells (instead of hide_spells), and extends goonfi/schema.yml with v2 model metadata and uniqueness/column tests.

Written by Cursor Bugbot for commit fac2b89. Configure here.

@github-actions github-actions Bot marked this pull request as draft January 29, 2026 19:16
@github-actions github-actions Bot added WIP work in progress dbt: solana covers the Solana dbt subproject labels Jan 29, 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

AND tf.inner_instruction_index IN (s.inner_instruction_index + 1, s.inner_instruction_index + 2)
WHERE tf.token_version IN ('spl_token', 'spl_token_2022')
{% if is_incremental() -%}
AND {{ incremental_predicate('tf.block_date') }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent incremental predicates mixing block_time and block_date

Low Severity

The goonfi_v2_solana_base_trades.sql model inconsistently mixes block_time and block_date for incremental predicates. The config (line 9) and swaps CTE (line 34) use block_time, while the transfers filter (line 68) uses block_date. This differs from the v1 goonfi model and the aquifer model, which consistently use block_date throughout. The inconsistency makes the code harder to maintain and could lead to subtle data synchronization issues around date boundaries.

Fix in Cursor Fix in Web

@eekey-cloud
Copy link
Copy Markdown
Author

Closing PR

@eekey-cloud eekey-cloud closed this Feb 9, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 9, 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 WIP work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant