Skip to content

Commit

Permalink
Fix for kyberswap aggregator: ignore 1 specific token (#7352)
Browse files Browse the repository at this point in the history
* ignore 1 specific token

* syntax
  • Loading branch information
0xRobin authored Dec 19, 2024
1 parent cccc1a2 commit 11a07f4
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ config
(

schema = 'kyberswap_aggregator_avalanche_c',
alias = 'trades',
partition_by = ['block_month'],
Expand Down Expand Up @@ -36,8 +36,11 @@ WITH meta_router AS
,ARRAY[-1] AS trace_address
FROM
{{ source('kyber_avalanche_c', 'MetaAggregationRouterV2_evt_Swapped') }}
WHERE 0x250f8f7750735e3ab5dc9db3a542f6b71999ed38 not in (dstToken, srcToken)
-- There are 2 weird transactions with this token where the return and spent amounts in the event are not correct
-- these result in inflated volume, so we'll ignore this token in any trades.
{% if is_incremental() %}
WHERE evt_block_time >= date_trunc('day', now() - INTERVAL '7' DAY)
AND evt_block_time >= date_trunc('day', now() - INTERVAL '7' DAY)
{% endif %}
)
SELECT
Expand Down

0 comments on commit 11a07f4

Please sign in to comment.