Overview
This section describes the smart contracts used by the Smart Wallet. There are three contracts:
- web2Auth, a Plutus script responsible for the first-time wallet activation;
- checkSig, a Plutus script which checks that there is a signatory corresponding to the wallet token name;
- wallet validator, a Plutus script used for spending funds when the wallet is activated which.
The reason behind having multiple contracts is that wallet activation (in particular, verifying ZK proof and all the information in the JWT) is an expensive operation with fees of roughly 1.67 Ada. To avoid this, the wallet activation script verifies the JWT and mints an NFT to the wallet's address. After that, the wallet validator only checks that the token is present by involing checkSig.