Skip to content

Commit

Permalink
Ignore ETH wrapping transfers (#322)
Browse files Browse the repository at this point in the history
Before only transfers from WETH to the contract were ignored. Those
correspond to unwraps/withdrawals.
With this change, also transfers from the protocol to WETH are ignored.
Those correspond to wraps/deposits.

The general idea is that all transfers between the protocol and WETH
should correspond to wrapping and unwrapping. Such operations do change the ETH balance and WETH balance without incurring any slippage or change in value of the buffers.
  • Loading branch information
fhenneke authored Oct 5, 2023
1 parent 700fa71 commit 005c75d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions queries/dune_v2/period_slippage.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- https://github.com/cowprotocol/solver-rewards/pull/259
-- https://github.com/cowprotocol/solver-rewards/pull/322
-- Query Here: https://dune.com/queries/2421375
with
batch_meta as (
Expand Down Expand Up @@ -121,7 +121,7 @@ batch_meta as (
and success = true
and 0x9008d19f58aabd9ed0d60971565aa8510560ab41 in (to, "from")
-- WETH unwraps don't have cancelling WETH transfer.
and "from" != 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
and not 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 in (to, "from")
-- ETH transfers to traders are already part of USER_OUT
and not contains(traders_out, to)
)
Expand Down

0 comments on commit 005c75d

Please sign in to comment.