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

Add bladeswap trades #6274

Closed
wants to merge 19 commits into from
Closed

Conversation

Hosuke
Copy link
Collaborator

@Hosuke Hosuke commented Jun 26, 2024

#6271

Contribution type

Please check the type of contribution this pull request is for:

  • New spell(s)
  • Adding to existing spell lineage
  • Bug fix

Note: You can safely discard any section below which doesn't apply based on selection above


For new spell(s)

If you are building new spell(s), please provide the following information:

  • Spell name(s): schema.table_name
  • Description: [Detailed description of the new spell(s) and their purpose]
  • Who are the new spell(s) for? [Internal team or general community]
  • How will the new spell(s) be used downstream? [Description of downstream usage]
  • Implementation details: [Information on how the spell(s) are implemented]
  • Test instructions: [How to test the new spell(s)]
  • Related issue(s): [Link to related issues, if any]

For adding to existing spell lineage

If you are adding to an existing spell lineage, please provide the following information:

  • Description: [Description of the changes made]

For bug fixes

If you are fixing a bug, please provide the following information:

  • Description: [Description of the bug fix]
  • Steps to reproduce: [How to reproduce the bug]
  • Implementation details: [Information on how the bug was fixed]
  • Test instructions: [How to test the fix]
  • Related issue(s): [Link to related issues, if any]

Additional information

Please provide any additional information that might help us review your pull request:

  • [Any additional information]

Thank you for your contribution!

@jeff-dude jeff-dude added dbt: dex covers the DEX dbt subproject WIP work in progress labels Jul 12, 2024
@jeff-dude jeff-dude self-assigned this Jul 17, 2024
@jeff-dude
Copy link
Member

i see this one is still marked as wip -- let me know the status here 🙏
also some merge conflicts to resolve

Comment on lines +23 to +24
- name: XYKPool_evt_Swap
- name: Vault_Router_evt_Swap
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@Hosuke Hosuke Jul 18, 2024

Choose a reason for hiding this comment

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

Sample bladeswap_blast.base_trades based on manually decoding:
https://dune.com/queries/3925627

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

However multiple tokens (>2) swapping may happen here.

@Hosuke Hosuke removed the WIP work in progress label Jul 18, 2024
@jeff-dude
Copy link
Member

doing some (quick) digging around. looks like bladeswap on blast is a fork of velocore. according to velocore docs, dex is inspired by balancer vaults. i wonder if we can use the balancer v2 code (from balancer macro) as inspiration to properly pull this data?

@jeff-dude jeff-dude added question Further information is requested in review Assignee is currently reviewing the PR labels Jul 18, 2024
@Hosuke
Copy link
Collaborator Author

Hosuke commented Jul 20, 2024

I will attempt to make use of the ROW_NUMBER() function, in addition to this, the current table schema appears to be different.

@jeff-dude
Copy link
Member

i noticed you left out the seed and commented out the test. is that cause we aren't certain the code is correct? or its difficult to navigate the explorer(s) to find tx's to test against?

@Hosuke
Copy link
Collaborator Author

Hosuke commented Jul 23, 2024

i noticed you left out the seed and commented out the test. is that cause we aren't certain the code is correct? or its difficult to navigate the explorer(s) to find tx's to test against?

You are right, I am not very confident with the current implementation (and the seed).
I just added them back.

@@ -0,0 +1,3 @@
blockchain,project,version,block_date,tx_hash,evt_index,token_bought_address,token_sold_address,block_number,token_bought_amount_raw,token_sold_amount_raw
blast,bladeswap,1,2024-07-22,0x404b62b3acf49cb54739538f6e0d1a71ba68561872f5ee655f364f03c14b9a95,41,0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,0xd1fedd031b92f50a50c05e2c45af1adb4cea82f4,6415903,28706844152887539,6489521714789132087008
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,3 @@
blockchain,project,version,block_date,tx_hash,evt_index,token_bought_address,token_sold_address,block_number,token_bought_amount_raw,token_sold_amount_raw
blast,bladeswap,1,2024-07-22,0x404b62b3acf49cb54739538f6e0d1a71ba68561872f5ee655f364f03c14b9a95,41,0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,0xd1fedd031b92f50a50c05e2c45af1adb4cea82f4,6415903,28706844152887539,6489521714789132087008
blast,bladeswap,1,2024-07-21,0x01996d5ae5da567e1765b65a03172135b597220f90816a0526961d2c2a6e3631,168,0xd1fedd031b92f50a50c05e2c45af1adb4cea82f4,0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,6360267,243806794235376124005,1110890207385634
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -17,6 +17,12 @@ sources:
- name: ThrusterFactory_Point_3_Fee_evt_PairCreated
- name: ThrusterPair_V2_1_Fee_evt_Swap
- name: ThrusterFactory_1_Fee_evt_PairCreated
- name: bladeswap_blast
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With extra sources introduced (which I may miss), we may implement the bladeswap.trades in a more proper way.

@jeff-dude
Copy link
Member

as discussed in meeting, let's close this one for now. as always, keep the branch in case. i will communicate the complexity on this project.

@jeff-dude jeff-dude closed this Jul 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dbt: dex covers the DEX dbt subproject in review Assignee is currently reviewing the PR question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants