Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lifinity_v1_base_trades.sql #7292

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

smyyguy
Copy link
Contributor

@smyyguy smyyguy commented Dec 11, 2024

there are instances where the token amounts are incorrectly attributing a mint instruction to the transfer instruction

to get an idea of the issue you can see an example trade here:

SELECT 
    *
FROM dex_solana.trades
WHERE 
    date_trunc('week', block_time) = TIMESTAMP '2023-11-06'
    AND project = 'lifinity' and token_pair is null AND token_bought_mint_address = '8gz8AFF1w6DDvhpdmq6SRqUydNGju94CEtrty4Fnu6Qa'
LIMIT 10 

also see: #7266

it seems the mint action is getting picked up because of the way the joins are done. We can filter for transfer actions to get rid of the possibility of picking up the mint amounts by accident

Copy link
Member

@jeff-dude jeff-dude left a comment

Choose a reason for hiding this comment

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

thanks for finding and applying the fix to both versions. i will look to get this applied 🙏

@jeff-dude jeff-dude self-assigned this Dec 11, 2024
@jeff-dude jeff-dude added ready-for-merging dbt: solana covers the Solana dbt subproject labels Dec 11, 2024
@jeff-dude jeff-dude merged commit fd8b1de into duneanalytics:main Dec 11, 2024
1 of 2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
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-merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants