Skip to content

feat(solana): add Jupiter v6 SwapsEvent aggregator swaps#9335

Draft
eekey-cloud wants to merge 4 commits intoduneanalytics:mainfrom
eekey-cloud:feat/jupiter-dex
Draft

feat(solana): add Jupiter v6 SwapsEvent aggregator swaps#9335
eekey-cloud wants to merge 4 commits intoduneanalytics:mainfrom
eekey-cloud:feat/jupiter-dex

Conversation

@eekey-cloud
Copy link

@eekey-cloud eekey-cloud commented Feb 18, 2026

Summary

  • Add new Jupiter v6 aggregator swaps model using SwapsEvent decoder (SwapEventV2)
  • Uses route calls (exact_out_route_v2, route_v2, shared_accounts_exact_out_route_v2, shared_accounts_route_v2) joined with instruction_calls to identify AMMs
  • Extracts swap amounts from jupiter_evt_swapsevent using UNNEST on swap_events array
  • Matches swaps to AMMs using rank ordering

Test plan

  • CI tests pass for Jupiter v6 SwapsEvent model
  • Verify data accuracy against on-chain transactions

@cursor
Copy link

cursor bot commented Feb 18, 2026

PR Summary

Medium Risk
Adds new incremental swap attribution logic based on instruction ordering and JSON extraction, which could misattribute AMMs or amounts if event/call ordering assumptions change.

Overview
Adds a new jupiter_v6_solana source with route-call and SwapsEvent decoded tables, enabling dbt models to reference Jupiter v6 program decodes.

Introduces the incremental model jupiter_v6_solana_swapsevent_aggregator_swaps, which derives per-swap input/output amounts from jupiter_evt_swapsevent (unnesting swap_events) and joins them to AMM program IDs inferred from post-route instruction_calls using rank/row-number ordering; includes a uniqueness test over (month, tx, instruction indexes, amm, mints).

Written by Cursor Bugbot for commit 2c92dcd. Configure here.

@github-actions github-actions bot marked this pull request as draft February 18, 2026 13:03
@github-actions github-actions bot added WIP work in progress dbt: solana covers the Solana dbt subproject labels Feb 18, 2026
Eekeguy and others added 4 commits February 18, 2026 18:34
Add new Jupiter v6 aggregator swaps model using SwapsEvent decoder:
- Uses SwapEventV2 JSON parsing from jupiter_evt_swapsevent
- Joins route calls with instruction_calls to identify AMMs
- Extracts swap amounts using UNNEST on swap_events array

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Simplify model to output only swaps_with_amm result:
- block_time, block_month, block_slot, tx_index, tx_id
- amm, outer_instruction_index, inner_instruction_index
- input_mint, input_amount, output_mint, output_amount

Co-Authored-By: Claude Opus 4.5 <[email protected]>
karimhass added a commit to karimhass/spellbook that referenced this pull request Feb 18, 2026
- Add jupiter_v6_solana source and decoded tables (jupiter_evt_swapsevent, route calls)
- Add jupiter_v6_solana_swapsevent_aggregator_swaps model using SwapEventV2 decoder
- Based on PR duneanalytics#9335 (eekey-cloud)

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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