Skip to content

Conversation

@Osman-SK
Copy link
Contributor

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:

…iter Lend integration

- Introduces decoding for instructions (supply/borrow/flashloans etc.)
- Updates schema.yml with columns, tests, and descriptions.
- Closes duneanalytics#9093
@cursor
Copy link

cursor bot commented Dec 12, 2025

PR Summary

Introduce an incremental model decoding Jupiter Lend events (supply/borrow/flashloan) with nominal and USD values, and register it in schema with tests/metadata.

  • Models:
    • Add dbt_subprojects/solana/models/jupiter/jupiter_solana_lend_events.sql:
      • Decodes Operate instruction for Jupiter Lend (jupeiUmn818...) filtering by discriminator 0xd96ad06374972a87 and start time > 2025-07-23.
      • Extracts supply_amount_raw, borrow_amount_raw, withdraw_to, borrow_to, transfer_type; classifies tx_type via executing accounts.
      • Converts raw amounts to nominal via tokens_solana.fungible decimals; joins prices.usd_forward_fill to compute unit_price, supply_usd, borrow_usd.
      • Incremental delta table partitioned by block_month, merge strategy; unique_key = [tx_id, outer_instruction_index, supply_amount_nominal].
  • Schema:
    • Update dbt_subprojects/solana/models/jupiter/jupiter_solana_schema.yml:
      • Register jupiter_solana_lend_events with column docs, tags, and dbt_utils.unique_combination_of_columns test on tx_id, outer_instruction_index, supply_amount_nominal.

Written by Cursor Bugbot for commit 562f403. Configure here.

@github-actions github-actions bot marked this pull request as draft December 12, 2025 08:34
@github-actions github-actions bot added WIP work in progress dbt: solana covers the Solana dbt subproject labels Dec 12, 2025
Copy link

@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.

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

@Osman-SK
Copy link
Contributor Author

Screenshot 2025-12-13 at 11 07 16 AM Screenshot 2025-12-13 at 11 07 43 AM

Dune query and Jupiter Lend website values are very close.

@Osman-SK Osman-SK marked this pull request as ready for review December 13, 2025 08:19
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Dec 13, 2025
@jeff-dude
Copy link
Member

closing based on attached issue convo

@jeff-dude jeff-dude closed this Dec 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2025
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.

[CONTRIBUTION] Add Jupiter Lend to Solana/Jupiter Schema

2 participants