Skip to content

Guardian Smart Wallet Contracts is a rollup to thirdweb's smart wallet, offering a secure and invisible wallet experience for your users through smart wallets, social account recovery and locking features.

License

Notifications You must be signed in to change notification settings

alfheimrShiven/guardian-smart-wallet-contracts

 
 

Repository files navigation

Guardian Smart Wallet Contracts 👮🏻‍♂️

Guardian Smart Wallet Contracts is a rollup to thirdweb's smart wallet contracts and offers:

  1. Smart Accounts
  2. Social Account Locking
  3. Social Account Recovery
  4. Guardian Management

Problem Statement

As we all know, a wallet is a gateway to web3 but the wallet experience is unfortunately broken! For a user to interact with a blockchain, they not only have to create a wallet but also secure their private keys and seed phrase, purchase native tokes to pay for gas, and sign every single action that they take on a dApp.

Such an intimidating user experience for newcomers is a big obstacle in the mass adoption of web3 and Guardian Wallet SDK is here to change this through its Account abstraction technology.

Smart wallets and its features

Smart wallets are wallets that are controlled by a smart contract and have the following key benefits-

  1. Abstracted user experience:

    Eliminates the need to manage private keys or seed phrase, making it easier and safer for users to experience Dapps.
  2. Enable gasless transactions:

    Dapps providing smart account can sponser gas on behalf of their users therefore reducing investment to entry and drastically improving user experience as users now don't have to approve each transaction they make with the Dapp.
  3. Enhanced security through account locking, social recovery and multisig:

    In case the user lose access to their wallet, they can immediately lock their account assets, holding all withdrawal transactions, and can even recover access to their accounts through concensus of their account guardians (trusted people who the user allots to help recover their account in case required).
    Smart accounts can also provide multisig capabilities, requiring multiple signatures on a transaction, before it's executed, thus enchancing security.
  4. Automation of transactions

    Enables self executing transactions when certain defined conditions are met like approving a predefined number of tokens to an entity based on fixed time intervals, stop loss and take profit orders, recurring subscriptions, etc.

Architecture

Guardian_architecture



YouTube

Contracts

The wallet SDK is a rollup to thirdweb's smart wallet (ERC-4337) contracts. We've added the following contracts to extend it's functionality:

  • Account.sol:This is the smart contract that powers the smart wallet by offering features like executing single or batched transactions, locking account assets and updating the owner of the smart account incase of an account recovery is made.
  • AccountGuardian.sol: Used by the user to assign guardians for smart wallet accounts.
  • Guardian.sol: Powers the guardian interactions, like attending to account lock & recovery requests for the account they are guarding.
  • AccountLock.sol: Adds features like creating account lock requests and evaluating concensus on them followed by locking/unlocking the account assets.
  • AccountRecovery.sol: One of the most important contracts adding features like creating account recovery requests and evaluating concensus on them. Once the concensus is achieved, a new embedded wallet is created and made the owner of the smart contract holding all user assets, thus recovering the account.
⚠️ Disclaimer

The above mentioned contracts are unaudited. Kindly include them in the scope of your audits before going live.

Documentation

Guardian Smart Wallet Contract Docs

Author:

Shivendra Singh

GitHub LinkedIn Twitter Substack

License

Apache 2.0

About

Guardian Smart Wallet Contracts is a rollup to thirdweb's smart wallet, offering a secure and invisible wallet experience for your users through smart wallets, social account recovery and locking features.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages

  • Solidity 99.2%
  • Other 0.8%