1

I am trying to decode the inputs of some transactions and came across this one:

https://etherscan.io/tx/0xf12371347f409ea7e5e674bd435ee1ad269af5d82cb74d4998ad57b3ab673609

It appears as a private transaction and although the contract is not the uniswap router, the operation is described as a uniswap v2 swap.

What hapened here? Is it possible to decode the input data from this transaction? Without the router contract nor abi, I don't see the way.

2
  • There is nothing private on Ethereum, unless is encrypted via zero-knowledge proofs. Dec 5, 2021 at 20:00
  • Yeah, I am refering to the term etherscan uses when refering to transactions that bypassed the mempool. Shown in the top left corner of the transaction as shown in etherscan.
    – Jorge
    Dec 5, 2021 at 20:07

2 Answers 2

1

What hapened here?

This is an MEV bot transaction and was transmitted to a miner via flashbots. You can see the "bundle" here: https://flashbots-explorer.marto.lol/?block=13741841. The user who submitted the transaction succeeded in frontrunning another user who was also trying to swap on uniswap.

It appears as a private transaction and although the contract is not the uniswap router, the operation is described as a uniswap v2 swap.

If you look at the internal transactions with the "advanced" setting on etherscan, you'll see that this transaction did interact with the uniswap contract.

Is it possible to decode the input data from this transaction?

Yes, but you'll likely need to do it manually by looking at the bytecode of the MEV bot contract and comparing the tx data.

2
  • Great info! btw, I don't see the Uniswap router address in the internal txs, only the pools involved.
    – Jorge
    Dec 5, 2021 at 21:34
  • Oh right - it's likely the bot is bypassing the router and interacting with the pools directly to save gas. Dec 5, 2021 at 22:02
1

Here is a visual explanation to elaborate on @Dylan's answer. The router provides convenience methods and the MEV bot contracts bypass it. The image below is an example. While the router is bypassed by the contract, it still interacts with the pair.

And here is my post about it which includes links to the TXs.

Uniswap V2 Frontrunning

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.