BLOG — Gelato University

265 days ago

How Account Abstraction is Rewriting Web3 Gameplay

The procedure of introducing players to conventional games is generally uncomplicated. In the realm of Web2, the onboarding process has been made user-friendly by allowing players to make use of their existing social accounts, like Apple ID or Google logins. These social accounts facilitate seamless integration of single sign-on (SSO), enabling the easy synchronization of progress across multiple devices. For instance, popular web2 gaming stores centralize various accounts such as Google or Apple, streamlining the onboarding process and creating a unified player profile.

Now, let's talk about web3. Players must install a special wallet, and keep their private keys safe, and once these tasks are completed, they must approve and sign transactions simply to dive into the game. Imagine the wallet and key as speed bumps in your gaming joyride – it's a real buzzkill!

For web3 gaming to achieve widespread adoption, we must offer a user experience similar to that of web2. The wallet experience should not detract from the gaming experience, and players should remain unaware of possessing a wallet in most instances!

What is Account Abstraction?

Let’s start by exampling the 2 different types of accounts on Ethereum:

  1. Externally Owned Accounts- EOAs
  2. Smart Contract Accounts- SCs

Externally Owned Accounts

EOAs (e.g. MetaMask & Ledger) are commonly used to interact with blockchains and are controlled by a private key linked to a specific address. They’re free to generate and can be reused on all EVM chains with the same address, providing a natural interoperability layer for web3.

If your credit cards get lost or stolen, there’s a process you can go through to regain access to your money. However, if you lose the keys to your EOA your funds are gone forever, as there’s no way to restore access without giving someone your private keys beforehand.

Because of these difficulties with EOAs, you also can’t delegate the execution of transactions to third parties. This makes many use cases like letting third parties pay for your transaction fees difficult to implement. Additionally, EOAs have an extremely poor & clunky UX that can be difficult to navigate for most users.

Smart Contract Accounts

SCs (e.g. Safe) are controlled by code instead of a private key. Think of them like digital locks that you can program however you want. This flexibility enables exciting use cases such as social recovery (being able to log in to your wallet with Google, Facebook, etc.), delegating the execution of transactions to third parties, and more. SCs are a major upgrade to the current web3 experience, enabling you to:

  • Interact with blockchains without paying for gas
  • Automate the movement of your funds without giving custody of your assets to someone else

In the usual setup of web3 games, the game flow goes a bit like this:

The player decides to use up x resource for making y tool. They pick the tool and then okay a transaction to use up the x resource. After that, they confirm another transaction to kick off the crafting process. Following a series of three pop-ups, the player eventually gets their hands on the finished tool.

Smart Contract Accounts allow for improved user experiences and upgradable feature sets. Before ERC-4337, few projects utilized smart contract accounts, and most alternative solutions required significant protocol changes. ERC-4337 moves Ethereum’s verification logic into the EVM and allows smart contracts to originate transactions rather than traditional EOAs.

How Do SCs Improve Web3 Gaming?

Account abstraction empowers onboarding processes comparable to those in Web2. This strategy provides developers with the necessary adaptability and authority to craft unique and personalized gaming encounters. While numerous current solutions present closely resembling features, here are some essential features you shouldn't miss:

Session Keys & Sponsored Transactions

Session keys play a role in transmitting transactions from a game on a player's behalf without the need for wallet confirmation. Sponsored transactions provide developers with the ability to cover player transaction expenses and empower them to designate the specific token for handling transaction fees (e.g. USDC).

So, how does this translate into practice?

The Proof of Play mechanism establishes a burner or secondary wallet for each user the moment they log in for the first time. This wallet operates in a custodial manner and is stored within the user's browser storage. Through the burner wallet, Proof of Play gains the capability to cover their user's transaction costs. This setup ensures that assets remain secure within the user's primary wallet, and any in-game items earned are automatically directed to this safe wallet haven.

Tailored Flexibility

Game developers are seeking personalized wallet interfaces and in-game marketplaces. The integration of the wallet and marketplace should be seamless. The ideal scenario is that the wallet remains practically unnoticed by the player, while the marketplace seamlessly aligns with the game's theme and aesthetics.

Bundling Transactions

Optimize gas costs and enhance the user experience by bundling transactions (multicalls). This streamlined approach allows for the purchasing of NFTs with just a single click, cutting down on the previous multiple-step process.

Effortless NFT Purchases

Enabling one-click NFT purchases streamlines the process significantly. Additionally, social login permits players to log in using their existing social media accounts, negating the need to remember multiple usernames and passwords or safeguard private keys. This not only makes the login process smoother but also enhances security and user-friendliness.

Simplifying Fiat Access

In the past, transferring funds to a non-custodial wallet has proven to be a complex process, often demanding the use of a centralized exchange account to engage with the network. This inconvenience becomes even more pronounced in the realm of gaming. Those familiar with playing web3 games can attest to the frustration of setting up a new wallet specifically for a particular game.

However, numerous account management SDKs now incorporate third-party solutions that enable players to finance their accounts with services like Moonpay or Stripe. Although these ramping services might not match the seamless convenience offered by other web2 services, they represent a stride in the right direction!

How Gelato Enables Account Abstraction

The Safe Account Abstraction Relay kit, powered by the Gelato Relay SDK, pioneers a user-friendly environment. It allows users to cover gas fees with ERC-20 tokens and paves the way for providing gasless transactions.

By enabling a streamlined process and greater accessibility, these tools hold immense potential to boost the mass adoption of blockchain technology!

Visit our tutorial to find out how you can 'Mint NFTs Without Paying Gas Using Gelato's Safe Relay Kit'

About Gelato

Gelato is web3’s decentralized backend empowering builders to create augmented smart contracts that are automated, gasless & off-chain aware on all major EVM-compatible blockchains including Ethereum, Arbitrum, Polygon, Optimism, zkSync, and many more.

Over 400+ web3 projects rely on Gelato for years to power the execution of millions of transactions across DeFi, NFT, and Gaming.

Gelato currently offers four services:

  • Web3 Functions: Connect your smart contracts to off-chain data & computation by running decentralized cloud functions.

  • Automate: Automate your smart contracts by executing transactions automatically in a reliable, developer-friendly & decentralized manner

  • Relay: Give your users access to reliable, robust, and scalable gasless transactions via a simple-to-use API

  • Gasless Wallet: A powerful SDK that enables developers to provide a world-class UX by combining Gelato Relay + Safe's Smart Contract Wallet, enabling Account Abstraction