Building your application on the blockchain has become a popular trend in recent years, but it also comes with its own set of challenges. One of the major drawbacks of building a decentralized application on the blockchain is sacrificing the user experience. This is because most Web3 applications today require users to have a basic understanding of the blockchain, understand what a wallet is, and have a wallet set up with funds native to the blockchain in order to even begin interacting with the application. This requirement to understand the blockchain is a major barrier to entry and excludes 99% or more potential users.
The main reason for the poor user experience in web3 applications is due to the technical design of the blockchain, where externally owned accounts (EOA) are the ones that need to sign transactions, which is required every time information is written to the blockchain. This is also why web3 applications are typically challenging for new users to set up and use.
Enter account abstraction (AA), which has emerged as a solution to almost all of the major web3 UX issues that exist today. Account abstraction allows users to interact with the blockchain without having to set up a wallet or transfer funds, making the onboarding process much smoother and user-friendly. With account abstraction, users can interact with the blockchain through a trusted third-party, eliminating the need for private key management, reducing the risk of lost funds, and making the user experience much more accessible.
🤔 Problems
1️⃣ Complicated UX
Every interaction with a dApp is a blockchain transaction, and users need to be proficient in crypto wallets, understand gas, and how to properly estimate it so you don't overpay or underpay. Users need to actively manage each blockchain interaction. Even then, they face failed transactions and long waiting times for transaction completion.
2️⃣ Fragmented Multi chain structure
Moving between different chains is another UX headache. Onboarding to any of the scaling solutions is slow, complicated & expensive. Most bridges take hours to move your funds. As dApps scale to multi-chain architecture, the users have to bear the burden of added complexities. The multi-chain nature of web3.0 compounds the already existing UX issues.
The issues of high friction in movement between various chains go beyond just complicated UX. They cause delays in the movement of value. And it's not only value that has to move smoothly between these chains, the communication & contract calls across these chains are also non-trivial and highly technical. DApps & users should be able to communicate efficiently across the whole multi-chain web in real-time.
👷♂️ Solutions
🤩 Meta Transactions
Meta transactions are also known as Gasless transactions. This is a fancy name for a simple idea: a third party called a relayer can send another user’s transactions and pay themselves for the gas cost. In this scheme, users sign messages (not transactions) containing information about a transaction they would like to execute. No change to the actual transaction can happen through the relayer — all it does is execute it.
Relayers are responsible for signing valid Ethereum transactions with this information and sending them to the network, paying for the gas cost. A base contract preserves the identity of the user that originally requested the transaction. In this way, users can interact directly with smart contracts without needing to have a wallet or any Ether.
This means that, in order to support meta transactions in your application, you need to keep a relayer process running - or leverage a decentralized relayer network - Biconomy
Biconomy sends the transaction on-chain via an Entry Point contract which does signature verification and uses paymaster to recover the gas fee from dApp’s deposit. Paymasters are specialized contracts that can be used to sponsor gas fees for other users, in simple terms it is essentially dApp’s on-chain Gas Tank By extending from ERC2771Context and MinimalForwarder, the contract becomes meta transaction capable
💵 Paying gas fees in ERC20
Currently, users who do not have native tokens in their wallet would have to exit the dApp, purchase/swap for native tokens & then come back to the dApp to send transactions. Enabling gas payments in ERC20 Tokens makes it easy for your users to pay for gas fees in the token that they currently have. Biconomy currently supports gas fee payments using DAI, USDC & USDT, but they do have plans to support more tokens soon. This feature is supported using Biconomy's new upgraded relayer infrastructure. The flow of Paying gas fees in ERC20 is very similar to the one we previously saw in the Gasless transaction the only difference is that after the transaction is sent to the relayer and it pays for gas in the native token & sends it to the chain, the relayer is refunded from the user's smart contract wallet in ERC20 tokens. An important thing to note is that users are shown a fixed fee at the time of transaction confirmation, which is used to reimburse the relayers that will execute the transaction. This fee will not increase even if the transaction is repriced by the relayer.
🤝 Batched transaction
Batched transactions allow users of the wallet to perform multiple transactions in one single on-chain transaction. There are a number of advantages to batching many transactions into a single transaction like efficiency as batched transactions save both in cost and time. A user can save a lot of time when attempting to send sequential multiple transactions.
An obvious example is removing the need to call both approve and transferFrom on an ERC20 token in two separate transactions. This leads to dApp developers designing their dApps with a more familiar web 2.0 feel as this performs all required steps in a single button.
😌 Conclusion
Building an application on the blockchain comes with its own set of challenges, especially when it comes to user experience. However, account abstraction has emerged as a promising solution to address these challenges, making the onboarding process smoother and user-friendly and allowing users to interact with the blockchain without having to set up a wallet or transfer funds. This evolution in technology is critical to the mainstream adoption of web3 and blockchain applications.