Skip to content

Commit

Permalink
feat: adds getting started guide for module devs and auditors
Browse files Browse the repository at this point in the history
  • Loading branch information
koshikraj committed Mar 19, 2024
1 parent 5391036 commit 6cfba1b
Show file tree
Hide file tree
Showing 21 changed files with 308 additions and 134 deletions.
7 changes: 0 additions & 7 deletions docs/aa-guide/index.md

This file was deleted.

34 changes: 34 additions & 0 deletions docs/aa-guide/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_position: 2
---

# Basics

## What is Account Abstraction?

Imagine being able to use your crypto wallet account just as seamlessly as your traditional bank app account. This is the essence of Account Abstraction. Account Abstraction allows users to interact with accounts built on smart contracts seamlessly without the need to know how how wallet accounts are traditionally managed, which can be referred to as "Smart Accounts."

To better understand Account Abstraction, let's first explore the two types of accounts commonly used:

### Externally Owned Accounts (EOAs):

EOAs are accounts controlled by a single private key. They are widely used in Ethereum, such as your MetaMask account. However, EOAs present a poor user experience as they require users to securely store private keys, which poses a risk. Losing private keys can result in permanent loss of access to funds stored in the account.

### Smart Contract Accounts:

Smart Contract Accounts are a type of cryptocurrency wallet that allows users to own an account in the form of smart contracts on the blockchain. These wallets have gained popularity due to their ability to automate complex processes and provide wallet recovery functionalities, enabling secure and seamless interaction with the blockchain.

Smart Contract Wallets are the foundation of Account Abstraction, with a simple concept: "providing you with a crypto wallet that even a grandparent can use." How is this made possible? Account Abstraction allows your crypto wallet to be represented by a smart contract. Its goal is to offer crypto users features similar to those provided by traditional banking apps, including Wallet Recovery, Multi-Signature Transactions, Custom and 2FA authentication, Gasless or Sponsored Transactions, and other convenient features, all without the need for trust in custody.

## Benefits of Account Abstraction:

**🔒 Account Recovery**: Account Abstraction ensures that even if you lose access to your private keys, you can recover your wallet and regain control over your funds.

**Batched transactions**: Capable of batching transactions together; e.g. approving a token transfer and transferring a token in the same operation, thus bringing down the overal transaction cost.

**🔌 Modular Account:** Account Abstraction enables customizable features to be added to the account such as 2fa based transactions, session keys
to allow third party authorization, auto payments etc.

**⛽️ Gasless and Sponsored Transactions**: Account Abstraction simplifies transaction processes by eliminating the need for users to have native blockahin currency such as ETH to pay transaction fees. It allows transactions to be sponsored or paid by others, reducing barriers to entry.


30 changes: 28 additions & 2 deletions docs/button/button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,32 @@ export const StyledButton = styled.button`
font-weight: 600;
font-size: 16px;
color: #fff;
background: linear-gradient(132.56deg, #61FF47 -20.89%, #89B8FF 99.53%, #FF70F1 123.47%);
// background: linear-gradient(132.56deg, #61FF47 -20.89%, #89B8FF 99.53%, #FF70F1 123.47%);
border-radius: 5px;
cursor: pointer;
border-width: 0px;
`;

export const GreenButton = styled.button`
padding: 1.4rem;
min-width: 160px;
font-weight: 600;
font-size: 16px;
color: #fff;
background: rgb(124, 197, 98);
border-radius: 5px;
cursor: pointer;
border-width: 0px;
`;

export const OutlineButton = styled.button`
padding: 1.4rem;
min-width: 160px;
font-weight: 600;
font-size: 16px;
color: #fff;
box-shadow: rgb(97, 255, 71) 0px 0px 2px;
background: rgb(32, 40, 61);
border-radius: 5px;
cursor: pointer;
border-width: 0px;
Expand All @@ -21,5 +46,6 @@ export interface ButtonComponentProps {

export const Button: React.FC<ButtonComponentProps> = ({
children,
className,
...rest
}) => <StyledButton {...rest}>{children}</StyledButton>;
}) => className == 'green' ? <GreenButton {...rest}>{children}</GreenButton> : ( className == 'outline' ? <OutlineButton {...rest}>{children}</OutlineButton> : <div/>);
18 changes: 0 additions & 18 deletions docs/getting-started /create-account.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/getting-started /transaction-guards.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/getting-started /transactions.md

This file was deleted.

File renamed without changes.
24 changes: 24 additions & 0 deletions docs/getting-started/audit-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 2
---

# Add Audit Attestations

ZenGuard providers the security assurance for the modules via onchain audit attestations provided by the auditors.
Auditors provide these audit attestations to the module via our dashboard which are embedded onchain on EAS and later used
to verify when a Safe user enables them on them Safe Account.

Auditors have to follow only few steps to attest the module.

1. Verify their account on the Dashboard (https://dashboard.zenguard.xyz)
2. Naviagate to the desired module and find their info - onchain deployment, code base, application etc.
3. They can then can perform the audits. Once the audit is completed they can add the audit details as attestation for the partical module.

The audit attesation follows the [ERC-7512](https://github.com/ethereum/ercs/blob/master/ERCS/erc-7512.md) standard. Here is a detailed post on how we leverage this ERC: https://7512.zenguard.xyz

Once the module is attested the audit details will be available on ZenGuard Module [Marktetplace](https://explore.zenguard.xyz).

Here is a quick demo of the module audit attestation flow.


![ Audit Attestation ](./img/zen-audit.gif)
16 changes: 16 additions & 0 deletions docs/getting-started/explore-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_position: 3
---

# Explore Modules

Module explorer can be directly used as a Safe App.

Head over to our [Marketplace](https://app.safe.global/share/safe-app?appUrl=https://explore.zenguard.xyz&chain=sep)

Here are a few demos of using modules on ZenGuard directly on Safe Wallet.

[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/myIRwe1k3y8/0.jpg)](https://www.youtube.com/watch?v=myIRwe1k3y8)

[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/wN7K_cafzcc/0.jpg)](https://www.youtube.com/watch?v=wN7K_cafzcc)

Binary file added docs/getting-started/img/zen-audit.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
sidebar_position: 4
---

# Account Recovery
# Integrate Modules from ZenGuard

Coming soon!
22 changes: 22 additions & 0 deletions docs/getting-started/publish-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_position: 1
---

# Publish Modules

One of the key features of a secure and accessible module marketplace is providing a platform and tools for developers to build
and publish the modules in a secure and convenient way. At ZenGuard we make sure to give this experience for developers through
our module dashboard.

Developers have to follow only few steps to get the module listed.

1. Verify their account on the Dashboard (https://dashboard.zenguard.xyz)
2. Develop and deploy the module using the [template](https://github.com/zenguardxyz/module-template)
3. Publish the module using contract address or repo link at: https://dashboard.zenguard.xyz/#/publish

That's it!. The module will be automatically listed on the ZenGuard Module [Marktetplace](https://explore.zenguard.xyz).

Here is a quick demo of the module publishing flow.

[![Publish Module](https://img.youtube.com/vi/CQspDgZsxAU/0.jpg)](https://www.youtube.com/watch?v=CQspDgZsxAU)

52 changes: 16 additions & 36 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,37 @@ import { Button } from './button/button.component';

# Introduction

> **Programmable Wallet
For Your Peace of Mind**
> **Smarter Module Marketplace
For your Smart Accounts**
>
**Smart contract Wallet SDK where recovery made *secure*,
features made *programmble*, onboarding made *simple* **
** Extending your smart accounts is now as *easy*
and *secure* as installing an app on your smart phone **

<Button onClick={ ()=>{window.open("https://demo.zenguard.xyz", '_blank' )}}>Try Demo</Button>
<Button className='green' onClick={ ()=>{window.open("https://safe2link.xyz", '_blank' )}}>Module Demo</Button>
&nbsp;&nbsp;&nbsp;&nbsp;
<Button className='outline' onClick={ ()=>{window.open("https://app.safe.global/share/safe-app?appUrl=https://explore.zenguard.xyz&chain=sep", '_blank' )}}>Try Marketplace</Button>

## About:

ZenGuard is an account abstraction smart contract wallet suite that makes Web3 accessible to everyone by providing a programmable wallet that is easy to onboard, recover, and has pluggable features.
ZenGuard stands as a pioneering app store dedicated to smart contract wallets. Here, developers can easily publish and monetize their cutting-edge features, while users seamlessly enhance their accounts with top-tier security measures and user-friendly upgrades. Each feature is meticulously crafted as a [Safe modules](https://docs.safe.global/smart-account-modules), ensuring a secure and streamlined experience for all users involved.

ZenGuard makes this possible by providing the following features:

1. Easy onboarding
2. Secure recovery
3. Programmable plugins
At ZenGuard, we have designed a platform for publishing, exploring, and enabling these modules. Understanding that the security of these modules is of utmost importance, we will be onboarding module auditors through our module [dashboard](https://dashboard.zenguard.xyz).

ZenGuard provides all these with the help of platform that:

### Easy onboarding:
1. Onboards developers to build and publish modules, streamlining the development process.
2. Onboards auditors to provide security assurance through onchain audit attestations for modules
3. A module marketplace for Safe account users to exlpore, enable and upgrade the modules

ZenGuard leverages Account Abstraction to provide keyless and gasless onboarding experience for the users.

- **No more seed phrases:** Thanks to smart contract wallets leveraging account abstraction that provides easy authentication with any existing authentication mechanisms
including social logins, email, touch ID, and face ID or even with the existing wallets like MetaMask.
- **Gas sponsorships:** Perform transactions without the native currency to pay for transaction fee. Transaction fee can be completely sponsored or paid in any token.

Additional security can be added for the wallet while performing transactions such as MultiSig (Provided by Safe thresholds) and 2-factor authentication
- **MultiSig Guards**: Add more than one signer (user) to approve the transaction
- **2FA Guards:** Enable 2FA such as mobile, email OTP, Touch ID, and Face ID authentications to approve transactions
- **Transaction limits:** Set transaction limits for each crypto asset
> ℹ️ **BACKGROUND: Safe Modules**:
### Secure recovery:
> Safe Modules enable Safe Accounts to add additional custom features in the form of standardized Smart Contracts. These smart contract logic can be anything from Social Recovery, Passkey Auth, Session Key to DeFi Automation, and much more. We have created a non-exhaustive list [ here ](https://notes.zenguard.xyz/module-research).
** *The secure recovery solutions are seamless to set up and ensure that the user always retains control of the wallet.* **

Wallet recovery is an important aspect of the wallet UX, but this has been the missing piece in many existing wallets until now. The currently available recovery method in smart contract wallets is social recovery. Vitalik too has been the advocate of social recovery wallets for quite some time. But there are plenty of things to consider in social recovery to make it secure and easy to use as pointed out here: **https://twitter.com/VitalikButerin/status/1636608740513263617?s=20**

At Zenguard we are trying to provide the best recovery solution leveraging the concept of social recovery but considering a whole lot of other things to make this as secure and convenient as possible for normal wallet users.

Users can set various recovery mechanisms such as **biometrics, email, or even arbitration**.


### Programmable plugins:

We believe that a account should be extensible to add desired features. ZenGuard enables this with the help of plugins leveraging Safe modules.

ZenGuard will provide a market place of plugins to quickly add features to the wallet.

A few plugins:
** A few of these modules can be: **

- **Session keys** : Allow third part application to perform transaction on user's behalf with a session key with limited capability.
- **Transaction limit** : Limit the transactions based on number of transactions/ daily spend limit etc.
Expand Down
6 changes: 3 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'ZenGuard',
tagline: 'Programmable wallet for your peace of mind',
tagline: 'Smarter Module Marketplace For your Smart Accounts',
favicon: 'img/favicon.ico',

// Set the production url of your site here
Expand Down Expand Up @@ -75,9 +75,9 @@ const config = {
label: 'Documentation',
},
{
href: 'https://demo.zenguard.xyz',
href: 'https://explore.zenguard.xyz',
position: 'left',
label: 'Try Demo',
label: 'Try Marketplace',
},
{
href: 'https://disocrd.zenguard.xyz',
Expand Down
1 change: 1 addition & 0 deletions static/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs.zenguard.xyz
Binary file modified static/img/favicon.ico
Binary file not shown.
Loading

0 comments on commit 6cfba1b

Please sign in to comment.