Skip to content

Feature Request: Option to skip/bypass simulation for relay transactions (error 4211) #36

Description

@lvmShantanu

Problem

When using the Gelato Gasless SDK (@gelatocloud/gasless) on Base (chain 8453), transactions that are valid on-chain are being rejected with error code 4211 ("Simulation Failed") during Gelato's pre-broadcast simulation.

Context

Use case: Closing a perpetual trade immediately after opening one (Avantis Trading Protocol)
Method: relayer_sendTransaction and relayer_sendTransactionSync
Chain: Base (8453)
Smart Wallet: 0xFe53F81e87379e6730C0a2E0Afab0B7e011b1C55

Observed Behavior

Open trade is confirmed on-chain and verified via API
Close trade is submitted via Gelato relay → fails with 4211
Same close transaction submitted without Gelato succeeds
Retrying via Gelato after a few seconds also succeeds
Tenderly simulation of the same calldata also succeeds

This suggests Gelato's simulation RPC node has a slight block lag on Base, causing it to simulate against stale state.

Example Request IDs
57de54a4-502c-4b72-aac3-8ffe381fbcbe (sendTransactionSync)
96eee5d7-716f-495f-9824-941c117f870f (sendTransaction)
Error Response

{
  "id": 7,
  "jsonrpc": "2.0",
  "error": {
    "code": 4211,
    "data": "0x",
    "message": "Execution reverted for an unknown reason."
  }
}

Feature Request

Please consider adding one or both of the following:

  • skipSimulation: true option in sendTransaction / sendTransactionSync params to allow bypassing simulation and broadcasting directly (accepting the gas risk).

  • Built-in retry with backoff for 4211 errors, similar to the retries parameter that existed in the legacy @gelatonetwork/relay-sdk.

Current Workaround
Client-side retry logic with delay:

async function sendWithRetry(relayer, txParams, retries = 3, delayMs = 2000) {
  for (let i = 0; i < retries; i++) {
    try {
      return await relayer.sendTransaction(txParams);
    } catch (error) {
      const isSimulationFailed = error?.code === 4211;
      if (isSimulationFailed && i < retries - 1) {
        await new Promise((r) => setTimeout(r, delayMs));
        continue;
      }
      throw error;
    }
  }
}

Environment

SDK: @gelatocloud/gasless
Chain: Base (8453)
Payment: Sponsored (1Balance)
Date: February 16, 2026

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions