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

fixing phoenix dex trades (merge after transfers PR) #6093

Merged
merged 28 commits into from
Jun 26, 2024
Merged

Conversation

andrewhong5297
Copy link
Collaborator

part of solana dex trades overhaul

Copy link
Collaborator

@Hosuke Hosuke left a comment

Choose a reason for hiding this comment

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

LGTM.✅
Thank you @andrewhong5297

@andrewhong5297
Copy link
Collaborator Author

This one has to wait until another pr is merged, just fyi!

@@ -33,6 +33,9 @@ models:
- &block_time
name: block_time
description: "UTC event block time of each DEX trade"
- &block_slot
Copy link
Collaborator

Choose a reason for hiding this comment

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

New columns introduced for phoenix_v1.trades

@andrewhong5297
Copy link
Collaborator Author

@jeff-dude @aalan3 I'm using a seed in the main project, do I need to move that seed over? or I call it as a source now or something instead?

@andrewhong5297
Copy link
Collaborator Author

@jeff-dude @aalan3 I'm using a seed in the main project, do I need to move that seed over? or I call it as a source now or something instead?

nvm got it

@jeff-dude jeff-dude added the WIP work in progress label Jun 24, 2024
@0xRobin 0xRobin added ready-for-review this PR development is complete, please review and removed WIP work in progress blocked labels Jun 25, 2024
@0xRobin 0xRobin self-assigned this Jun 25, 2024
@0xRobin 0xRobin added the dbt: solana covers the Solana dbt subproject label Jun 25, 2024
@0xRobin 0xRobin added ready-for-merging and removed ready-for-review this PR development is complete, please review labels Jun 26, 2024
@jeff-dude jeff-dude merged commit ef61abf into main Jun 26, 2024
2 checks passed
@jeff-dude jeff-dude deleted the phoenix-dex-fix branch June 26, 2024 12:44
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2024
SELECT
market_id
, cast(raw_base_units_per_base_unit as int) as raw_base_units_per_base_unit
FROM {{ ref('phoenix_solana_market_metadata') }}
Copy link
Member

Choose a reason for hiding this comment

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

prod failed due to this ref not existing.
looks like it's a reference to a seed in PR below.
why are we using a seed as a reference?

Copy link
Collaborator

@0xRobin 0xRobin Jun 26, 2024

Choose a reason for hiding this comment

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

ah, I forgot we aren't materializing the seeds in prod. :/
From the comment at L152:

(l.tokenA_filled*coalesce(mm.raw_base_units_per_base_unit,1)) --base unit can be adjusted by phoenix, i.e. for BONK it starts at 1e6. There is a script for updating the markets seed file.

@andrewhong5297 can you convert this to a values model as we do for other static datasets?

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.

[BUG]Token amount decimals are off in dex_solana.trades for some Phoenix transactions
5 participants