Polygon FastLane
  • What is Polygon FastLane?
    • Overview
    • Design Principles
    • Components
    • Component Diagram
  • Getting Started as a Validator
    • Getting Started as a Validator
    • Connecting to a FastLane Sentry Node
      • Finding Your Enode Address & Peer ID
      • Adding FastLane as a Static Peer
    • Patching Your Sentry Nodes With The FastLane Patch
      • Installing from source
        • Patch Download
        • Patch Installation
      • Installing from packages
  • Withdrawing Validator Revenue
    • Validator Vault
      • Connect an Eligible Wallet
      • Revenue Redemption (withdrawal)
  • Searcher Guides
    • Getting Started as a Searcher
      • Solver Call Data
      • Submission Methods
      • Migration Guide for Searchers
    • Bundles (Backruns)
      • Bundle Format
      • Bid Submission
      • Bundle Requirements
      • Full Example
      • Subscribe Events
    • 4337 Bundles Integration Guide
      • Overview
      • How it works
      • RPC Reference
      • Examples
    • Searcher Contract Integration
      • Safety Considerations
      • atlasSolverCall
      • Direct Implementation
      • Proxy Implementation
      • Solver Concepts
      • Altas Bonding Concept
      • Bond atlETH
      • Estimating Solver Gas Charges
    • Addresses & Endpoints
    • Helpers
    • Common Mistakes
    • Atlas SDK's
  • Tools and Analytics
    • FastLane Bundle Explorer
      • Features Overview
      • Key Components
      • Usage Example
      • Error Codes & Troubleshooting
  • Key Concepts
    • Transaction Encoding
  • INFRASTRUCTURE
    • Health Status Endpoint
  • Reference
    • Relay JSON-RPC API
    • Relay REST API
    • Glossary of Terms
Powered by GitBook
On this page
  1. Searcher Guides
  2. Searcher Contract Integration

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) = 2xx⋅(100%+50%+50%)=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.maxFeePerGas⋅2\left(\text{solverOp.gas} + 50{,}000\right) \cdot \text{solverOp.maxFeePerGas} \cdot {2}(solverOp.gas+50,000)⋅solverOp.maxFeePerGas⋅2

If success:

(solverOp.gas+500,000)⋅solverOp.maxFeePerGas⋅2\left(\text{solverOp.gas} + 500{,}000\right) \cdot \text{solverOp.maxFeePerGas} \cdot {2}(solverOp.gas+500,000)⋅solverOp.maxFeePerGas⋅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,000⋅solverOp.maxFeePerGas11{,}000{,}000 \cdot \text{solverOp.maxFeePerGas}11,000,000⋅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.

PreviousBond atlETHNextAddresses & Endpoints

Last updated 5 months ago