duneanalytics / duneanalytics/spellbook

CoW Protocol: Misleading dex_swaps Evaluation

Open
#9,731 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
1.4k
Avg merge
3d 16h
Merged PRs (30d)
22

Description

In the early days (before many exotic interactions were happening) this case statement was a fairly-accurate count of the number of dex swaps in a batch. However now we are seeing many other function selectors occurring in settlement interactions. Its probably too difficult to capture/classify dex swaps

Recommend deprecating this field.

https://github.com/duneanalytics/spellbook/blob/b1113169fa7a094a488618460955044809d75845/dbt_subprojects/hourly_spellbook/models/_project/cow_protocol/arbitrum/cow_protocol_arbitrum_batches.sql#L39-L46

(also copied over through all networks where cow is deployed).

cc @harisang, @fhenneke

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with dbt_subprojects/hourly_spellbook/models/_project/cow_protocol/arbitrum/cow_protocol_arbitrum_batches.sql at lines 39-46, then locate the corresponding Cow Protocol batch models for the other deployed networks. Review how dex_swaps is calculated and where it is exposed; done means the field is consistently deprecated across those network models without affecting the remaining batch outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
data-engineering
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.