One year ago, I gave a non-public talk about metatransactions in Ethereum and RSK. My slides here. My project with the samples in my EthMeta repository. I recollected some links that explain the idea, history and motivation of metatransactions.
With metatransactions, a user without balance could interact with the blockchain, sending transactions with the help of an sponsor. Usually, the sponsor is interested in the adoption of a game o similar dapp, and pays the gas costs. But the sample could be easily extended to support that the original user pays to the sponsor using tokens. (recently I wrote about other ideas to have similar results: More Free Transactions in RSK, Paying Transactions Using Tokens, Free Transactions in RSK).
These days, I updated the commands to use the sample metatransactions contract. You can use a local Ethereum or RSK node, but also I included instruction to use RSK testnet network.
The idea is simple:
- The user sends the intention (which contract to invoke, with which data) to an sponsor system. The intention should be signed by the user RSK account, but this account usually has no balance
- The sponsor system checks the validity of the intention, and then sends a real transaction to a proxy contract. Each external user has an associated proxy contract. In my sample, the mapping of user address to proxy contract is maintained by a proxy manager, but this functionality is not a requirement.
- The proxy contract validates that the intention was signed by its assigned external user, and then invokes a call to the final smart contract (the smart contract the original user wants to invoke)
Pending work to do: add more invoked contracts and use tokens (to be assigned to proxy user contracts, and to be used to pay the sponsor).
Angel “Java” Lopez