fevm-replay

Who reads the gas left

A cheaper drop-in replacement is not invisible. We replaced WETH9, USDT and every Uniswap V2 pair with Fe ports that do the same thing for less gas, and replayed 200 mainnet blocks. Where a transaction then ended differently, fevm-replay proved from the call tree which contract read the gas left and acted on it. These are those contracts.

ContractTransactionsThrough the port ofExample

Why they read it

Account abstraction. ERC-4337 entry points meter each user operation with gasleft() and charge the account for what it used, so a cheaper token changes what the paymaster and the bundler are paid.

Proxies. A proxy such as USDC's reads the gas left to forward it to its implementation; less gas used below it changes what the caller sees.

Routers and bots. Aggregators, routers and MEV bots check the gas left between steps, pay builders tips worked out from it, or emit it in their own events.

Each row is a transaction whose difference is explained: the runs part at or under a call whose code ran GAS after the port ran, or the first differing log or state belongs to that account. Unlabeled addresses are contracts without a public name. Counts are transactions over blocks 26,400,000 to 26,400,199, with one port in place at a time.