flashbots / mev-geth

Go implementation of MEV-Auction for Ethereum
GNU Lesser General Public License v3.0
786 stars 197 forks source link

callbundle: balance change of user-supplied addresses #107

Closed metachris closed 2 years ago

metachris commented 2 years ago

Allow users to submit a list of addresses they want to get the coinbase difference for as part of the simulation result.

thegostep commented 2 years ago

Would be best to create a new generalized rpc call for this purpose: https://github.com/flashbots/mev-geth/issues/101

method: 'eth_balanceDeltaBundle'

params: [{
    balanceDelta: [
        // This should return a uint256, for a future PR, we could add a "formatter" akin to the debug_trace*
        // JavaScript runtime environment
        { address: '0x0...', data: '0x0....' } 
    ],
    txs: [ ], // signed or unsigned txs, same as callBundle
    stateBlockNumber: 1,
    blockNumber: 1
}]

result: {
    balanceDelta: [
        { delta: 100 }
    ],
    txs: [ ... ] // normal callBundle tx return
}