> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenderly.co/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ: Simulations

> Answers to common questions about Tenderly simulations: dashboard visibility, API vs. RPC, state overrides, gas estimation, and rate limits.

<div className="flex flex-col gap-4 mt-8">
  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-see-simulations-in-dashboard" className="text-xl font-semibold">Can I see simulations in Dashboard?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        Dashboard shows simulations you've done via the Simulator UI, Simulation API (with `save` or `save_if_fails` set to `true`). RPC simulations do not get persisted and are not shown in the dashboard.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-delete-a-simulation" className="text-xl font-semibold">Can I delete a simulation?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        No, simulations cannot be deleted. Feel free to contact support at [support@tenderly.co](mailto:support@tenderly.co) should you have
        additional questions.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="does-running-the-same-simulation-multiple-times-co" className="text-xl font-semibold">Does running the same simulation multiple times cost the same as running it once?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        No - each API call to the simulate endpoint is counted as a separate request, even if you're sending identical payloads to simulate the exact same transaction multiple times.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-advance-a-block-number-timestamp-in-a-simula" className="text-xl font-semibold">Can I advance a block number/timestamp in a simulation?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        Yes, you can advance the block number or timestamp in a simulation using the [Increase block](/simulator-ui/parameters#increase-block) and [Override timestamp](/simulator-ui/parameters#override-timestamp) cheatcodes.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-simulate-transactions-on-behalf-of-a-user-wi" className="text-xl font-semibold">Can I simulate transactions on behalf of a user without their private key? In other words, can I simulate transactions originating from arbitrary addresses?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        In simulations, all addresses are unlocked by default. This means you can simulate transactions from any address
        to any address.

        Learn more about [how to use Transaction Simulator during development and testing
        here](/simulations/quickstart).
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="what-is-the-difference-between-api-and-rpc-simulat" className="text-xl font-semibold">What is the difference between API and RPC simulations?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        API simulations are made via the [Simulation API](/api-reference#/operations/simulateTransaction) endpoint, while RPC simulations are made via the [**`tenderly_simulateTransaction`**](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_simulateTransaction) RPC method.

        API simulations can be saved to the Dashboard by setting `save` or `save_if_fails` to `true`. RPC simulations are not saved to the Dashboard.

        Both API and RPC simulations provide the same simulation results, including transaction details, call traces, logs, and balance changes.
        Yes, you can use state overrides to modify contract storage variables, account balances, and other on-chain data for the simulation.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="which-rate-limits-are-applied-for-api-simulations" className="text-xl font-semibold">Which rate limits are applied for API simulations?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        API simulations are subject to rate limits. To discuss rate limits or request higher quotas for your account, [contact our sales team](https://tenderly.co/contact-us).
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="what-is-the-correct-format-of-a-tuple-when-simulat" className="text-xl font-semibold">What is the correct format of a tuple when simulating a transaction via the Dashboard?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        The format for tuples is JSON. Here’s an example of a tuple:

        ```json filename="example.json" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        {
          "tokenIn": "0x3Df2f692132f55b97cc9DA04A1fFFEA82F511333",
          "tokenOut": "0x31254874432f55b97cc9DA04A1fFFEA82F5d7122",
          "fee": 100,
          "recipient": "0x3D555552132f55b97cc9DA04A1fFFEA82F5d7122",
          "deadline": 1630403200,
          "amountIn": 10000,
          "amountOutMinimum": 9000,
          "sqrtPriceLimitX96": 7894561250
        }
        ```
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-test-the-effects-of-a-token-transfer-bef" className="text-xl font-semibold">How can I test the effects of a token transfer before deploying my smart contract?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/single-simulations"

        You can simulate token transfers by running a single simulation with the Simulation API. This will allow you to verify how tokens move between addresses and ensure the contract logic is correct before deploying.

        [Learn more →](/simulations/single-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-integrate-tenderly-simulations-into-the" className="text-xl font-semibold">How can I integrate Tenderly simulations into the UI for previewing transaction outcomes for users?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/overview"

        You can integrate Tenderly’s [Simulation API](/simulations/overview) or [Simulation RPC](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_simulateTransaction) into your dApp UI by calling the API to simulate transactions and display the resulting state changes, asset movements, and gas estimates to users before they confirm transactions.

        [Learn more →](/simulations/overview)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-simulate-contract-interactions-that-involve" className="text-xl font-semibold">Can I simulate contract interactions that involve multiple external smart contracts?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/bundled-simulations"

        Yes, bundled simulations allow you to test multiple contract interactions in one simulation. The state is updated after each transaction, allowing you to verify complex contract interactions.

        You can also simulate bundles of transaction using [**`tenderly_simulateBundle` RPC**](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_simulateBundle)

        [Learn more →](/simulations/bundled-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-does-the-simulation-api-handle-reverts-in-smar" className="text-xl font-semibold">How does the simulation API handle reverts in smart contract calls?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/single-simulations"

        When a transaction reverts during a simulation, the API provides detailed error messages to help debug the cause of the revert. This can be used to correct the logic before broadcasting the transaction.

        [Learn more →](/simulations/single-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-display-detailed-balance-changes-to-user" className="text-xl font-semibold">How can I display detailed balance changes to users after a simulated transaction?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/asset-balance-changes"

        The Tenderly Simulation API returns asset balance changes as part of the simulation result. You can use this data to show users how their token balances will change after the transaction.

        [Learn more →](/simulations/asset-balance-changes)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-estimate-the-gas-required-for-contract-funct" className="text-xl font-semibold">Can I estimate the gas required for contract functions using the simulation API?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/gas-estimation"

        Yes, the gas estimation feature in Tenderly allows you to simulate contract functions and get an accurate gas estimate before the transaction is executed. This helps ensure the transaction will succeed and minimizes gas costs.

        Besides Simulation API, you can use [**`tenderly_estimateGas`**](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_estimateGas) and [**`tenderly_estimateGasBundle`**](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_estimateGasBundle).

        [Learn more →](/simulations/gas-estimation)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="what-is-the-difference-between-gas-and-gasused" className="text-xl font-semibold">What is the difference between gas and gasUsed?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        Gas is the maximum gas limit allocated for the transaction (the "budget"), while gasUsed shows the actual gas consumed during execution.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-do-bundled-simulations-help-in-testing-complex" className="text-xl font-semibold">How do bundled simulations help in testing complex workflows with multiple contract calls?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/bundled-simulations"

        Bundled simulations allow you to simulate multiple transactions in sequence, preserving the state from one transaction to the next. This is useful for testing complex workflows, such as multi-contract interactions or dApp user flows.

        [Learn more →](/simulations/bundled-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-do-i-handle-simulation-failures-and-errors-in" className="text-xl font-semibold">How do I handle simulation failures and errors in the dApp UI?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/quickstart"

        When a simulation fails, the Tenderly API provides detailed error messages. You can use these messages to display meaningful error feedback to users in the dApp UI, helping them correct their transaction before retrying.

        [Learn more →](/simulations/quickstart)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-do-i-trigger-simulations-programmatically-from" className="text-xl font-semibold">How do I trigger simulations programmatically from the backend to verify transaction success before execution?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/quickstart"

        You can trigger simulations programmatically by making a POST request to the [**`/simulate`** REST API](/api-reference#/operations/simulateTransaction) endpoint or [**`tenderly_simulateTransaction`** RPC](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_simulateTransaction), passing transaction details. This helps verify the success of a transaction in a controlled environment before it’s sent to the network.

        [Learn more →](/simulations/quickstart)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-modify-storage-variables-during-a-simulation" className="text-xl font-semibold">Can I modify storage variables during a simulation to test different scenarios?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/state-overrides"

        Yes, you can use state overrides to modify contract storage variables, account balances, and other on-chain data for the simulation.

        [Learn more →](/simulations/state-overrides)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-create-a-ui-that-shows-gas-estimates-for-use" className="text-xl font-semibold">Can I create a UI that shows gas estimates for user transactions using the Tenderly API?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/gas-estimation"

        Yes, you can integrate the gas estimation feature of Tenderly's API into your UI to show users the estimated gas cost for their transactions before they confirm.

        Alternatively, you can use [**`tenderly_estimateGas`**](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_estimateGas) and [**`tenderly_estimateGasBundle`**](/node-rpc/rpc-reference?network=ethereum-mainnet\&method=tenderly_estimateGasBundle).

        [Learn more →](/simulations/gas-estimation)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-simulate-calls-from-different-wallets-to" className="text-xl font-semibold">How can I simulate calls from different wallets to my contract to test multi-user scenarios?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/single-simulations"

        You can simulate transactions from multiple wallets by running individual simulations with different `from` addresses. This allows you to test how your contract behaves in multi-user scenarios.

        [Learn more →](/simulations/single-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-simulate-invalid-or-out-of-bound-inputs" className="text-xl font-semibold">How can I simulate invalid or out-of-bound inputs to verify contract resilience in various edge cases?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/single-simulations"

        You can simulate function calls with invalid or out-of-bound inputs by setting custom input values in your simulation requests. This allows you to test how your contract handles edge cases and prevents potential vulnerabilities.

        [Learn more →](/simulations/single-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="can-i-simulate-flash-loan-attacks-or-multi-contrac" className="text-xl font-semibold">Can I simulate flash loan attacks or multi-contract interaction vulnerabilities?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/bundled-simulations"

        Yes, you can simulate complex transactions such as flash loan attacks or interactions across multiple contracts by bundling the transactions in one simulation. This is helpful in testing for vulnerabilities in DeFi protocols.

        [Learn more →](/simulations/bundled-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-simulate-cross-contract-interactions-and" className="text-xl font-semibold">How can I simulate cross-contract interactions and ensure transaction flow correctness?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/bundled-simulations"

        By bundling transactions in a single simulation, you can test cross-contract interactions and verify that the transaction flow behaves correctly across multiple contracts. This is critical for dApps that rely on complex contract interactions.

        [Learn more →](/simulations/bundled-simulations)
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-bundle-multiple-user-actions-into-a-sing" className="text-xl font-semibold">How can I bundle multiple user actions into a single simulation to provide feedback on complex flows?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        [//]: # "/simulations/bundled-simulations"

        You can bundle multiple user actions by simulating them as part of a single bundled simulation. This allows you to provide feedback on complex transaction flows that involve multiple interactions in your dApp.

        [Learn more →](/simulations/bundled-simulations)
      </div>
    </div>
  </Card>
</div>
