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

Fix Paraswap Ethereum trades #6581

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

PablloZz
Copy link
Contributor

Thank you for contributing to Spellbook 🪄

Update!

Please build spells in the proper subproject directory. For more information, please see the main readme, which also links to a GH discussion with the option to ask questions.

Contribution type

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

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

For bug fixes

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

  • Description:
  1. The previous implementation used is_eth condition, which was true for both swap_detail_in and swap_detail_out in ETH/ERC20 transactions. This caused inner join to filter out these transactions. Also, swap_detail_out had two is_eth = false conditions, which was filtering out all transactions that start or end from ETH.
  2. The taker and maker were set to the transaction initiator.
  • Implementation details:
  1. Split trades tables by version and project to obtain more accurate data.
  2. Removed the is_eth condition and replaced union all with left join and coalesce.
  3. Set the taker to the direct caller of the Augustus and the maker to the direct receiver.

Thank you for your contribution!

PablloZz and others added 11 commits August 1, 2024 15:10
Split tables for trades by version and project to get more precise
trade data using data specific for each table;

Replace inner join to left join and remove is_eth condition: for
ETH/ERC20 is_eth for token_in was true and for token_out was false.
Later inner join just filtered such transactions. Also token_out has
had two is_eth = false conditions which filtered all transactions that
included ETH.
@PablloZz PablloZz marked this pull request as draft August 20, 2024 09:49
@dune-eng
Copy link

Workflow run id 10469285857 approved.

@dune-eng
Copy link

Workflow run id 10469286205 approved.

@dune-eng
Copy link

Workflow run id 10469318035 approved.

@dune-eng
Copy link

Workflow run id 10469318314 approved.

@jeff-dude jeff-dude added the WIP work in progress label Aug 20, 2024
@dune-eng
Copy link

Workflow run id 10529589658 approved.

@dune-eng
Copy link

Workflow run id 10529589305 approved.

@dune-eng
Copy link

Workflow run id 10529607018 approved.

@dune-eng
Copy link

Workflow run id 10529607335 approved.

@dune-eng
Copy link

Workflow run id 10560412413 approved.

@dune-eng
Copy link

Workflow run id 10560412206 approved.

Add checking for TokenTransferProxy because "event from" is not always
Augustus caller
@PablloZz PablloZz force-pushed the fix-paraswap-ethereum-trades branch from b4f6300 to e2da218 Compare August 26, 2024 15:27
@dune-eng
Copy link

Workflow run id 10562598893 approved.

@dune-eng
Copy link

Workflow run id 10562599195 approved.

@dune-eng
Copy link

Workflow run id 10834477682 approved.

@dune-eng
Copy link

Workflow run id 10834478066 approved.

@dune-eng
Copy link

Workflow run id 10836272680 approved.

@dune-eng
Copy link

Workflow run id 10836272861 approved.

@dune-eng
Copy link

Workflow run id 10844349374 approved.

@dune-eng
Copy link

Workflow run id 10844349650 approved.

@dune-eng
Copy link

Workflow run id 10844519418 approved.

@dune-eng
Copy link

Workflow run id 10844519802 approved.

@dune-eng
Copy link

Workflow run id 10878968779 approved.

@dune-eng
Copy link

Workflow run id 10878968911 approved.

@dune-eng
Copy link

Workflow run id 10881955984 approved.

@dune-eng
Copy link

Workflow run id 10881956342 approved.

@dune-eng
Copy link

Workflow run id 10882039727 approved.

@dune-eng
Copy link

Workflow run id 10882039493 approved.

@dune-eng
Copy link

Workflow run id 10887639134 approved.

@dune-eng
Copy link

Workflow run id 10887639621 approved.

@dune-eng
Copy link

Workflow run id 10887654578 approved.

@dune-eng
Copy link

Workflow run id 10887654745 approved.

@dune-eng
Copy link

Workflow run id 10897575330 approved.

@dune-eng
Copy link

Workflow run id 10897575517 approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants