βοΈUnderstanding the flow
In this section we'll learn how to create a custodial solution (smart-contract/front-end/back-end) to be able to make a gas-less / wallet-less dApp
The goal
In this part, we'll learn how to create a modern solution to create a dApp capable of creating a web3 experience similar to a web2 one.
This setup is made possible by the ability to relay transactions via the callPermit we've already explained. However, in order to remove the wallet from the dApp, we need to create "mirror wallets". Each real user will be assigned an address, controlled by the dApp's creators. This way of doing things has certain advantages in terms of accessibility, since it's based on a centralized solution.
Nevertheless, each use is unique, and we need to think carefully about security: for these reasons, we recommend that these mirror wallets should be token-free. The entire security logic must be implemented on 3 levels:
securing mirror wallet keys,
smart-contract security via modifiers,
securing the back-end and client requests.
How to define a "mirror wallet" ?
In order to create a gas-less and wallet-less solution, each user of our dApp is given an unique mirror wallet.
The link between the user and his mirror can be established in different ways:
A mapping between his real EOA and his mirror directly in the dApp's smart contract,
A web2 link using an auth provider to create a connection between credentials (email/password, social auth...) and this mirror.
Last updated