Skip to content

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
CostinCarabas committed Sep 29, 2023
1 parent a3100e4 commit 56675a9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion contracts/paymaster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@

## 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.

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:
Expand Down

0 comments on commit 56675a9

Please sign in to comment.