Skip to content

Commit

Permalink
ignore eth wrapping transfers
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 committed Oct 5, 2023
1 parent 700fa71 commit 67188a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion queries/dune_v2/period_slippage.sql
Original file line number Diff line number Diff line change
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 67188a4

Please sign in to comment.