Closed henridf closed 3 years ago
Previously, we only considered the case where the trader made a profit in the 'natural' forward direction:
where y-x is the profit (in tok1). This makes most sense when tok1 is ETH.
y-x
But it is also possible to take a profit in the other direction:
where x-y is the profit (in tok2). This makes most sense when tok2 is ETH, and the transaction being sandwiched is swapExactTokensForEth.
x-y
close #28
Previously, we only considered the case where the trader made a profit in the 'natural' forward direction:
where
y-x
is the profit (in tok1). This makes most sense when tok1 is ETH.But it is also possible to take a profit in the other direction:
where
x-y
is the profit (in tok2). This makes most sense when tok2 is ETH, and the transaction being sandwiched is swapExactTokensForEth.