How to Choose a Transaction Simulation Provider
As web3 continues to grow, there is rising popularity of transaction simulator tools to improve user safety. These wallet security tools allow users to simulate web3 transactions before they sign a transaction, providing users with a way to test their transactions before committing them to the blockchain.
With multiple transaction simulation choices available, developers must consider a multitude of factors before deciding on the right tool for their needs such as: which networks they support, the user experience, and how they handle different signature types.
By doing your research and making the right choices ahead of time, you’ll save yourself time and stay safe from scams.
How does Transaction Simulation work?
Transaction simulation is the ability to preview how a transaction will behave, before authorizing (i.e. signing) transactions on-chain. Human readable interpretations of transactions ensure that a user knows that a transaction will behave how they want and expect it to behave.
These transaction previewing extensions provide users with a virtual environment that mimics the behavior of the mainnet, production environment, allowing users to test their transactions before putting them on-chain.
What are the benefits of using Transaction Simulation tools?
Transaction simulation enables anyone, even early web3 adopters, to send transactions with confidence, by helping them understand how transactions will impact their wallet and digital assets ahead of time.
1. Increase Security
First, transaction simulation tools provide users with an added layer of security. By testing transactions in a virtual environment, users can ensure that their transactions are safe, preventing loss of funds.
2. Deepen Learning
Transaction simulators are also a great learning tool for users who are new to web3. Users can experiment with the simulator, and see how contracts work behind the scenes without risking any funds. This helps users learn how web3 works and how to interact with it.
3. Prevent Errors
Another benefit of transaction simulators is that they help prevent errors. A user can test their transaction on a virtual environment and detect any errors before executing it on the mainnet, production environment. This helps prevent loss of funds due to transaction errors.
What are the different types of Transaction Simulation tools?
Today, users can choose between two types of transaction simulation tools: browser extensions and native transaction previews in web3 wallets.
Below we review the pros and cons of each class of tool.
1. Browser Extensions
A browser extension based transaction simulator is a tool that simulates every web3 transaction, before you sign it in your wallet. Let’s take a look at a few options: Fire, Pocket Universe, Stelo, Wallet Guard, and Blowfish.
Fire is a browser extension that makes web3 simple, by showing you exactly what will enter and exit your wallet, before you sign a transaction.
Fire allows users to simulate transactions across the four largest EVM chains, including Ethereum, Polygon, Arbitrum, and Optimism.
Additionally, Fire pops up right next to your web3 wallet so that you can review the simulation of the transaction you are about to sign.
Pocket Universe is a free browser extension that keeps your assets safe when you sign web3 transactions, and is available on Ethereum and Polygon.
It pops up before your wallet and allows you to continue or reject the transaction based on a preview before it gets to your web3 wallet.
Stelo is a browser extension that previews Ethereum transactions.
Like Pocket Universe, Stelo catches the transaction before your wallet pops up. Then, the user will press reject or press continue to send the transaction to your wallet.
Like Fire, Stelo includes price in their extension, and is available on Ethereum Mainnet.
Wallet Guard is a security extension featuring not only transaction previews but also proactive phishing detection.
Wallet Guard catches the transaction before it is sent to your wallet, and works on Ethereum Mainnet.
Blowfish is an extension that keeps users safe from malicious transactions, equipped with a fraud detection engine, and multi-chain support including Ethereum, Polygon, Solana, BNB Chain, and Arbitrum.
2. Wallet Simulators
Some wallets provide transaction simulation directly in their wallet interface. So, if you are up for downloading a new wallet, these are nice options for you to have.
Coinbase wallet's transaction preview will show users an estimate of how their token balance(s) will change when they approve a new transaction.
The simulator is in both their wallet extension as well as their mobile wallet on all EVM networks.
Rabby is an extension and desktop wallet based by DeBank, which shows your upcoming balance change before you sign a transaction.
The simulator is in the native wallet itself at the top of each transaction and available on all EVM chains.
Factors to Consider When Choosing a Transaction Simulation Tool
With many options for simulating web3 transactions, there are several factors that you should consider when deciding which option best fits your needs.
1. Decide on the Type of Tool
First, determine your product’s needs. Can you integrate into your user experience a wallet that has simulation functionality baked directly into the user experience?
If not, you may want to find a browser extension that is compatible with the chains your app is deployed on, as well as the wallets that your app is integrated with.
2. Evaluate the Team
When planning for the future, it's good to take the people building the tools into account.
- Do they have a proven track record on other web3 apps?
- Do they have enough people on the team to support the breadth of their mission?
- Do they have enough engineers to continue to innovate and quickly fix bugs?
Consider the complexity of their tools, and even their level of community support in the context of these questions.
3. Review Code Audits
It is best practice to choose dev tools that have been subjected to strict code and security audits to ensure that they are safe and reliable.
Network architecture, system configuration, access controls, and other verifiable, security-related components can become crucial to a tool’s long-term effectiveness.
4. Map Solutions to Your Use Case
Accuracy, clarity, and ease of use all come into play when evaluating options for transaction previewing tools. It is crucial to optimize based on your intended use case and your requirements for data comprehensiveness. Here are three potential solutions based on common use cases:
Simulate Asset Changes
For teams that only need to preview asset changes, alchemy_simulateAssetChanges will provide simulation data that is sanitized and simplified, to quickly discern the asset deltas of a transaction, before it's executed. This is often particularly useful for wallet developers
Simulate Transaction Execution
For teams that need (and have the processing power to utilize) more transaction preview details, alchemy_simulateExecution provides end-to-end simulation (inclusive of ABI decoded results and comprehensive logs, events and traces data) of a transaction’s expected results.
This is often particularly useful for lending protocols, security products, smart contract developers, and DEXs.
Simulate Transaction Bundles
Teams that need to understand the impact of sequential transactions, or transactions whose results are predicated on the results of a previous transaction, will benefit from alchemy_simulateAssetChangesBundle or alchemy_simulateExecutionBundle.
NFT marketplaces, who want to ensure that an NFT is actually transferable in a purchase, or decentralized exchanges (DEXs), who need to prevent one way swaps, would benefit from products that have integrated Bundled Simulation tools.