---
title: "Account abstraction (ERC-4337) vs. meta transactions (ERC-2771)"
description: "Learn The Reasons Why Developers Are Adopting Account Abstraction Over Meta Transactions"
---

# Account abstraction (ERC-4337) vs. meta transactions (ERC-2771)

[Meta Transactions](https://www.alchemy.com/smart-wallets) and Account Abstraction are techniques for improving the user experience of Ethereum. Meta Transactions require a smart contract update, which is why they're being phased out.

## How is account abstraction different from meta transactions?

Account Abstraction aims to abstract away more complexities of the Ethereum Account than just gas fees. 

From a technical perspective, the difference between meta transactions and Account Abstraction lies in the structure of the message and its backwards compatibility.

## Learn more about account abstraction

<ExternalVideo
  url="https://youtu.be/Vpk_MhY-EeE?si=jb8KXjjgr51eiNta"
  provider="youtube"
  providerUid="Vpk_MhY-EeE"
/>

### What are UserOps in account abstraction?

In the case of Meta Transactions, the industry standard was to use EIP712-based messages, which required all smart contracts to be upgraded. 

Account Abstraction standardizes a special transaction format called _UserOperations_.

UserOperation contains all the information needed to figure out what transaction the user intends to perform, including fields to decide which Paymaster to use, how much the user is willing to pay \(in case of self-sponsorship\), and the signed UserOperation.

### What are paymasters in account abstraction?

The Gas abstraction portion of the ERC-4337 Account Abstraction standard introduces _Paymasters_.

Paymasters are **onchain smart contracts that have arbitrary validation logic** which can be used to define a valid gas sponsorship. Again, the difference here is *the execution is onchain*.

[DAOs](https://www.alchemy.com/dapps/top/daos), [apps](https://www.alchemy.com/dapps/top/defi-dapps), and other teams can deploy their own custom paymasters with features such as ERC-20 gas payments and more.

These custom Paymasters can use ERC-4337 to plug and play with existing Bundler Services. This is different from Meta Transactions which require Provider adoption.

<CardWithCta
  text="Sponsor transactions with our Gas Manager API"
  ctaLabel="Get started"
  ctaHref="#"
  theme="gradient_blue"
/>

### Relayers vs. paymasters

While Relayers in the Meta Transaction concept are private keys under the control of Infra providers, Account Abstraction Bundlers are standardized nodes. Switching between different Bundlers is as simple as changing API keys and API URLs.

There is no concept of MinimalForwarder in Account Abstraction as sponsorship validation is done onchain inside the Paymaster contract.

Instead of having only one transaction inside a native transaction in the case of Meta Transaction, Bundlers bundle multiple _UserOperations_ into one bundle \(one native transaction\)!

<CardWithCta
  text="Reliably land userOps onchain with our Bundler API"
  ctaLabel="Get started"
  ctaHref="#"
  theme="gradient_blue"
/>

## 5 benefits of account abstraction over meta transactions

### 1. No smart contract changes are required

While Meta Transactions require updates to all existing contracts that would adopt them, Account Abstraction builds on existing infrastructure. This means that all smart contracts by default support Account Abstraction, which makes it a preferred option over Meta Transactions.

### 2. Frictionless switching between bundler and paymaster services

Under ERC-4337, all Bundlers and Paymasters communicate following specific standards. Teams can even create their own Paymasters with conditional logic for their application.

### 3. No need to adopt proprietary relayers

Proprietary Relayers lack consistency; each Relayer can have their own message format for their use case. This leads to smart contract changes being required to become compatible with each different Relayer.

### 4. More decentralization

As more providers make their Bundler services available, the developer gains the ability to decentralize their transaction flow. This also affords the developer the opportunity to abandon any sub-par Bundlers. 

### 5. No developer tooling lock-in

When using Meta Transactions you also need to use the Infra provider’s SDK. This leads to tooling lock-in that adds to the friction when migrating Relayers.

In the case of Account Abstraction, all the standard functionality is supported by all SDKs allowing one to select based on their expertise and switch based on preference!

Moreover, since the UserOperation standard is to be adopted by every vendor, building tools like UserOperation Explorers is also feasible.

## How to update meta transactions to account abstraction?

If you have already made changes to your smart contracts in order to support Meta Transactions, the migration process is simple to revert those changes.

Unlike Meta Transactions, msg.sender and msg.data can be used as-is with Account Abstraction.

If custom Paymasters or Account Factories are desired, their development becomes the next step in migrating.

For standard implementations, we recommended using well-audited, existing AA providers in order to reduce development time and self-imposed bugs.

[Alchemy’s Gas Manager](https://www.alchemy.com/docs/reference/how-to-sponsor-gas-on-evm) provides granular controls like _Per Address Gas Usage limits_, _Max number of UserOperations to sponsor,_ _Allowlisting addresses, Sponsorship deadlines, and Domain level allowlisting_!

<ImageBlock
  src="https://media.alchemy.com/1703859980-alchemy-gas-manager-spending-rules.jpeg"
  alt="Alchemy Gas Manager dashboard: configuring gas sponsorship spending rules"
  width={2390}
  height={1028}
  caption="Alchemy Gas Manager's Spending Rules UI"
/>

<ImageBlock
  src="https://media.alchemy.com/1703860007-alchemy-gas-manager-ui.jpeg"
  alt="Alchemy Gas Manager policy settings for sponsorship limits and allowlisted addresses"
  width={2382}
  height={564}
  caption="Gas Manager's UI Continued"
/>

[Gas Manager Admin API](https://www.alchemy.com/docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/create-policy) allow programmatically creating, reading and updating the Gas policies. On top of everything, the developer gets a great visual dashboard of every UserOperation sponsored!

<ImageBlock
  src="https://media.alchemy.com/1703860035-alchemy-gas-manager-spending-dashboard.jpeg"
  alt="Gas Manager Spending DashboardGas Manager Operations View"
  width={2406}
  height={516}
  caption="Gas Manager Spending DashboardGas Manager Operations View"
/>

### **Conclusion**

Account Abstraction \(ERC-4337\) is the new and better way of incorporating gasless transactions into your apps with benefits like avoiding contract-level code changes, frictionless vendor switching, composability with other existing infrastructure, and more decentralization.
