Understanding ETH Simulation Bundles and When to Use Them

Blocknative Ethereum Web3

Blocknative recently added bundle support for simulating transactions on Ethereum Mainnet. This capability enables users to fully harness the power of the Ethereum mempool, our network of Ethereum nodes, and our existing decoding and transaction lifecycle knowledge to accurately simulate their transactions.

By adding support for simulation bundles, Blocknative has enhanced the ability of wallets, protocols, and traders to preview net-balance changes and smart contract calls, reduce failed transactions, and optimize arbitrage opportunities. 

But how?

To answer this, we first must go over the basics of how transaction simulations work on EVM-based chains.

 

Simulation Basics

From a birds-eye view, Ethereum is a transaction-based distributed ‘world’ computer. One way to know how your transaction affects that computer is to have your transaction included in a block. But, at that point, there’s no turning back and the state-change is on-chain and permanent.

However, if you are unsure about whether or not you want your transaction processed, you can “fork” the computer and run your transaction on top of it as if it were the real network—this is a transaction simulation. Forking creates a temporary copy of the chain state upon which transactions can be applied without impacting the true chain. Depending on the speed of your set-up, you can quickly simulate scenarios on the most current state of the chain.

When a transaction itself is the outcome of the smart contracts, just knowing the end-state of the transaction is not enough as key details about the transaction can be lost by the time the transaction makes it on-chain. These missing steps are known as internal transactions

Internal transactions aren’t stored on-chain, making them invisible to anyone that isn’t collecting this data in-flight. This is why, in addition to simulating your transaction through the Ethereum Virtual Machine (EVM), Blocknative also attaches a logger so users can see all the steps in-between submission and execution. As such, Blocknative is able to provide users with a list of decoded internal transactions on top of accurate slippage, net-balance changes and smart contract calls before authorizing transactions.

Simple transactions such as wallet-to-wallet transfers or an NFT mint can be done with a single simulation, Transacting with more complicated protocols, such as initiating a swap on a DEX or executing an arbitrage, will typically require simulating multiple transactions in one bundle. 

 

What Makes Simulating Bundles Different Than Simulating Single Transactions

Because we need to fork the chain, there is a large infrastructure requirement to simulate at scale. Furthermore, the stock version of the most popular Ethereum client, go-ethereum, does not include the ability to simulate more than one transaction on top of this new forked Ethereum state. 

In order to simulate more than one transaction, we have added the ability to take the intermediate state that your initial simulation has created and feed it into the simulation of the next transaction. This allows for multiple transactions to be executed sequentially in the EVM, as well as collecting their internal transaction logs and accumulating the net balance changes of impacted accounts.

 

Simulation Bundles in Action

Transaction Preview comes in the form of a REST endpoint, to which users can send the details of one or more transactions. In return, the user will receive a payload describing the execution of the transaction(s) in the latest block height. A few examples of simulated bundles can be found below.

 

Simple bundle: approve and swap

One of the biggest limitations with single transaction simulations, as available via RPC on stock go-ethereum, is that they do not work well with contracts interacting with the ERC20 approve() pattern. This pattern can be seen in most decentralized exchanges. When using a DEX like Uniswap, the Uniswap router is the contract initiating the token transfers (via internal transactions), so the user must grant approval to that contract to transfer. In a single simulation, you will not be able to approve and swap, but now you can! To see an example, we are going to approve a transfer of Balancer tokens from Vitalik’s account, and we will then swap those tokens for ETH.

Request:


curl --location --request POST 'https://api.blocknative.com/simulate' \
--header 'credentials: :' \
--header 'Content-Type: application/json' \
--data-raw '{
  "system":"ethereum",
  "network":"main",
  "transactions":[
      {
    "to":"0xba100000625a3754423978a60c9317c58a424e3D",
    "from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000785ee10d5da46d900f436a000000000"
  },
      {
    "to":"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
    "from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x5ae401dc000000000000000000000000000000000000000000000000000000006268839f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f3000000000000000000000000000000000000000000000000058d15e1762800000000000000000000000000000000000000000000000000004197beeed085f0f70000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000"
  }
  ]
}'

 

Please scroll to see the full code sample

Response:

{
    "status": "simulated",
    "simulatedBlockNumber": -1,
    "transactions": [
        {
            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "to": "0xba100000625a3754423978a60c9317c58a424e3D",
            "value": 0,
            "gas": 12407056,
            "input": "0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000785ee10d5da46d900f436a000000000",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        },
        {
            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "to": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
            "value": 0,
            "gas": 12407056,
            "input": "0x5ae401dc000000000000000000000000000000000000000000000000000000006268839f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f3000000000000000000000000000000000000000000000000058d15e1762800000000000000000000000000000000000000000000000000004197beeed085f0f70000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        }
    ],
    "internalTransactions": [
        [],
        [
            {
                "type": "DELEGATECALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "input": "0x472b43f3000000000000000000000000000000000000000000000000058d15e1762800000000000000000000000000000000000000000000000000004197beeed085f0f70000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
                "gas": 12188140,
                "gasUsed": 149721,
                "value": "0",
                "contractCall": {
                    "methodName": "swapExactTokensForTokens",
                    "params": {
                        "amountIn": "400000000000000000",
                        "amountOutMin": "4726456266858557687",
                        "path": [
                            "0xba100000625a3754423978a60c9317c58a424e3d",
                            "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                            "0x6b175474e89094c44da98b954eedeac495271d0f"
                        ],
                        "to": "0xdabc14db1667def2d9b105e64649747271915d88"
                    },
                    "contractAddress": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                    "contractType": "Uniswap V3: Router 2"
                }
            },
            {
                "type": "CALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0xba100000625a3754423978a60c9317c58a424e3d",
                "input": "0x23b872dd000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000a70d458a4d9bc0e6571565faee18a48da5c0d593000000000000000000000000000000000000000000000000058d15e176280000",
                "gas": 11992463,
                "gasUsed": 25509,
                "value": "0",
                "contractCall": {
                    "methodName": "transferFrom",
                    "params": {
                        "_from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                        "_to": "0xa70d458a4d9bc0e6571565faee18a48da5c0d593",
                        "_value": "400000000000000000"
                    },
                    "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d",
                    "contractType": "erc20",
                    "contractAlias": "BAL",
                    "contractDecimals": 18,
                    "contractName": "Balancer",
                    "decimalValue": "0.4"
                }
            },
            {
                "type": "CALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0xa70d458a4d9bc0e6571565faee18a48da5c0d593",
                "input": "0x022c0d9f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077bd4636bbd86000000000000000000000000a478c2975ab1ea89e8196811f51a7b7ade33eb1100000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                "gas": 11951169,
                "gasUsed": 47761,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0xa70d458a4d9bc0e6571565faee18a48da5c0d593",
                "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "input": "0xa9059cbb000000000000000000000000a478c2975ab1ea89e8196811f51a7b7ade33eb1100000000000000000000000000000000000000000000000000077bd4636bbd86",
                "gas": 11751236,
                "gasUsed": 12862,
                "value": "0",
                "contractCall": {
                    "methodName": "transfer",
                    "params": {
                        "_to": "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                        "_value": "2106476968263046"
                    },
                    "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "contractType": "erc20",
                    "contractAlias": "WETH",
                    "contractDecimals": 18,
                    "contractName": "Wrapped Ether",
                    "decimalValue": "0.002106476968263046"
                }
            },
            {
                "type": "CALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                "input": "0x022c0d9f0000000000000000000000000000000000000000000000005106d4a677a2c4240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dabc14db1667def2d9b105e64649747271915d8800000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                "gas": 11894811,
                "gasUsed": 43533,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
                "input": "0xa9059cbb000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000005106d4a677a2c424",
                "gas": 11698250,
                "gasUsed": 11074,
                "value": "0",
                "contractCall": {
                    "methodName": "transfer",
                    "params": {
                        "_to": "0xdabc14db1667def2d9b105e64649747271915d88",
                        "_value": "5838587778369242148"
                    },
                    "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
                    "contractType": "erc20",
                    "contractAlias": "DAI",
                    "contractDecimals": 18,
                    "contractName": "Dai Stablecoin",
                    "decimalValue": "5.838587778369242148"
                }
            }
        ]
    ],
    "netBalanceChanges": [
        [],
        [
            {
                "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                "balanceChanges": [
                    {
                        "delta": "-400000000000000000",
                        "asset": {
                            "type": "erc20",
                            "symbol": "BAL",
                            "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xa70d458a4d9bc0e6571565faee18a48da5c0d593",
                                "amount": "-400000000000000000"
                            }
                        ]
                    },
										{
                        "delta": "5839218345266818680",
                        "asset": {
                            "type": "erc20",
                            "symbol": "DAI",
                            "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                                "amount": "5839218345266818680"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0xa70d458a4d9bc0e6571565faee18a48da5c0d593",
                "balanceChanges": [
                    {
                        "delta": "400000000000000000",
                        "asset": {
                            "type": "erc20",
                            "symbol": "BAL",
                            "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                                "amount": "400000000000000000"
                            }
                        ]
                    },
                    {
                        "delta": "-2106476968263046",
                        "asset": {
                            "type": "erc20",
                            "symbol": "WETH",
                            "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                                "amount": "-2106476968263046"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                "balanceChanges": [
                    {
                        "delta": "2106476968263046",
                        "asset": {
                            "type": "erc20",
                            "symbol": "WETH",
                            "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xa70d458a4d9bc0e6571565faee18a48da5c0d593",
                                "amount": "2106476968263046"
                            }
                        ]
                    },
                    {
                        "delta": "-5838587778369242148",
                        "asset": {
                            "type": "erc20",
                            "symbol": "DAI",
                            "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xdabc14db1667def2d9b105e64649747271915d88",
                                "amount": "-5838587778369242148"
                            }
                        ]
                    }
                ]
            }
        ]
    ],
    "error": [],
    "simDetails": {
        "blockNumber": -1,
        "performanceProfile": {
            "breakdown": [
                {
                    "label": "detected",
                    "timeStamp": "2022-04-26T23:26:18.669Z"
                },
                {
                    "label": "traceStart",
                    "timeStamp": "2022-04-26T23:26:18.671Z"
                },
                {
                    "label": "traceEnd",
                    "timeStamp": "2022-04-26T23:26:18.795Z"
                },
                {
                    "label": "dispatch",
                    "timeStamp": "2022-04-26T23:26:18.796Z"
                }
            ]
        },
        "e2eMs": 127
    },
    "serverVersion": "0.134.1",
    "system": "ethereum",
    "network": "main",
    "contractCall": [
        {
            "status": "fulfilled",
            "value": {
                "methodName": "approve",
                "params": {
                    "_spender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                    "_value": "10000000000000000000000000000000000000"
                },
                "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3D",
                "contractType": "erc20",
                "contractAlias": "BAL",
                "contractDecimals": 18,
                "contractName": "Balancer"
            }
        },
        {
            "status": "fulfilled",
            "value": {
                "contractType": "multicall",
                "data": {
                    "method_call": {
                        "methodName": "multicall0",
                        "params": {
                            "data": [
                                "0x472b43f3000000000000000000000000000000000000000000000000058d15e1762800000000000000000000000000000000000000000000000000004197beeed085f0f70000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f"
                            ],
                            "deadline": "1651016607"
                        }
                    }
                },
                "subCalls": [
                    {
                        "methodName": "swapExactTokensForTokens",
                        "params": {
                            "amountIn": "400000000000000000",
                            "amountOutMin": "4726456266858557687",
                            "path": [
                                "0xba100000625a3754423978a60c9317c58a424e3d",
                                "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                                "0x6b175474e89094c44da98b954eedeac495271d0f"
                            ],
                            "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
                        },
                        "contractAddress": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
                    }
                ]
            }
        }
    ]
}

 

Please scroll to see the full code sample

 

DEX arbitrage: approve, swap, approve, swap

Profiting from arbitrage and liquidation opportunities can be tricky, but using Blocknative’s simulation bundles you can simulate the entire path of your arbitrage. In this example, Vitalik will be approving Balancer, trading it for DAI on Uniswap, then approving DAI, and finally swapping on Sushiswap! Because DAI and BAL are heavily arbitraged pools already, in our example it looks like Vitalik did not make any profit from this trade. However, using Blocknative he has the tools to continuously tweak and re-simulate the transactions again and again until he does!

Request:

{
  "system":"ethereum",
  "network":"main",
  "transactions":[
      {
    "to":"0xba100000625a3754423978a60c9317c58a424e3D",
    "from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000785ee10d5da46d900f436a000000000"
  },
      {
    "to":"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
    "from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x5ae401dc000000000000000000000000000000000000000000000000000000006268ca920000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f300000000000000000000000000000000000000000000000006f05b59d3b200000000000000000000000000000000000000000000000000005092f7b027db98910000000000000000000000000000000000000000000000000000000000000080000000000000000000000000d8dA6BF26964aF9D7eEd9e03E53415D37aA960450000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000"
  },
  {
    "to":"0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc4500000000000000000000000000000125dfa371a19e6f7cb54395ca0000000000"
  },
  {
    "to":"0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
    "from":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x38ed173900000000000000000000000000000000000000000000000064b7ad6b179b400000000000000000000000000000000000000000000000000006ec4903e835a29a00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000d8dA6BF26964aF9D7eEd9e03E53415D37aA96045000000000000000000000000000000000000000000000000000000006268caef00000000000000000000000000000000000000000000000000000000000000030000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d"
  }
  ]
}

 

Please scroll to see the full code sample

 

Response:


{
    "status": "simulated",
    "simulatedBlockNumber": 14750897,
    "transactions": [
        {
            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "to": "0xba100000625a3754423978a60c9317c58a424e3D",
            "value": 0,
            "gas": 12407056,
            "input": "0x095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000785ee10d5da46d900f436a000000000",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        },
        {
            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "to": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
            "value": 0,
            "gas": 12407056,
            "input": "0x5ae401dc00000000000000000000000000000000000000000000000000000000627ad8ef00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e4472b43f3000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000018ee7a62f98018c0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000d8dA6BF26964aF9D7eEd9e03E53415D37aA960450000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        },
        {
            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "to": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
            "value": 0,
            "gas": 12407056,
            "input": "0x095ea7b3000000000000000000000000d9e1cE17f2641f24aE83637ab66a2cca9C378B9F00000000000000000000000000000125dfa371a19e6f7cb54395ca0000000000",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        },
        {
            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
            "to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
            "value": 0,
            "gas": 12407056,
            "input": "0x38ed173900000000000000000000000000000000000000000000000001f2a18fbb7e01ef000000000000000000000000000000000000000000000000002d7623da889e0a00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000d8dA6BF26964aF9D7eEd9e03E53415D37aA96045000000000000000000000000000000000000000000000000000665178b1357c500000000000000000000000000000000000000000000000000000000000000040000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000087d73e916d7057945c9bcd8cdd94e42a6f47f776000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        }
    ],
    "internalTransactions": [
        [],
        [
            {
                "type": "DELEGATECALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "input": "0x472b43f3000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000018ee7a62f98018c0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
                "gas": 12188532,
                "gasUsed": 91834,
                "value": "0",
                "contractCall": {
                    "methodName": "swapExactTokensForTokens",
                    "params": {
                        "amountIn": "10000000000000000",
                        "amountOutMin": "112281741679919500",
                        "path": [
                            "0xba100000625a3754423978a60c9317c58a424e3d",
                            "0x6b175474e89094c44da98b954eedeac495271d0f"
                        ],
                        "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                    },
                    "contractAddress": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                    "contractType": "Uniswap V3: Router 2"
                }
            },
            {
                "type": "CALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0xba100000625a3754423978a60c9317c58a424e3d",
                "input": "0x23b872dd000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000006f4795e8a5669ab8d69f79fb27b46e069f6619aa000000000000000000000000000000000000000000000000002386f26fc10000",
                "gas": 11992839,
                "gasUsed": 25509,
                "value": "0",
                "contractCall": {
                    "methodName": "transferFrom",
                    "params": {
                        "_from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                        "_to": "0x6f4795e8a5669ab8d69f79fb27b46e069f6619aa",
                        "_value": "10000000000000000"
                    },
                    "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d",
                    "contractType": "erc20",
                    "contractAlias": "BAL",
                    "contractDecimals": 18,
                    "contractName": "Balancer",
                    "decimalValue": "0.01"
                }
            },
            {
                "type": "CALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0x6f4795e8a5669ab8d69f79fb27b46e069f6619aa",
                "input": "0x022c0d9f00000000000000000000000000000000000000000000000001f2a18fbb7e01ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                "gas": 11952187,
                "gasUsed": 43541,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0x6f4795e8a5669ab8d69f79fb27b46e069f6619aa",
                "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
                "input": "0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000001f2a18fbb7e01ef",
                "gas": 11754729,
                "gasUsed": 11074,
                "value": "0",
                "contractCall": {
                    "methodName": "transfer",
                    "params": {
                        "_to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                        "_value": "140352177099899375"
                    },
                    "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
                    "contractType": "erc20",
                    "contractAlias": "DAI",
                    "contractDecimals": 18,
                    "contractName": "Dai Stablecoin",
                    "decimalValue": "0.140352177099899375"
                }
            }
        ],
        [],
        [
            {
                "type": "CALL",
                "from": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
                "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
                "input": "0x23b872dd000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000261961be72cd4153fe57ab11e46219fa9ac967f700000000000000000000000000000000000000000000000001f2a18fbb7e01ef",
                "gas": 12162240,
                "gasUsed": 13575,
                "value": "0",
                "contractCall": {
                    "methodName": "transferFrom",
                    "params": {
                        "_from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                        "_to": "0x261961be72cd4153fe57ab11e46219fa9ac967f7",
                        "_value": "140352177099899375"
                    },
                    "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
                    "contractType": "erc20",
                    "contractAlias": "DAI",
                    "contractDecimals": 18,
                    "contractName": "Dai Stablecoin",
                    "decimalValue": "0.140352177099899375"
                }
            },
            {
                "type": "CALL",
                "from": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
                "to": "0x261961be72cd4153fe57ab11e46219fa9ac967f7",
                "input": "0x022c0d9f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006faf044c6793600000000000000000000000031d64f9403e82243e71c2af9d8f56c7dbe10c17800000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                "gas": 12145748,
                "gasUsed": 147879,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0x261961be72cd4153fe57ab11e46219fa9ac967f7",
                "to": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                "input": "0xa9059cbb00000000000000000000000031d64f9403e82243e71c2af9d8f56c7dbe10c1780000000000000000000000000000000000000000000000000006faf044c67936",
                "gas": 11942667,
                "gasUsed": 111065,
                "value": "0",
                "contractCall": {
                    "methodName": "transfer",
                    "params": {
                        "_to": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178",
                        "_value": "1964759713216822"
                    },
                    "contractAddress": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                    "contractType": "erc20",
                    "contractAlias": "NFTX",
                    "contractDecimals": 18,
                    "contractName": "NFTX",
                    "decimalValue": "0.001964759713216822"
                }
            },
            {
                "type": "CALL",
                "from": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                "to": "0x5566b3e5fc300a1b28c214b49a5950c34d00eb33",
                "input": "0x4a393149000000000000000000000000261961be72cd4153fe57ab11e46219fa9ac967f700000000000000000000000031d64f9403e82243e71c2af9d8f56c7dbe10c1780000000000000000000000000000000000000000000000000006faf044c67936",
                "gas": 11738531,
                "gasUsed": 37314,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0x5566b3e5fc300a1b28c214b49a5950c34d00eb33",
                "to": "0xbaf2eb7b0649b8c28970e7d9e8f5dee9b6f6d9fe",
                "input": "0xbe00bbd8f1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f6b20a3010614eeebf2138ccec99f028a61c811b3b1a3343b6ff635985c75c91f",
                "gas": 11547789,
                "gasUsed": 8263,
                "value": "0"
            },
            {
                "type": "DELEGATECALL",
                "from": "0xbaf2eb7b0649b8c28970e7d9e8f5dee9b6f6d9fe",
                "to": "0x2b33cf282f867a7ff693a66e11b0fcc5552e4425",
                "input": "0xbe00bbd8f1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f6b20a3010614eeebf2138ccec99f028a61c811b3b1a3343b6ff635985c75c91f",
                "gas": 11362050,
                "gasUsed": 2820,
                "value": "0"
            },
            {
                "type": "DELEGATECALL",
                "from": "0x5566b3e5fc300a1b28c214b49a5950c34d00eb33",
                "to": "0xde3a93028f2283cc28756b3674bd657eafb992f4",
                "input": "0x4a393149000000000000000000000000261961be72cd4153fe57ab11e46219fa9ac967f700000000000000000000000031d64f9403e82243e71c2af9d8f56c7dbe10c1780000000000000000000000000000000000000000000000000006faf044c67936",
                "gas": 11536573,
                "gasUsed": 18422,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0x5566b3e5fc300a1b28c214b49a5950c34d00eb33",
                "to": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                "input": "0x70a0823100000000000000000000000031d64f9403e82243e71c2af9d8f56c7dbe10c178",
                "gas": 11351231,
                "gasUsed": 8016,
                "value": "0",
                "contractCall": {
                    "methodName": "balanceOf",
                    "params": {
                        "": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178"
                    },
                    "contractAddress": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                    "contractType": "erc20",
                    "contractAlias": "NFTX",
                    "contractDecimals": 18,
                    "contractName": "NFTX"
                }
            },
            {
                "type": "CALL",
                "from": "0x5566b3e5fc300a1b28c214b49a5950c34d00eb33",
                "to": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                "input": "0x70a08231000000000000000000000000261961be72cd4153fe57ab11e46219fa9ac967f7",
                "gas": 11342554,
                "gasUsed": 2016,
                "value": "0",
                "contractCall": {
                    "methodName": "balanceOf",
                    "params": {
                        "": "0x261961be72cd4153fe57ab11e46219fa9ac967f7"
                    },
                    "contractAddress": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                    "contractType": "erc20",
                    "contractAlias": "NFTX",
                    "contractDecimals": 18,
                    "contractName": "NFTX"
                }
            },
            {
                "type": "CALL",
                "from": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
                "to": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178",
                "input": "0x022c0d9f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a50b6302e760000000000000000000000009bffa3ce3e56d0d26447a45771fec76bd417302200000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                "gas": 11997420,
                "gasUsed": 49608,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178",
                "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "input": "0xa9059cbb0000000000000000000000009bffa3ce3e56d0d26447a45771fec76bd417302200000000000000000000000000000000000000000000000000003a50b6302e76",
                "gas": 11796657,
                "gasUsed": 12862,
                "value": "0",
                "contractCall": {
                    "methodName": "transfer",
                    "params": {
                        "_to": "0x9bffa3ce3e56d0d26447a45771fec76bd4173022",
                        "_value": "64118328405622"
                    },
                    "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "contractType": "erc20",
                    "contractAlias": "WETH",
                    "contractDecimals": 18,
                    "contractName": "Wrapped Ether",
                    "decimalValue": "0.000064118328405622"
                }
            },
            {
                "type": "CALL",
                "from": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
                "to": "0x9bffa3ce3e56d0d26447a45771fec76bd4173022",
                "input": "0x022c0d9f000000000000000000000000000000000000000000000000002db054ac442e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                "gas": 11946555,
                "gasUsed": 53183,
                "value": "0"
            },
            {
                "type": "CALL",
                "from": "0x9bffa3ce3e56d0d26447a45771fec76bd4173022",
                "to": "0xba100000625a3754423978a60c9317c58a424e3d",
                "input": "0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000002db054ac442e31",
                "gas": 11746617,
                "gasUsed": 17911,
                "value": "0",
                "contractCall": {
                    "methodName": "transfer",
                    "params": {
                        "_to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                        "_value": "12860251665870385"
                    },
                    "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d",
                    "contractType": "erc20",
                    "contractAlias": "BAL",
                    "contractDecimals": 18,
                    "contractName": "Balancer",
                    "decimalValue": "0.012860251665870385"
                }
            }
        ]
    ],
    "netBalanceChanges": [
        [],
        [
            {
                "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                "balanceChanges": [
                    {
                        "delta": "-10000000000000000",
                        "asset": {
                            "type": "erc20",
                            "symbol": "BAL",
                            "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x6f4795e8a5669ab8d69f79fb27b46e069f6619aa",
                                "amount": "-10000000000000000"
                            }
                        ]
                    },
                    {
                        "delta": "140352177099899375",
                        "asset": {
                            "type": "erc20",
                            "symbol": "DAI",
                            "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x6f4795e8a5669ab8d69f79fb27b46e069f6619aa",
                                "amount": "140352177099899375"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0x6f4795e8a5669ab8d69f79fb27b46e069f6619aa",
                "balanceChanges": [
                    {
                        "delta": "10000000000000000",
                        "asset": {
                            "type": "erc20",
                            "symbol": "BAL",
                            "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                                "amount": "10000000000000000"
                            }
                        ]
                    },
                    {
                        "delta": "-140352177099899375",
                        "asset": {
                            "type": "erc20",
                            "symbol": "DAI",
                            "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                                "amount": "-140352177099899375"
                            }
                        ]
                    }
                ]
            }
        ],
        [],
        [
            {
                "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                "balanceChanges": [
                    {
                        "delta": "-140352177099899375",
                        "asset": {
                            "type": "erc20",
                            "symbol": "DAI",
                            "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x261961be72cd4153fe57ab11e46219fa9ac967f7",
                                "amount": "-140352177099899375"
                            }
                        ]
                    },
                    {
                        "delta": "12860251665870385",
                        "asset": {
                            "type": "erc20",
                            "symbol": "BAL",
                            "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x9bffa3ce3e56d0d26447a45771fec76bd4173022",
                                "amount": "12860251665870385"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0x261961be72cd4153fe57ab11e46219fa9ac967f7",
                "balanceChanges": [
                    {
                        "delta": "140352177099899375",
                        "asset": {
                            "type": "erc20",
                            "symbol": "DAI",
                            "contractAddress": "0x6b175474e89094c44da98b954eedeac495271d0f"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                                "amount": "140352177099899375"
                            }
                        ]
                    },
                    {
                        "delta": "-1964759713216822",
                        "asset": {
                            "type": "erc20",
                            "symbol": "NFTX",
                            "contractAddress": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178",
                                "amount": "-1964759713216822"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178",
                "balanceChanges": [
                    {
                        "delta": "1964759713216822",
                        "asset": {
                            "type": "erc20",
                            "symbol": "NFTX",
                            "contractAddress": "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x261961be72cd4153fe57ab11e46219fa9ac967f7",
                                "amount": "1964759713216822"
                            }
                        ]
                    },
                    {
                        "delta": "-64118328405622",
                        "asset": {
                            "type": "erc20",
                            "symbol": "WETH",
                            "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x9bffa3ce3e56d0d26447a45771fec76bd4173022",
                                "amount": "-64118328405622"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0x9bffa3ce3e56d0d26447a45771fec76bd4173022",
                "balanceChanges": [
                    {
                        "delta": "64118328405622",
                        "asset": {
                            "type": "erc20",
                            "symbol": "WETH",
                            "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0x31d64f9403e82243e71c2af9d8f56c7dbe10c178",
                                "amount": "64118328405622"
                            }
                        ]
                    },
                    {
                        "delta": "-12860251665870385",
                        "asset": {
                            "type": "erc20",
                            "symbol": "BAL",
                            "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3d"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                                "amount": "-12860251665870385"
                            }
                        ]
                    }
                ]
            }
        ]
    ],
    "error": [],
    "simDetails": {
        "blockNumber": 14750897,
        "performanceProfile": {
            "breakdown": [
                {
                    "label": "detected",
                    "timeStamp": "2022-05-10T21:24:58.760Z"
                },
                {
                    "label": "traceStart",
                    "timeStamp": "2022-05-10T21:24:58.765Z"
                },
                {
                    "label": "traceEnd",
                    "timeStamp": "2022-05-10T21:24:58.878Z"
                },
                {
                    "label": "dispatch",
                    "timeStamp": "2022-05-10T21:24:58.879Z"
                }
            ]
        },
        "e2eMs": 119
    },
    "serverVersion": "0.135.1",
    "system": "ethereum",
    "network": "main",
    "contractCall": [
        {
            "status": "fulfilled",
            "value": {
                "methodName": "approve",
                "params": {
                    "_spender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                    "_value": "10000000000000000000000000000000000000"
                },
                "contractAddress": "0xba100000625a3754423978a60c9317c58a424e3D",
                "contractType": "erc20",
                "contractAlias": "BAL",
                "contractDecimals": 18,
                "contractName": "Balancer"
            }
        },
        {
            "status": "fulfilled",
            "value": {
                "contractType": "multicall",
                "data": {
                    "method_call": {
                        "methodName": "multicall0",
                        "params": {
                            "data": [
                                "0x472b43f3000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000018ee7a62f98018c0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f"
                            ],
                            "deadline": "1652218095"
                        }
                    }
                },
                "subCalls": [
                    {
                        "methodName": "swapExactTokensForTokens",
                        "params": {
                            "amountIn": "10000000000000000",
                            "amountOutMin": "112281741679919500",
                            "path": [
                                "0xba100000625a3754423978a60c9317c58a424e3d",
                                "0x6b175474e89094c44da98b954eedeac495271d0f"
                            ],
                            "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                        },
                        "contractAddress": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
                    }
                ]
            }
        },
        {
            "status": "fulfilled",
            "value": {
                "methodName": "approve",
                "params": {
                    "_spender": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
                    "_value": "100000000000000000000000000000000000000000"
                },
                "contractAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
                "contractType": "erc20",
                "contractAlias": "DAI",
                "contractDecimals": 18,
                "contractName": "Dai Stablecoin"
            }
        },
        {
            "status": "fulfilled",
            "value": {
                "methodName": "swapExactTokensForTokens",
                "params": {
                    "amountIn": "140352177099899375",
                    "amountOutMin": "12796270314298890",
                    "deadline": "1800001652217797",
                    "path": [
                        "0x6b175474e89094c44da98b954eedeac495271d0f",
                        "0x87d73e916d7057945c9bcd8cdd94e42a6f47f776",
                        "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                        "0xba100000625a3754423978a60c9317c58a424e3d"
                    ],
                    "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                },
                "contractAddress": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F"
            }
        }
    ]
}

 

Please scroll to see the full code sample

 

Rebase arbitrage: swap and trigger rebase

There is an entire class of MEV focused around taking advantage of rebases that have been demonstrated many times in the wild. The idea is to sandwich your transactions around a rebase to be the first person to take advantage of this new EVM state. With simulation bundling, users don’t have to wait for a live update to happen to test their strategy.  Instead, users can simultaneously submit the transaction to update the rebase and simulate their transaction against this state change to experiment with selling the token. In the example below, we will be arbitraging the rebasing token DIGG by buying the token before rebase and then triggering the rebase from the authorized account. From there you can experiment with selling the token.

Request:

curl --location --request POST 'https://staging.api.blocknative.com/simulate' \
--header 'credentials: 941ed8dd-b522-4728-bebe-eec7c026eb5a:aa58b01b-6773-4447-ab4e-4fabf15858a4' \
--header 'Content-Type: application/json' \
--data-raw '{
  "system":"ethereum",
  "network":"main",
  "transactions":[
      {
    "to":"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
    "from":"0xdaBc14dB1667def2d9B105e64649747271915d88",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0x5ae401dc000000000000000000000000000000000000000000000000000000006269e3420000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f3000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000e1f4260000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000798d1be841a82a273720ce31c822c61a67a601c300000000000000000000000000000000000000000000000000000000"
  },
  {
    "to":"0x6fb00a180781e75f87e2b690af0196baa77c7e7c",
    "from":"0xba887c8e396f24e0817be13839850de454ac7e45",
    "gas":12407056,
    "maxFeePerGas":82306635634,
    "maxPriorityFeePerGas":2.14,
    "value":0,
    "input":"0xaf14052c"
  }
  ]
}'

 

Please scroll to see the full code sample

Response:

{
    "status": "simulated",
    "simulatedBlockNumber": -1,
    "transactions": [
        {
            "from": "0xdaBc14dB1667def2d9B105e64649747271915d88",
            "to": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
            "value": 0,
            "gas": 12407056,
            "input": "0x5ae401dc000000000000000000000000000000000000000000000000000000006269e3420000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f3000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000e1f4260000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000798d1be841a82a273720ce31c822c61a67a601c300000000000000000000000000000000000000000000000000000000",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        },
        {
            "from": "0xba887c8e396f24e0817be13839850de454ac7e45",
            "to": "0x6fb00a180781e75f87e2b690af0196baa77c7e7c",
            "value": 0,
            "gas": 12407056,
            "input": "0xaf14052c",
            "type": 2,
            "maxFeePerGas": 82306635634,
            "maxPriorityFeePerGas": 2.14
        }
    ],
    "internalTransactions": [
        [
            {
                "type": "DELEGATECALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "input": "0x472b43f3000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000e1f4260000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000798d1be841a82a273720ce31c822c61a67a601c3",
                "gas": 12188175,
                "gasUsed": 8038,
                "value": "0",
                "contractCall": {
                    "methodName": "swapExactTokensForTokens",
                    "params": {
                        "amountIn": "100000000000000000",
                        "amountOutMin": "14808102",
                        "path": [
                            "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                            "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
                            "0x798d1be841a82a273720ce31c822c61a67a601c3"
                        ],
                        "to": "0xdabc14db1667def2d9b105e64649747271915d88"
                    },
                    "contractAddress": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                    "contractType": "Uniswap V3: Router 2"
                }
            },
            {
                "type": "CALL",
                "from": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
                "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "input": "0x23b872dd000000000000000000000000dabc14db1667def2d9b105e64649747271915d88000000000000000000000000bb2b8038a1640196fbe3e38816f3e67cba72d940000000000000000000000000000000000000000000000000016345785d8a0000",
                "gas": 11992472,
                "gasUsed": 2509,
                "value": "0",
                "contractCall": {
                    "methodName": "transferFrom",
                    "params": {
                        "_from": "0xdabc14db1667def2d9b105e64649747271915d88",
                        "_to": "0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
                        "_value": "100000000000000000"
                    },
                    "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "contractType": "erc20",
                    "contractAlias": "WETH",
                    "contractDecimals": 18,
                    "contractName": "Wrapped Ether",
                    "decimalValue": "0.1"
                }
            }
        ],
        [
            {
                "type": "CALL",
                "from": "0x6fb00a180781e75f87e2b690af0196baa77c7e7c",
                "to": "0x1b228a749077b8e307c5856ce62ef35d96dca2ea",
                "input": "0xaf14052c",
                "gas": 12187228,
                "gasUsed": 14052,
                "value": "0"
            },
            {
                "type": "DELEGATECALL",
                "from": "0x1b228a749077b8e307c5856ce62ef35d96dca2ea",
                "to": "0xe345465b36cc55275250f30bd32127d3bfe45d53",
                "input": "0xaf14052c",
                "error": "execution reverted",
                "gas": 11989683,
                "gasUsed": 6777,
                "value": "0"
            }
        ]
    ],
    "netBalanceChanges": [
        [
            {
                "address": "0xdabc14db1667def2d9b105e64649747271915d88",
                "balanceChanges": [
                    {
                        "delta": "-100000000000000000",
                        "asset": {
                            "type": "erc20",
                            "symbol": "WETH",
                            "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
                                "amount": "-100000000000000000"
                            }
                        ]
                    }
                ]
            },
            {
                "address": "0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
                "balanceChanges": [
                    {
                        "delta": "100000000000000000",
                        "asset": {
                            "type": "erc20",
                            "symbol": "WETH",
                            "contractAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        },
                        "breakdown": [
                            {
                                "counterparty": "0xdabc14db1667def2d9b105e64649747271915d88",
                                "amount": "100000000000000000"
                            }
                        ]
                    }
                ]
            }
        ],
        []
    ],
    "error": [],
    "simDetails": {
        "blockNumber": -1,
        "performanceProfile": {
            "breakdown": [
                {
                    "label": "detected",
                    "timeStamp": "2022-04-28T00:24:34.445Z"
                },
                {
                    "label": "traceStart",
                    "timeStamp": "2022-04-28T00:24:34.447Z"
                },
                {
                    "label": "traceEnd",
                    "timeStamp": "2022-04-28T00:24:34.459Z"
                },
                {
                    "label": "dispatch",
                    "timeStamp": "2022-04-28T00:24:34.459Z"
                }
            ]
        },
        "e2eMs": 14
    },
    "serverVersion": "0.133.0-0.4.8",
    "system": "ethereum",
    "network": "main",
    "contractCall": [
        {
            "status": "fulfilled",
            "value": {
                "contractType": "multicall",
                "data": {
                    "method_call": {
                        "methodName": "multicall0",
                        "params": {
                            "data": [
                                "0x472b43f3000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000e1f4260000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dabc14db1667def2d9b105e64649747271915d880000000000000000000000000000000000000000000000000000000000000003000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000798d1be841a82a273720ce31c822c61a67a601c3"
                            ],
                            "deadline": "1651106626"
                        }
                    }
                },
                "subCalls": [
                    {
                        "methodName": "swapExactTokensForTokens",
                        "params": {
                            "amountIn": "100000000000000000",
                            "amountOutMin": "14808102",
                            "path": [
                                "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                                "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
                                "0x798d1be841a82a273720ce31c822c61a67a601c3"
                            ],
                            "to": "0xdabc14db1667def2d9b105e64649747271915d88"
                        },
                        "contractAddress": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
                    }
                ]
            }
        },
        {
            "status": "fulfilled",
            "value": {
                "methodName": "rebase",
                "params": {},
                "contractAddress": "0x6fb00a180781e75f87e2b690af0196baa77c7e7c",
                "contractType": "Orchestrator"
            }
        }
    ]
}

 

Please scroll to see the full code sample

 

Using Simulation Bundles for Advanced Arbitrage

MEV searchers can also use simulation bundles to assist with additional forms of advanced forms of arbitrage, such as oracle or JIT arbitrage. We will further discuss using simulations for advanced arbitrage in a future post.

 

How to Leverage Bundles in Transaction Preview Today

Web3 developers and traders can now go hands-on with bundled simulations using our Transaction Preview API to: 

  • Show accurate slippage, net balance changes, and contract calls across several transactions — to ensure you always get on-chain with confidence.
  • Enable better trade execution by varying inputs like gas limit, gas price, and transaction input to see how it changes the outputs. 
  • Get insights from the mempool to optimize development. 
  • And more.

You can begin prototyping today by creating a free account and reviewing the Transaction Preview API docs. Once you are ready to push to production, simply sign up for a commercial plan

Create an account today

As always, please join our Discord Community if you have questions, concerns, or recommendations.

Observe Ethereum

Blocknative's proven & powerful enterprise-grade infrastructure makes it easy for builders and traders to work with mempool data.

Visit ethernow.xyz

Want to keep reading?

Good choice! We have more articles.

ethernow-transaction-explorer-now-supports-the-sepolia-testnet
Ethereum

Ethernow Transaction Explorer Now Supports the Sepolia Testnet

Introducing the Ethernow Sepolia Testnet Transaction Explorer The Ethernow Transaction Explorer has..

blobsplaining-part-2:-lessons-from-the-first-eip-4844-congestion-event
Gas

Blobsplaining Part 2: Lessons From The First EIP-4844 Congestion Event

We recently witnessed the first network congestion event post-Dencun with the blobscription craze,..

announcing-degen-support-in-web3-onboard
Web3 Onboard

Announcing Degen Support in Web3 Onboard

Exciting news for the Degen community! We are thrilled to announce that Web3 Onboard has enabled..

Connect with us. Build with us.

We love to connect with teams who are building with Blocknative. Tell us about your team and what you would like to learn.

"After first building our own infrastructure, we appreciate that mempool management is a difficult, expensive problem to solve at scale. That's why we partner with Blocknative to power the transaction notifications in our next-generation wallet."

Schedule a demo