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: arbitrum USDC dex.trades & dex.offers #1

Open
2 tasks
denverbaumgartner opened this issue Jul 18, 2023 · 0 comments
Open
2 tasks

update: arbitrum USDC dex.trades & dex.offers #1

denverbaumgartner opened this issue Jul 18, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@denverbaumgartner
Copy link
Owner

currently, one version of USDC is not present in both prices.usd and erc20.tokens on dune, meaning we do not have proper accounting for decimals/symbols/prices. we should both:

  • update our spellbook to handle this in the short term by defaulting to a version of USDC that is being recorded in these tables
  • provide a seperate pr that udates these underlying tables so we do not have to do the short term fix
@denverbaumgartner denverbaumgartner added the bug Something isn't working label Jul 18, 2023
@denverbaumgartner denverbaumgartner self-assigned this Jul 18, 2023
Hosuke added a commit that referenced this issue Aug 17, 2023
…uneanalytics#4011)

* Perpetuals Migration - #1 - Migrate tests & seed

* fix optimism market address seeds

* test fix

---------

Co-authored-by: Huang Geyang <[email protected]>
jeff-dude pushed a commit that referenced this issue Aug 24, 2023
* Dex Aggregator Migration - #1 - Lifi

* push dex aggregator seed

* revert changes to legacy file

* test fix

* test

* test

* smol fix

* TINY FIXES AND CLEAN UP

* clean

---------

Co-authored-by: Huang Geyang <[email protected]>
jeff-dude pushed a commit that referenced this issue Aug 24, 2023
…4082)

* Dex Aggregator Migration - #1 - Lifi

* push dex aggregator seed

* revert changes to legacy file

* test fix

* test

* test

* smol fix

* Dex Aggregator Feat: Lifi Optimism

* CLEAN

* adjust seed
Hosuke added a commit that referenced this issue Aug 30, 2023
* feat: add honeyswap folders

* feat: honeyswap polygon trades and schema

* chore: consistent naming

* feat: honeyswap_v2_gnosis_trades.sql

* chore:add legacy dummy tables

* chore: update legacy schemas

* chore: more legacy schema changes

* rebase to main

* Dex trades beta dunesql (duneanalytics#4107)

* Add dex_trades_migration_beta to models

* Create dex_trades_migration_beta

* Drop trace_address from select

* temporarily remove some models

* Comment out hashflow

* Disable more models

* Fix glacier types

* Fix day

* Add back models that now exist

* Partition by block_month instead

* Add to model

* Actually add block_month

* Add fixed models

* Fix babyswap

* Add block_month to zipswap

* Fix maker type for zipswap

* Don't include zeroex for now

* Trigger CI

* exclude zeroex and kyberswap for now

* Disable zipswap

* Fix model

* Add back models

* exclude failing model (duneanalytics#4144)

* Dex Aggregator Migration - #2 - Yield yak (duneanalytics#4063)

* Dex Aggregator Migration - #2 - Yield yak

* fixes and clean up

* Dex Aggregator Feat: Lifi Optimism - Ready for review (duneanalytics#4082)

* Dex Aggregator Migration - #1 - Lifi

* push dex aggregator seed

* revert changes to legacy file

* test fix

* test

* test

* smol fix

* Dex Aggregator Feat: Lifi Optimism

* CLEAN

* adjust seed

* NFT transfers refactor (duneanalytics#4072)

* Use merge strategy and stop using unique_transfer_id

* Use different unique key

* Drop unique_transfer_id

* Drop anti_table and let trino do join instead during merge into

* Fix typo

* Fix formatting

* Revert "Drop unique_transfer_id"

This reverts commit 09e374d.

* Update unique_transfer_id to be smaller

Keep it for backward compatibility

* Use correct column

* Fix tests and drop duplicate line

* Add back unique_transfer_id

* Add incremental filter for erc1155_batch as well

* Feature/oracle addresses (duneanalytics#4053)

* Add Chainlink OCR to arbitrum, avalanche_c, bnb, ethereum, fantom, gnosis, optimism, and polygon
Generate OCR Operator Meta
Add incremental tables to Chainlink OCR and add a README
Alphabetize OCR Operator Meta
General OCR Cleanup
Polish Chainlink OCR Model

* Add incremental table tests

* add new networks to chainlink feeds, add all current feeds per network

* Trigger CI

* Trigger CI

* add dummy models for new networks

---------

Co-authored-by: ryanostrom <[email protected]>

* DuneSQL Migration: `balancer_trades` (duneanalytics#4097)

* Update balancer_arbitrum_schema.yml

* Update balancer_v2_arbitrum_transfers_bpt.sql

* Update balancer_v2_arbitrum_transfers_bpt_legacy.sql

* Create balancer_v2_avalanche_c_transfers_bpt.sql

* Create balancer_v2_avalanche_c_transfers_bpt_legacy.sql

* Update balancer_avalanche_c_schema.yml

* Update balancer_schema.yml

* Create balancer_transfers_bpt.sql

* Create balancer_transfers_bpt_legacy.sql

* Create balancer_base_schema.yml

* Create balancer_base_sources.yml

* Create balancer_v2_base_transfers_bpt.sql

* Create balancer_v2_base_transfers_bpt_legacy.sql

* Update balancer_ethereum_schema.yml

* Update balancer_v2_ethereum_transfers_bpt_legacy.sql

* Update balancer_v2_ethereum_transfers_bpt.sql

* Update balancer_gnosis_schema.yml

* Create balancer_v2_gnosis_transfers_bpt.sql

* Create balancer_v2_gnosis_transfers_bpt_legacy.sql

* Update balancer_v2_gnosis_transfers_bpt_legacy.sql

* Update balancer_optimism_schema.yml

* Update balancer_v2_optimism_transfers_bpt.sql

* Update balancer_v2_optimism_transfers_bpt_legacy.sql

* Update balancer_polygon_schema.yml

* Update balancer_v2_polygon_transfers_bpt.sql

* Update balancer_v2_polygon_transfers_bpt_legacy.sql

* Migrate `pools_fees` to DuneSQL

* Add migrated `pools_fees` model to Avalanche, Base, and create an aggregate spell.

* Migrate `balancer_v2_trades` to DuneSQL

* Update balancer_v2_arbitrum_trades.sql

* Update balancer_v2_arbitrum_trades.sql

* Update balancer_ethereum_trades.sql

* Update balancer_v2_optimism_trades.sql

* Update balancer_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Revert "Update balancer_v2_ethereum_trades.sql"

This reverts commit c03026c.

* Revert "Update balancer_ethereum_trades.sql"

This reverts commit d037954.

* Revert "Update balancer_v2_optimism_trades.sql"

This reverts commit aae6872.

* Revert "Update balancer_ethereum_trades.sql"

This reverts commit f41a607.

* Revert "Update balancer_v2_arbitrum_trades.sql"

This reverts commit d6ff85a.

* Revert "Update balancer_v2_arbitrum_trades.sql"

This reverts commit b1e3362.

* Revert "Migrate `balancer_v2_trades` to DuneSQL"

This reverts commit 83ca534.

* Update balancer_v2_ethereum_bpt_prices.sql

* Update balancer_v2_ethereum_bpt_prices.sql

* Update balancer_v2_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Requested changes.

* Update balancer_v2_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Update balancer_ethereum_schema.yml

* Update balancer_v2_ethereum_trades_legacy.sql

* Update balancer_v2_ethereum_trades_legacy.sql

* Removing the _legacy part

As it returns this error: TrinoUserError(type=USER_ERROR, name=SYNTAX_ERROR, message="line 112:40: backquoted identifiers are not supported; use double quotes to quote identifiers", query_id=20230815_211318_32606_9uda9)

* Revert "Removing the _legacy part"

This reverts commit 40b2402.

* Update balancer_ethereum_schema.yml

* Add migrated bpt_prices to arb, gno, poly, opt

* Migrate `bpt_prices` on Avalanche and deploy on Base.

* Update balancer_base_schema.yml

* Update balancer_base_sources.yml

* Migrate balancer_v2_trades and deploy on avalanche_c and base.

* Add in casting to keep the same data types as old lang.

* Revert "Add in casting to keep the same data types as old lang."

This reverts commit 00ca48a.

* Migrate Balancer Trades v1 to DuneSQL

* Update balancer_v1_ethereum_trades.sql

* Update balancer_v1_ethereum_trades.sql

* Add DuneSQL tag to balancer_ethereum_trades aggregation spell.

* Migrate balancer trades agg spells to DuneSQL and deploy on base and avalanche_c.

* Update balancer_avalanche_c_schema.yml

* Update balancer_base_schema.yml

* Update balancer_base_schema.yml

* Update balancer_avalanche_c_trades.sql

* Update balancer_avalanche_c_trades_legacy.sql

* Add in `schema = 'balancer_base',`

* Remove `_legacy` in schemas for each chains agg trades spell.

* Update balancer_base_schema.yml

* Add in `pool_id` and swap_fee` to balancer trades agg spell and schemas.

* Update balancer_schema.yml

* Update balancer_arbitrum_schema.yml

* Update balancer_avalanche_c_schema.yml

* Update balancer_ethereum_schema.yml

* Update schemas

* Update balancer_base_schema.yml

* Cast NULL values to appropriate data types.

* Fix name.

* Update balancer_ethereum_schema.yml

* Hot fix

* Spark fixes

* Update balancer_v1_ethereum_trades.sql

* Update balancer_v1_ethereum_trades_legacy.sql

* Update balancer_v1_ethereum_trades.sql

* Update balancer_v2_ethereum_trades.sql

* Update balancer_v2_ethereum_trades_legacy.sql

* FIx type issues.

* Remove duplicate partition by.

* Update balancer_ethereum_schema.yml

* Revert "Update balancer_ethereum_schema.yml"

This reverts commit 1cd76cc.

* Check the combination of unique columns.

* Fix casting issue.

* Change casting.

* Update balancer_v1_ethereum_trades_legacy.sql

* Update balancer_v1_ethereum_trades_legacy.sql

* Update balancer_v1_ethereum_trades_legacy.sql

* Fix mistake.

* Requested changes.

* Update balancer_v1_ethereum_trades.sql

* Migrate NFT opensea models (duneanalytics#4083)

* non-seaport models

* dunesql tags

* don;t partition

* fix seeds and tests

* seed tags

* seed schema

* fix polygon subtring

* fix token_id in seeds

* fix token_id in seeds

* fix opensea polygon

* migrate seaport v4 models

* migrate seaport v4 models

* remove partitioning

* migrate v3

* migrate matching logic

* bugfix

* bugfix

* bugfix

* sources

* more sources

* fix zone type

* fix token_id type

* temp ignore OP

* temp ignore OP

* seed test rerun

* change start date ETH

* unnest with ordinality is 1-indexed

* start dates

* another idx fix

* try and fix om id logic

* deduplicate order match hash re-use

* fix

* re-enable optimism v3

* temp fix

* fixes

* fixes

* fix missing column

* Fix check_seeds macro (duneanalytics#4146)

* Fix check_seeds macro

* Use is distinct from

* Add Tigris Options Trade & Enrich Models - Ready for review  (duneanalytics#4099)

* blank push

* rewrite

* fix typo

* fix version

* test polygon options models

* fix typo

* add arbitrum options

* consolidate versions in blockchain perps

* smol fix

* add protocol version to positions leverage

* add protocol version on polygon

* missing limit cancelled

* add fees distributed events

* fix synthax

* create options & perpetual trades table on arbit

* fix fees

* add seeds

* fix version

* fix trade

* add polygon models

* final updates

* fix... so proud of myself for completing this

* typo fix

* blank on tokenserc20 and add tigris to perp table

* add columns

* add column to main models

---------

Co-authored-by: Huang Geyang <[email protected]>

* New Tigris Perpetual Contracts - Easy - Ready for review (duneanalytics#4148)

* test

* test riun

* remove inner join

* add new sources

* Add Balancer and Hashflow to dex.trades_migration_beta (duneanalytics#4149)

* Add block month to balancer models

* Add balancer and hasflow to dex_migration_beta

* Add block_month to hashflow

* Fix schemas

* Add month to balancer_v1

* Drop trace_address

* Change maker type for hashflow

* Fix typoes (duneanalytics#4154)

* Add correct tokens (duneanalytics#4159)

* [labels] Add more arbitrum cex address (duneanalytics#4132)

* Add more arbitrum cex address

* SQL formatting

---------

Co-authored-by: Huang Geyang <[email protected]>

* Add crvUSD price  (duneanalytics#4140)

* Update prices_ethereum_tokens.sql

* Update prices_ethereum_tokens.sql

* Add base safes (duneanalytics#3827)

* Add Safe celo spells, schema and sources

Spells implemented are:
safe_celo_safes.sql
safe_celo_singletons.sql
safe_celo_transactions.sql
safe_celo_celo_transafers.sql

Source implemented is safe_celo_sources.yml

Schema implemented is safe_celo_schema.yml

* Add Safes on Celo

* Implement celo_base_sources

* Rename transactions file

* Add schema property to all spells

schema property follows format project_version_blockchain, e.g. safe_celo

* Remove Celo dependency for safe_safes_all schema

* Declare sql files for spells

* Implement singletons sql file

* Implement base safes

* Implement transfers file

* Implement transactions file

* Implement schema file

* Implement sources file

* Add base sources

* Update starting date of project

* Fix typo

* Migrate safe_base_eth_transfers

* Add dummy legacy models for safe_base_* spells

* Migrate safe_base spells

* Add schema

* Fix source typo

* Fix source

* Fix from

* Add safe_base_safes to meta-table

---------

Co-authored-by: Huang Geyang <[email protected]>

* Migrate Seaport forks to DuneSQL (duneanalytics#4155)

* seaport forks

* add sources

* fix schema

* fix

* fix seed tests

* fix seeds

* trigger seed

* adapt macro for forks

* [READY TO REVIEW] Add kyberswap aggregator (duneanalytics#4070)

* Add kyberswap aggregator on arbitrum

* Fix varbinary vs varchar(42)

* Fix trace_address

* * Remove comma in dex_aggregator_trades

* Fix lower case

* Fix table 'hive.oneinch_ethereum.trades' does not exist

* Fix tags in oneinch ethereum

* Revert "Fix table 'hive.oneinch_ethereum.trades' does not exist"

This reverts commit d39292e.

* Revert "Fix tags in oneinch ethereum"

This reverts commit 303feab.

* Temporary omit dex_aggregator_trades

* Fix schema 'kyberswap_arbitrum' does not exist

* Try check_dex_seed_legacy

* Indent

* Add check_dex_aggregator_seed

* Fix test check_dex_aggregator_seed_kyberswap_aggregator_arbitrum_trades_arbitrum__kyberswap__2

* Add optimism, avalanche_c, ethereum

* Add bnb

* Add polygon

* Fix conflict

* Fix redundant commas

* No touch trade

* Migrate dex_aggregator.trades

* Fix dex_aggregator.trades

* Recover dex_aggregator.trades

* Add other versions of kyberswap aggregator, total 5 versions

* Revert "Add other versions of kyberswap aggregator, total 5 versions"

This reverts commit d60d564.

* Naming standards

* Update version

* Fix legacy

* Bad file name

* Fix feedback

* Fix feedback

---------

Co-authored-by: Huang Geyang <[email protected]>

* Labels dao migration (duneanalytics#4157)

* Migrate labels_dao_multisig_ethereum

* Migrate labels_dao_framework

* Migrate labels_dao

* Fix labels_dao_framework

* [ETH staking] Add More ETH staking entities (duneanalytics#4141)

Co-authored-by: Huang Geyang <[email protected]>

* Update token_checker.py (duneanalytics#4150)

I'm not sure why this was commented out (maybe wasn't supported at the time the script was drafted?) but arbitrum is supported now. 

https://api.coinpaprika.com/v1/coins/wbtc-wrapped-bitcoin

* Add clipper.exchange Arbitrum v2 (duneanalytics#4125)

* Add clipper.exchange Arbitrum v2

* Add clipper.exchange dex.trades seed data

* Fix schema

* Fix schema

* Remove trace_address

* Add tags=['dunesql']

* Fix schema

* Fix schema

* Create OP Worldcoin Safes (duneanalytics#3762)

* add worldcoin

* add to project

* rm incremental in deployer identification

* sources

* unique

* add

* error

* commi

* label

* lbl

* update logic

* fix

* relayer slot

* dummy legacy

* test alias

* alias test

* finalize code

---------

Co-authored-by: Huang Geyang <[email protected]>
Co-authored-by: jeff-dude <[email protected]>
Co-authored-by: jeff <[email protected]>

* [dunesql] OP NFT: Add Sound and Generated NFT insert (duneanalytics#3613)

* add sound & init nft generated

* commit

* undo

* typo

* add zora

* gen

* add col

* dunesql and add zora 1155

* alias

* test

* test

* dune

* adds

* dbt project

* unique key

* fixes

* source

* schema

* cast

* cast

* comma

* syntax

* pct

* group

* dece

* alias

* dummy legacy

* legacy z

* rm config

* rm

* test legacy

* mod

* add unique tests

---------

Co-authored-by: jeff-dude <[email protected]>
Co-authored-by: jeff <[email protected]>

* (feat) Add PNDC for eth price tracking (duneanalytics#4152)

* (feat) Add PNDC for eth price tracking

* trigger CLA recheck

---------

Co-authored-by: jeff <[email protected]>

* Add more chains to `evms.info` (& legacy file) (duneanalytics#4126)

* add chains and legacy file

* fix

* adds celo to transfers (duneanalytics#4060)

* adds celo to transfers

* added missing dunesql tag

* amended transfers_celo_erc20, added test

* tweaked varchar size

* replaced legacy transfers with placeholder

* added block_month, left amount_raw as double

* too many commas..

* Remove file format

* Revert "Remove file format"

This reverts commit d511239.

* updated unique_key

* amended schema

* column name tweak

* more tweaks to test file

* added amount_raw to unique_key

* test with limited data sample

* back to full dataset (except for WCELO)

* join tweak and 1mln limit test

* limit 100k test..

* and 1k limit test..

* cast block_month as date

* tidying up

* applying suggested changes

* updated schema

* updated test total

* Add uniqueness test

---------

Co-authored-by: Huang Geyang <[email protected]>

* arbitrum date: legacy (duneanalytics#3916)

Co-authored-by: jeff <[email protected]>

* OP Predeploy Updates (duneanalytics#3889)

* allo

* static updates

* push

* push

* adds

* add

* legacy equivalence

* debank

* Refresh addresses_optimism_grants_funding

* Refresh deps

* Refresh deps

* wld

* handle for eas predeploys

* comma

* fix addrs

* chainx

* push

* Revert "push"

This reverts commit 89fdf35.

* Revert "chainx"

This reverts commit 7c2dbf0.

---------

Co-authored-by: Huang Geyang <[email protected]>

* timeswap: adds Stafi(rETH)/WETH Arbitrum pool (duneanalytics#3844)

* update: adds new pool

* fix : runtime err

* update : consistent symbols

* update: new arbitrum pools added

* fix

* fixx

* Migrate timeswap_*_pools.sql

* Revert "Migrate timeswap_*_pools.sql"

This reverts commit fb8141e.

* Revert "update: new arbitrum pools added"

This reverts commit 07be96e.

* adds new pool -- legacy

* update: Stafi(rETH)/WETH arbitrum pool added

---------

Co-authored-by: Huang Geyang <[email protected]>

* [READY TO REVIEW][MINOR] Fix price native token of avax and polygon (duneanalytics#4162)

* Fix price native token of avax and polygon

* Fix price native token of avax and polygon

* Try ETH to check pipeline

* Revert "Try ETH to check pipeline"

This reverts commit 064ce50.

* Refresh seed

---------

Co-authored-by: Huang Geyang <[email protected]>

* Migrate dodo (duneanalytics#4043)

* Migrate dodo to dunesql

* migrate address to dunesql

* fix

* remove semicolon

* fix

* fix

* update test seed

* update test

* revert test

* fix

* fix

* fix unique_key

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Add proxy column

* Select proxy

* Remove trace_address in the unique_key

* Fix uniqueness test

* fix

* add trace_address back to unique keys

---------

Co-authored-by: Huang Geyang <[email protected]>
Co-authored-by: jeff-dude <[email protected]>

* Migrate Optimism Bridge Flows - Ready for review  (duneanalytics#4130)

* draft: Migrate Optimism Bridge Flows

* migrate ovm & chain ids

* SMOL FIX

* fix cast

* smol fix

* another smol fix

* switch bridge token address to bytearray sub

* make changes

* FIX TYPE TO integer

* change to uint256

* Optimism Wallet Summary - WIP (duneanalytics#4127)

* wallet summary wip

* create addresses summary model

* add age, frequency and gas spent

* add unique dapps

* fix usage frequency

* Test fix

* fix join

* fix seed

* rewrite first activity

* smol test

* smol test

* make naming changes and schema fixes

* add first function and other columns

* smol fix

* add recency age label & functions name

* rename to signatures to test

* fix group by

* test fix

* fix dupes

* make first changes

* remove error

* Another synthax fix

* make changes

* models without tag for untranslated list (duneanalytics#4166)

---------

Co-authored-by: Alan Ghobadi <[email protected]>
Co-authored-by: jeff <[email protected]>
Co-authored-by: henrystats <[email protected]>
Co-authored-by: AnonJon <[email protected]>
Co-authored-by: ryanostrom <[email protected]>
Co-authored-by: thetroyharris <[email protected]>
Co-authored-by: 0xRob <[email protected]>
Co-authored-by: Huang Geyang <[email protected]>
Co-authored-by: sankinyue <[email protected]>
Co-authored-by: chef-seaweed <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: nhd98z <[email protected]>
Co-authored-by: Meghan Heintz <[email protected]>
Co-authored-by: Alexey Malashkevich <[email protected]>
Co-authored-by: Michael Silberling <[email protected]>
Co-authored-by: jeff-dude <[email protected]>
Co-authored-by: skiinginjeans <[email protected]>
Co-authored-by: hildobby <[email protected]>
Co-authored-by: tomfutago <[email protected]>
Co-authored-by: denver <[email protected]>
Co-authored-by: yashvik <[email protected]>
Co-authored-by: owen05 <[email protected]>
Co-authored-by: Alex Courouble <[email protected]>

* fix: move change onto dex trades migration beta

* feat: fix honeyswap dbt run

* feat: honeyswap adding seeds

* Fix check_dex_seed

* chore: rename honeyswap_v2 occurences to honeyswap

* fix: undo some tbl name changes

* fix: undo some tbl name changes

* fix: undo further name changes

* fix: undo further name changes

* final naming standards

---------

Co-authored-by: Alan Ghobadi <[email protected]>
Co-authored-by: jeff <[email protected]>
Co-authored-by: henrystats <[email protected]>
Co-authored-by: AnonJon <[email protected]>
Co-authored-by: ryanostrom <[email protected]>
Co-authored-by: thetroyharris <[email protected]>
Co-authored-by: 0xRob <[email protected]>
Co-authored-by: Huang Geyang <[email protected]>
Co-authored-by: sankinyue <[email protected]>
Co-authored-by: chef-seaweed <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: nhd98z <[email protected]>
Co-authored-by: Meghan Heintz <[email protected]>
Co-authored-by: Alexey Malashkevich <[email protected]>
Co-authored-by: Michael Silberling <[email protected]>
Co-authored-by: jeff-dude <[email protected]>
Co-authored-by: skiinginjeans <[email protected]>
Co-authored-by: hildobby <[email protected]>
Co-authored-by: tomfutago <[email protected]>
Co-authored-by: denver <[email protected]>
Co-authored-by: yashvik <[email protected]>
Co-authored-by: owen05 <[email protected]>
Co-authored-by: Alex Courouble <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant