Meta Transaction
Understanding meta-transactions:
Last updated
Understanding meta-transactions:
Last updated
A meta-transaction is a regular Ethereum transaction that contains another transaction, the actual transaction. The actual transaction is signed by a user and then sent to an operator or something similar; no gas and blockchain interaction is required. The operator takes this signed transaction and submits it to the blockchain paying for the fees himself. The forwarding smart contract ensures there is a valid signature on the actual transaction and then executes it.
Imagine you have an L2 wallet address with zero ETH in it and you received 1000 DAI from another address. You are unable to make use of them since you don’t have enough money to execute any transactions. Nether protocol aims to solve the problem while a user is on-boarding on a L2, simultaneously providing deeper liquidity in the form of ERC-20 across protocols level to be used as meta-transactions to mimic gas costs.
Gas is pivotal in Ethereum world. To make the analogy, it is the fuel that allows it to operate, in the same way, that a car needs gasoline to run or similar to a computer that needs electricity to compute the given pieces of information.
In short, gas refers to the unit that measures the amount of computational effort required to execute specific operations (e.g. sending ETH or a token) on the Ethereum network. Since each Ethereum transaction requires computational resources to execute, each transaction requires a gas fee.
To execute meta-transactions; a very basic setup would consist of 3 entities:
Signer — the address that has 0 ether and is the creator of the transaction. This address is the one that signs the transaction data.
Sender— the address which has ether and is willing to send the transaction on your behalf, thus paying the gas.
Relay/Proxy — a smart contract that would read the signed data, validate it against the provided signature and forward the call to the actual contract.
Note that in this case the transaction sender would be the Proxy contract (e.g. the msg.sender). In the case of an ERC-20 transfer, the Signer needs to approve the Proxy contract to transfer tokens on it’s behalf (unless the ERC-20 contract supports meta transactions already. See EIP-1776
The relayer sends a withdrawal transaction and takes a part of the deposit as compensation (the protocol itself does not collect any fees). The relayer cannot change any withdrawal data including recipient address.