diff --git a/contracts/paymaster/README.md b/contracts/paymaster/README.md index f1b9e07d..3b4772bd 100644 --- a/contracts/paymaster/README.md +++ b/contracts/paymaster/README.md @@ -2,6 +2,19 @@ ## Overview +**Definition of problem**: the user needs to have a gas token (eGLD in case of MultiversX) to be able to do anything on the blockchain. +This is a hard concept to explain to non-crypto users. +Also gives some headaches for crypto users as well for the first steps of onboarding. +Imagine those people who bridge their NFTs or those who bridge USDC to a new account. +The new account can’t do anything until it does not have some eGLD to pay for the transactions. + +In order for users to onboard faster to xPortal (even when it was called Maiar) we introduced the concept of relayed transactions (we have v1, v2 and soon v3 of it). +This means a relayer can wrap the user transaction inside a relayedTX and in this case the relayer pays for the gas, but the user’s transaction is getting executed. +Right now, the relayers we use are free of charge, thus they do this service for new users for free, but they actually need eGLD to do the transactions. +When we speak about a few hundred users, this is not an issue, but when you want to scale up relaying transactions to thousands/millions of users, it becomes unsustainable. + +## Implementation + Paymaster is a SC that makes relayed transactions sustainable. This means that a user who doesn't own EGLD (native token) can make transactions by paying a fee in another token. @@ -9,7 +22,6 @@ The Paymaster's objective is twofold: - take a fee and send it to the Relayers; - execute what the user wants to be executed. -## Implementation The contract has only one endpoint: `forward_execution` and can be called by anyone. The user will use `MultiESDTNFTTransfer` support to send multiple payments: