DeFi Intel

Use Transaction Simulator Before Signing: Step-by-Step

Every time you click “Confirm” in MetaMask, you are about to sign a cryptographic order that exchanges your tokens or approves a contract to spend them. Unlike a credit card charge, a blockchain transaction is final – no reversal, no chargeback. Malicious actors rely on the fact that most users sign without reading the raw transaction data.

Transaction simulators let you run that same transaction in a sandbox environment first. They show exactly what will happen – which tokens move, what approvals are granted, and how much gas you’ll pay – before you ever touch your private key. This guide teaches you how to use transaction simulators with Tenderly, DeBank, and MetaMask’s built‑in tool, so you can verify every step with confidence.

Key takeaways
  • Never sign a transaction without first simulating it in a sandbox environment — blockchain transactions are irreversible.
  • MetaMask’s built‑in simulation works for simple transfers; for DeFi swaps and approvals, use Tenderly or DeBank.
  • Copy the raw transaction hex from MetaMask, paste it into a simulator, and compare the output against your intended outcome.
  • Pay special attention to approval amounts (infinite approvals are red flags) and the list of called contracts.
  • Simulation cannot prevent MEV or slippage, but it will reveal hidden contract calls and token mismatches.
  • Make simulation a routine part of your DeFi interactions, especially with new dApps or large amounts.

Why You Must Simulate Before You Sign

Blockchain transactions are irreversible and often opaque. When you interact with a decentralized application (dApp), the interface may promise one thing while the underlying smart contract does another. Common traps include:

A simulator executes your exact transaction against a snapshot of the blockchain. It reveals the exact state changes and lets you compare the outcome with your intention. Without it, you are signing a blank check.

What Is a Transaction Simulator and How Does It Work?

A transaction simulator is a tool that runs your proposed transaction on a virtual Ethereum Virtual Machine (EVM) sandbox. It takes the raw transaction bytes – including the recipient address, function signature, and encoded arguments – and processes them as if they were submitted to the network. The simulator does not broadcast anything; it simply replays the logic and returns the final state.

The output typically includes:

Because the simulation runs in isolation, it can also detect issues like reentrancy attacks or unexpected reverts. Most simulators let you choose a specific block number so you see the state at the moment you intend to sign.

Step 1: Prepare the Transaction in Your Wallet

Open MetaMask and navigate to the dApp you want to interact with. Complete all steps until the point where MetaMask would normally ask you to confirm. Do not click “Confirm” – that would sign and broadcast the transaction. Instead, copy the raw transaction data.

In MetaMask, click the three dots (...) on the confirmation window and select “View transaction details” (or similar). You will see fields like Hex Data (or Data). Copy this hex string. If you are using a hardware wallet, you can also copy the transaction hash that appears in the “estimated” stage.

Keep this data ready. You will paste it into the simulator. For complex interactions (e.g., Uniswap swaps with permit signatures), ensure you also note the chain ID and recipient address – most simulators will parse these automatically from the hex.

Step 2: Use MetaMask’s Built‑In Simulation (If Available)

MetaMask has introduced an experimental “Simulate” button for certain transactions (visible in the confirm screen for ETH transfers and some ERC‑20 interactions). If you see it, click it. The wallet will run a quick dry‑run and show the resulting balance change in a small banner.

This simulation is lightweight and works best for simple token transfers. For DeFi swaps, approvals to new contracts, or multi‑step interactions, MetaMask’s built‑in simulator may not capture all details (e.g., intermediate token approvals or nested contract calls). When in doubt, always use a dedicated tool like Tenderly or DeBank.

To enable the feature (if not visible): go to Settings > Advanced > Turn on “Transaction simulation” (toggle). Note that this feature is still in beta and may not support all networks.

Step 3: Simulate with Tenderly

Visit Tenderly Simulator. You can use it without an account for a limited number of simulations per day. Paste the transaction hex you copied from MetaMask into the “Transaction” field. Select the correct network (Ethereum mainnet, Polygon, etc.) and choose a block number close to the current one for realistic state.

Click “Simulate Transaction”. Tenderly will process the transaction and present a dashboard with:

Pay special attention to the “Approvals” section. If you see an approval for an amount many times larger than your current balance, or to an address you do not recognize, that is a red flag. Tenderly also highlights events like “Transfer” and “Approval” so you can verify the exact tokens involved.

Step 4: Simulate with DeBank

DeBank offers a built‑in transaction simulator for DeFi interactions via its wallet extension or the Web version. If you use DeBank’s browser extension (available for Chrome), it automatically intercepts transactions in MetaMask and shows a simulation panel before you sign.

For manual simulation:

  1. Go to DeBank Simulate.
  2. Paste the transaction hex (or the transaction hash if already broadcast, but we recommend testing before signing).
  3. Select the chain and click “Simulate”.

DeBank’s output is focused on asset balances. It shows:

If the simulated result matches exactly what you expect (e.g., approve 100 USDC, receive 99.8 USDC), you can safely go back to MetaMask and sign. If anything seems off – new unknown tokens, unlimited approvals, or unexpected losses – reject the transaction.

Step 5: Interpret the Results – What Are You Actually Signing?

Reading the simulation output correctly is the most important skill. Focus on three things:

1. Token deltas: Check that the tokens leaving your wallet match the ones you intended to spend, and the tokens arriving match the ones you expected to receive. Beware of “dust” – tiny amounts of worthless tokens that trick you into thinking the transaction worked.

2. Approval changes: Every approval is an opportunity for the contract to drain your balance later. If you only need to approve 100 USDC, and the simulation shows an approval of 1 million USDC (or worse, “unlimited”), that is a malicious or overly aggressive approval. Deny it.

3. Contract interactions: Look at the list of called contracts. Do they match the dApp you intended to use? If you see an unfamiliar address (or a known phishing address) in the trace, the dApp is tampering with the transaction.

Also note the gas used. A transaction that consumes far more gas than expected may indicate a nested loop or a honey‑pot contract that makes your funds unspendable.

Step 6: Cross‑Check with Your Intended Action

After running the simulation, mentally walk through the steps of your intended action. For example, if you want to swap 0.1 ETH for USDC on Uniswap:

If the simulated outcome does not match your expectation exactly (accounting for reasonable slippage), do not sign. Go back to the dApp, cancel the transaction in MetaMask, and investigate. Common mismatches include:

Only when the simulated state change aligns perfectly with your intention should you return to MetaMask and click “Confirm”.

Common Pitfalls and Limitations of Simulators

While powerful, simulators have limits. They cannot predict future state (e.g., a price change between simulation and broadcast), so you may still experience slippage. They also may not fully support every custom protocol or L2 chain. Here are key caveats:

Despite these limitations, using a simulator is far safer than signing blindly. Always simulate when you interact with an untrusted dApp, when the transaction involves a new token, or when the amount is large.

Frequently asked questions

Is simulating a transaction safe? Does it expose my private keys?

Yes, it is safe. Simulators only use the raw transaction data (hex) — they never request your private key or seed phrase. The simulation runs on a remote server that replays the transaction on a virtual blockchain.

Can I simulate a transaction after I already signed it?

Technically yes, by using the transaction hash on Tenderly or DeBank. However, the purpose of simulation is to preview before signing. If you simulate after signing, you lose the protection because the transaction may already be mined. Always simulate before clicking Confirm.

Do all simulators support all EVM chains?

No. Tenderly supports many mainnets (Ethereum, BSC, Polygon, Avalanche, Arbitrum, etc.) but not all L2s. DeBank focuses on major DeFi chains. MetaMask’s built‑in simulation supports Ethereum mainnet and a number of other EVM networks, though coverage varies. Check the simulator’s supported networks before relying on it.

Track the entities behind the concepts

DeFi Intel maps 11,000+ protocols, tokens and companies to a typed knowledge graph — with live data, incidents and regulation.

Entities mentioned