Metatransaction

What Is a Metatransaction?

What Is a Metatransaction?

A metatransaction serves as a proxy that executes a transaction on behalf of the original signer, relieving them from the task of directly submitting it to the public blockchain.

It simplifies the process by allowing a relayer network to handle the execution and gas costs while the user only needs to sign the transaction with a single click.

Public Ledger Transaction Flow and Gas Fees

In a public ledger, transactions are typically signed by the transacting individual and added to the mempool, a database of unconfirmed or pending transactions maintained by each node.

Miners then include these signed transactions in the next block.

In the traditional transaction flow, the transacting user is responsible for paying the gas fees, placing the onus on them to complete the transaction.

Furthermore, users are often required to pay gas fees in the native token of the blockchain, even when using dApps or protocols with their own tokens.

Metatransactions and Gas Fees

Metatransactions enable dApps to bypass the burden of gas fees and native token payments by integrating the signed transaction within a standard blockchain transaction.

This shifts the responsibility of gas fees and transaction completion to a third party.

For instance, a dApp developer may view this as an opportunity to offer a gasless experience by sponsoring the gas fees for some or all users, thereby increasing user acquisition.

Alternatively, they may allow users to pay for gas exclusively with their native token.

In both cases, a metatransaction manages the standard chain transaction and covers the necessary gas fees.

Users must sign the required transaction and pay according to the developer’s specifications, either in token or with zero gas fees.

Advantages of Meta Transactions for User Experience

The advantage of meta transactions lies in providing a smoother user experience.

It removes the complexities and costs of interacting with blockchains, shifting these responsibilities to developers or the existing relayer infrastructure on the backend.