Estimating Solver Gas Charges

In Atlas, the solvers pay for the execution of their solverOps with their bonded atlETH balance. But estimating what a solver will pay before creating and signing their solverOp can be complicated. Here’s how solver gas cost payment flow happens under different scenarios.

Whenever there is some gas cost that a solver is required to reimburse, it is scaled up with 2 components - the bundler surcharge and the Atlas surcharge. i.e. if each of these surcharges are 50%, then when a solver is responsible for gas cost x, they will actually be charged for:

x(100%+50%+50%)=2xx \cdot \left(100\% + 50\% + 50\%\right) = 2x

The surcharge rates differ from chain to chain, but the calculations here use the Polygon deployment's surcharge figures.

Atlas iterates through solverOps, executing them in order of bid until a successful solverOp is found. If a solverOp is not reached because a winner is found before iteration reaches it, solver does not pay anything. However, if the solverOp is reached and executed:

  • and the solverOp fails

    • and failure was the bundler’s fault:

      • charge = nothing

    • and failure was the solver’s fault

      • charge = own solverOp cost with surcharges

  • and the solverOp succeeds

    • charge = (metacall tx cost - other solverOp costs) with surcharges

We can simplify the calculations further, because we know:

  • The Polygon deployment of Atlas is set to 50% bundler surcharge and 50% Atlas surcharge. So all base gas costs are scaled by a factor of 2.

  • The PFL DAppControl limits the userOp to 60k gas, requires minimal logic to pay handle bid distribution in the allocateValue hook, and has no other hooks. This means that the winning solver will need to pay for 450k - 500k gas (for all non-solverOp parts of the metacall tx) as well as the cost of their own solverOp execution.

  • The gas overhead charged for a failed solverOp, besides its own execution gas cost, is 40k - 50k gas.

Therefore, the max a solver should expect to pay from their bonded atlETH, on Atlas v1.1 on Polygon, for a PFL DAppControl metacall is:

If failure:

(solverOp.gas+50,000)solverOp.maxFeePerGas2\left(\text{solverOp.gas} + 50{,}000\right) \cdot \text{solverOp.maxFeePerGas} \cdot {2}

If success:

(solverOp.gas+500,000)solverOp.maxFeePerGas2\left(\text{solverOp.gas} + 500{,}000\right) \cdot \text{solverOp.maxFeePerGas} \cdot {2}

Auctioneer Inclusion

As a temporary measure, to ensure solverOps are not erroneously marked as failed when they would otherwise succeed, the auctioneer will only include solverOps where the solver’s bonded atlETH balance is at least:

11,000,000solverOp.maxFeePerGas11{,}000{,}000 \cdot \text{solverOp.maxFeePerGas}

This is to avoid a known bug affecting solvers with enough bonded atlETH to pay for the amount charged if they win the auction but not enough to pay for the amount charged if the entire gas limit of the metacall tx was consumed. This does not impact how much a solver will actually be charged. That is still determined using the success/failure formulae above.

Last updated