Even the most experienced Web3 devs can get lost in the technical complexities of managing transactions on the blockchain. Now imagine what this must look like for everyday users who don’t come from technical backgrounds. Confusing? Frustrating? Discouraging? All of this and more?
So the question for all of us is – how can we make Ethereum transactions more accessible and human-readable?
With this question in mind, Web3 devs have been implementing different upgrades to make wallets, as the first point of contact with the blockchain, easier and more intuitive to use. And transaction simulations emerged as one of the most promising solutions.
So, let’s explore a few simple, yet powerful ways to make Ethereum transactions human-readable with simulations. Let’s do this!
How to use simulations to make Ethereum transactions human-readable for wallet users
Integrating transaction simulations into wallets is becoming a standard in Web3. Simulations enable wallet users to preview exact transaction outcomes before submitting them on-chain. This way, they can better understand the effects of their transactions, having greater confidence and peace of mind when sending them.
Additionally, enabling transaction simulations in your wallet can help you build confidence in your product too, especially among first-time users. Ultimately, by making users feel at ease when sending transactions, you will also help increase trust in the industry and support mainstream blockchain adoption.
So, what exactly can you do with transaction simulations to make Ethereum transactions human-readable?
Show the dollar value of asset transfers
With token values constantly fluctuating, wallet users need to invest additional effort into deciphering how much they’re earning or spending on their assets. So, why not display the actual, real-time dollar value for your users straight away?
By integrating Tenderly simulations and enabling Transaction Preview in your wallet, DeFi platform, or DEX, you can show the current dollar value of ERC-20 tokens. This way, your users can fully analyze and understand the financial implications of their transactions, making informed decisions when managing their assets.
Display balance changes between accounts
For additional insight, you can also display accumulated balance changes to your users. Your users can see exactly what's happening within their transactions thanks to clear information on the changes between accounts. And with dollar values provided, they get all the context they need in one place.
Simplify the process of testing transactions
To make your wallet or DeFi platform accessible even to newcomers in the space, you need to make the process of testing and sending transactions as effortless as possible. And yes, there are ways:
- Remove the complexity from running simulations: You can enable your users to run simulations without any technical expertise required. They just need to input the basic transaction data and click Simulate.
- Enable simulation bundling to eliminate unnecessary steps: Sometimes, users need to manage multiple transactions at the same time. For instance, multisignature wallets require you to submit, approve, and send transactions. So, instead of users having to run every simulation separately, you can enable them to run a simulation bundle.
- Allow users to try out your dapp without spending any gas: You can even run your entire dapp in dapp simulation mode. Your users can activate the demo mode to try out your dapp functionalities and get familiar with token transfers, swaps, etc.
Warn against reverted transactions
Even users coming from a technical background can overlook issues with their transactions. Users can easily submit improperly configured transactions on-chain and pay gas fees only to find out that their transactions have been reverted.
To help your users avoid sending faulty transactions on-chain, make sure to display a clear warning sign in your wallet interface. Safeguarding them against submitting reverted transactions will help save both financial and computational resources.
Allow users to inspect simulated transactions
Exposing simulation data in your wallet or dapp enables users to gain a deeper insight into transaction execution. This can be helpful for users who want to learn more about what actually happens when sending transactions. It can also provide Web3 developers with an opportunity to inspect transaction simulations in greater detail.
To achieve this, you can enable users to open their simulations on Tenderly. Once in the Tenderly Dashboard, they can examine which tokens have been transferred, which state changes have been made, and whether the expected events have been emitted. Plus, they can also get a granular view of how much gas their transactions spend.
3 Ways to integrate transaction simulations into your wallet
To make Ethereum transactions understandable to a wider audience, you can integrate Tenderly’s simulation infrastructure. Here are a few ways to introduce transaction simulations into your wallet with Tenderly.
1. Integrate the Simulation API
An efficient way to simulate transactions and expose the information to your users is to use Tenderly’s Simulation API. Your users will automatically send requests to our Simulation API and get a response, without putting any additional pressure on your team.
With the Simulation API, you have multiple options to expose simulations to your users:
- Call the Simulation API endpoint to get
asset_changes
andbalance changes
, including exact dollar values. Your request will return comprehensive data on asset and balance changes for ERC-20 and ERC-721 tokens that happened during a transaction. Plus, the dollar value is based on the most recent, real-time on-chain data rather than historical information.
- Dry-run individual transactions so your users can see their outcomes before sending them on-chain. This way, the request would automatically go to the Simulation API and return a response instantly.
- Introduce Simulation Bundles to simulate multiple transactions consecutively using a single request. When running a simulation bundle, the endpoint receives a single request and simulates the execution of the transactions within the same block. Your users then get a response with the possibility to inspect individual simulations within the bundle.
- Use simulations on Forks to run your dapp in demo mode and enable users to try it out for free. In this case, you need to add a Fork RPC as your JSON-RPC provider.
2. Use the Simulation RPC
With Tenderly, you can also use our node as a service to simulate and send transactions in one place. Tenderly Web3 Gateway enables you to simulate your users’ transactions before sending them on-chain. You can then automatically submit them to the blockchain if the simulations get executed successfully.
Plus, Tenderly Web3 Gateway supports both one-off and bundled simulations and :
tenderly_simulateTransaction
performs a single simulation and returns a response, includingassetChanges
andbalanceChanges
.tenderly_simulateBundle
enables you to group multiple transactions and simulate them one after the other, with insights intoassetChanges
andbalanceChanges
.
3. Don’t forget the SDK
The Tenderly SDK is another fast and easy way to integrate simulations into your dapp or wallet. It enables you to simulate transactions in two ways:
- Simulate individual transactions by calling
simulate_Transaction
- Simulate a bundle of transactions by calling
simulate_Bundle
Help your users understand Ethereum transactions with simulations
Web3 keeps evolving, yet interacting with the blockchain can be highly confusing, frustrating, and risky. This is especially visible when sending transactions on-chain. So, to help accelerate the adoption of blockchain technology on a global scale, Web3 devs need to make it more accessible to a wider audience.
And one of the key ways to achieve this is to make Ethereum transactions more understandable and human-readable. Easy, right? Well, it is with Tenderly’s transaction simulations. So, ready to try them out? Start by experimenting with transaction simulations yourself!