Developer's Corner
March 6, 2023

A Quick Guide to Understanding Meta Transactions

Unleash the power of meta transactions with our comprehensive guide. Learn how to reduce gas costs and enhance user experience in your blockchain apps. Read now!

A Quick Guide to Understanding Meta Transactions

Darkweb v2.0 public release is here

Lorem ipsum dolor sit amet, consectetur adipiscing elit lobortis arcu enim urna adipiscing praesent velit viverra sit semper lorem eu cursus vel hendrerit elementum morbi curabitur etiam nibh justo, lorem aliquet donec sed sit mi dignissim at ante massa mattis.

  1. Neque sodales ut etiam sit amet nisl purus non tellus orci ac auctor
  2. Adipiscing elit ut aliquam purus sit amet viverra suspendisse potent i
  3. Mauris commodo quis imperdiet massa tincidunt nunc pulvinar
  4. Adipiscing elit ut aliquam purus sit amet viverra suspendisse potenti

What has changed in our latest release?

Vitae congue eu consequat ac felis placerat vestibulum lectus mauris ultrices cursus sit amet dictum sit amet justo donec enim diam porttitor lacus luctus accumsan tortor posuere praesent tristique magna sit amet purus gravida quis blandit turpis.

All new features available for all public channel users

At risus viverra adipiscing at in tellus integer feugiat nisl pretium fusce id velit ut tortor sagittis orci a scelerisque purus semper eget at lectus urna duis convallis. porta nibh venenatis cras sed felis eget neque laoreet suspendisse interdum consectetur libero id faucibus nisl donec pretium vulputate sapien nec sagittis aliquam nunc lobortis mattis aliquam faucibus purus in.

  • Neque sodales ut etiam sit amet nisl purus non tellus orci ac auctor
  • Adipiscing elit ut aliquam purus sit amet viverra suspendisse potenti
  • Mauris commodo quis imperdiet massa tincidunt nunc pulvinar
  • Adipiscing elit ut aliquam purus sit amet viverra suspendisse potenti
Coding collaboration with over 200 users at once

Nisi quis eleifend quam adipiscing vitae aliquet bibendum enim facilisis gravida neque. Velit euismod in pellentesque massa placerat volutpat lacus laoreet non curabitur gravida odio aenean sed adipiscing diam donec adipiscing tristique risus. amet est placerat in egestas erat imperdiet sed euismod nisi.

“Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum”
Real-time code save every 0.1 seconds

Eget lorem dolor sed viverra ipsum nunc aliquet bibendum felis donec et odio pellentesque diam volutpat commodo sed egestas aliquam sem fringilla ut morbi tincidunt augue interdum velit euismod eu tincidunt tortor aliquam nulla facilisi aenean sed adipiscing diam donec adipiscing ut lectus arcu bibendum at varius vel pharetra nibh venenatis cras sed felis eget dolor cosnectur drolo.

Developers are building fantastic dApps, but as a user, there is friction to interacting with these dApps. Users must go through a tedious process.

This process involves:

  1. Downloading a wallet
  2. Creating a wallet (managing your keys)
  3. Funding that wallet

We are well versed in how someone can download a wallet and manage their keys. But does a user need to fund the wallet — the answer is transaction fees. Users need to pay transaction fees whenever they call any function on a smart contract, i.e. using the dApp.

But that doesn't sound tedious. Right?
Funding the wallet is not an easy step. It involves:

  1. Selecting an exchange
  2. Creating an account
  3. Entering personal data and uploading proof of identity
  4. Depositing fiat currency
  5. Awaiting for funds to be accredited
  6. Purchasing currency needed for the transaction &
  7. It was transferring currency to a wallet that was created earlier.

The friction is super high, and the user drops off before finishing these steps. Hence it becomes difficult for dApps to scale and reach critical mass. Meta transaction is a way to solve the above steps of creating and funding the wallet.

A meta transaction is a way to separate the transaction's signer and gas fee and payer. There are three main actors in meta transactions: The user, the relayer, and the contract.

  1. User
    a. User signs the transaction with their private key.
    b. They send the signed transaction to the relayer.
    Note: Here user just signed the transaction and didn't execute it.
  2. Relayer
    a. Relayer verifies the transaction received from the user.
    b. Relayer wraps the signed transaction into an Ethereum transaction and executes it.
    c. In this way, the relayer pays the transaction fees.
  3. Contract
    a. The Contract receives the transaction made by the relayer.
    b. It then unwraps the original signature and uses it.


Advantages of Meta Transactions

  • It reduces friction as users don't have to fund their wallet
  • Developers can pay for users initially and recover the money over time in fiat or any other simple mode.
  • It helps you scale and improves adoption.
  • User identity is protected
  • dApp gets faster as no. of pending transactions reduces

Disadvantages of Meta Transactions

  • Meta tx does not work on all the contracts. Therefore, it should support meta transactions by importing appropriate code.
  • Some applications deploy a centralised relayer (single entity), which goes against the ethos of decentralisation.

Technical details

  1. EIP 712: Ethereum-typed structured data hashing and signing
    When a user signs the transaction instead of a standard signature, it is said to be a typed signature. The main reason behind doing this is that in a normal signature, users don't know what they are signing for. In a typed signature, however, they have a clear picture of what data they are signing in.
  2. EIP 2771: Secure Protocol for Native Meta Transactions
    Wrapping and unwrapping of transactions happen through this protocol. A developer has to inherit their contracts from here. After inheriting their contracts in their code, they need to rename two keywords throughout their code:
    a. msg.sender to _msgSender()
    b. msg.data to_msgData()

About Arcana Network

Arcana is Web3 infra for devs to launch and scale apps through its Auth, Store, and Access SDKs. Web3 apps use Arcana's SDK to authenticate users with Social and Passwordless Auth and create non-custodial wallets, Store Encrypted/Unencrypted Data, and Manage Access. Built for Ethereum and EVM-based chains, with Arcana's privacy stack, developers can build secure and privacy-preserving apps with a seamless user experience.

Arcana has raised 2.7Mn USD from some of the leading investors and founders in the ecosystem, such as Balaji Srinivasan, Founders of Polygon, Woodstock, Republic Crypto, and Digital Currency Group.

Watch out for Arcana's upcoming Mainnet in December 2022. Want to know more about our Mainnet features? Book a demo.

Book a Demo

Official Links: Website | Twitter | Discord| Telegram | TG Announcement | Medium | GitHub