# Difference between various Smart Account types in permissionless.js

permissionless.js supports 8 types of accounts. Below is an overview of each account type and their key features:

1. **Safe**
2. **Kernel**
3. **Nexus**
4. **Simple Smart Account**
5. **LightAccount**
6. **TrustWallet**
7. **Etherspot**
8. **Thirdweb**

***

## 1. **Safe**

[Safe](https://safe.global) is a robust and widely used Ethereum smart account provider. With its ERC-4337 module, Safe accounts can integrate with ERC-4337 bundlers and paymasters.

* **ERC-7579 Support**: Yes, via [Rhinestone's safe7579](https://github.com/rhinestonewtf/safe7579) module.
* **Passkeys Support**: Supported through [Safe's passkey module](https://github.com/safe-global/safe-modules/blob/466a9b8ef169003c5df856c6ecd295e6ecb9e99d/modules/passkey/README.md); not yet supported in permissionless.js.
* **Multiple Signers**: Yes, as Safe is one of the first multi-signature smart accounts.
* **Chain Support**: Available on all chains where Safe factories are deployed.
* **Usage Stats**: ~34k Safe accounts created in the last 6 months ([source](https://stats.pimlico.io/accounts)).
* **Security**: Secures over $100B+ in assets, making it highly reliable.

## 2. **Kernel**

[Kernel](https://github.com/zerodevapp/kernel) by [ZeroDev](https://zerodev.app) is a highly gas-efficient smart account compatible with ERC-4337 and ERC-7579.

* **ERC-7579 Support**: Yes, authored by the ZeroDev team.
* **Passkeys Support**: Yes.
* **Multiple Signers**: Supported through flexible permission settings:
  * Define who can perform actions.
  * Specify conditions for actions.
  * Configure what actions can be performed.
* **Usage Stats**: ~133k Kernel v3 and 771k Kernel v2 accounts created in the last 6 months ([source](https://stats.pimlico.io/accounts)).
* **Audits**: Audited by [ChainLight](https://github.com/zerodevapp/kernel/blob/737db3123165d6009c9261dc98e149a3fdd82f97/audits/chainlight_v3_0.pdf) and [Kalos](https://github.com/zerodevapp/kernel/tree/737db3123165d6009c9261dc98e149a3fdd82f97/audits).

## 3. **Nexus**

Biconomy [Nexus](https://github.com/bcnmy/nexus) focuses on modularity, security, and scalability. Support for the older Biconomy Smart Account is being deprecated in favor of Nexus.

* **ERC-7579 Support**: Yes.
* **Passkeys Support**: Supported via Rhinestone's Passkeys Validator (not yet in permissionless.js).
* **Multiple Signers**: Enabled using Rhinestone's session keys module.
* **Usage Stats**: ~78 Nexus accounts and 224,758 Biconomy v2 (deprecated) accounts created in the last 6 months ([source](https://stats.pimlico.io/accounts)).
* **Audits**: Audited by [Cyfrin](https://github.com/bcnmy/nexus/blob/dev/audits/CodeHawks-Cyfrin-Competition-170924.pdf) and [Spearbit](https://github.com/bcnmy/nexus/blob/dev/audits/report-cantinacode-biconomy-0708-updated.pdf).

## 4. **Simple Smart Account**

[Simple Smart Account](https://github.com/eth-infinitism/account-abstraction/blob/v0.7.0/contracts/samples/SimpleAccount.sol) is a sample smart account by the Eth-Infinitism team.
This is supposed to be a reference implementation for ERC-4337 and not a production-ready smart account.

* **ERC-7579 Support**: No.
* **Passkeys Support**: No.
* **Multiple Signers**: No.
* **Usage Stats**: ~1.5M accounts created in the last 6 months ([source](https://stats.pimlico.io/accounts)).
* **Audits**: Audited by [OpenZeppelin](https://github.com/eth-infinitism/account-abstraction/blob/develop/audits/EIP_4337_%E2%80%93_Ethereum_Account_Abstraction_Incremental_Audit_Feb_2023.pdf).

## 5. **LightAccount**

[LightAccount](https://github.com/alchemyplatform/light-account) is a lightweight ERC-4337 smart account based on [SimpleAccount](https://github.com/eth-infinitism/account-abstraction/blob/v0.7.0/contracts/samples/SimpleAccount.sol) with added functionality for smart account signers.

* **ERC-7579 Support**: No.
* **Passkeys Support**: No.
* **Multiple Signers**: No.
* **Usage Stats**: ~7.3M accounts created in the last 6 months ([source](https://stats.pimlico.io/accounts)).
* **Audits**: Audited by [QuantStamp](https://github.com/alchemyplatform/light-account/blob/develop/audits/2024-01-09_quantstamp_aa8196b.pdf).

## 6. **TrustWallet**

[TrustWallet](https://trustwallet.com/) is a popular cryptocurrency wallet supporting a wide range of digital assets across multiple blockchains. It provides users with a secure, self-custody solution and has introduced ERC-4337-compatible features.

* **ERC-7579 Support**: No.
* **Passkeys Support**: Yes, through [Barz](https://trustwallet.com/blog/introducing-barz-smart-contract-wallet-solution), Trust Wallet's ERC-4337-compatible smart contract wallet, which supports passkey-based authentication.
* **Multiple Signers**: Yes, Trust Wallet offers multisig functionality to enhance transaction security.
* **Usage Stats**: ~36,838 accounts created in the last 6 months ([source](https://stats.pimlico.io/accounts)).
* **Audits**: Trust Wallet has undergone independent audits.

## 7. **Etherspot**

Details on Etherspot integration coming soon.

## 8. **Thirdweb**

Details on Thirdweb integration coming soon.

## Summary of Key Features

| Account Type      | ERC-7579 | Passkeys | Multiple Signers | Accounts Created (6 months) | Audited By             |
|-------------------|-----------|----------|-------------------|-----------------------------|-------------------------|
| Safe              | ✅         | ✅       | ✅               | 34k                     | Various                |
| Kernel            | ✅         | ✅       | ✅               | 133k (v3), 771k (v2)  | ChainLight, Kalos      |
| Nexus    | ✅        | ✅       | ✅               | 78   | Cyfrin, Spearbit       |
| Biconomy v2 (deprecated) | ✅        | ✅       | ✅               | 224k    | Cyfrin, Spearbit       |
| Simple  | ❌        | ❌       | ❌                | 1.5M                  | OpenZeppelin           |
| LightAccount      | ❌        | ❌       | ❌                | 7.3M                  | QuantStamp             |
| TrustWallet       | ❌        | ✅      | ✅               | 36k                     | Independent audits                    |
| Etherspot         | TBD       | TBD      | TBD               | TBD                         | TBD                    |
| Thirdweb          | TBD       | TBD      | TBD               | TBD                         | TBD                    |

## Gas Efficiency of various Smart Account types

Results (as of February 24, 2024)

**Disclaimer** the numbers are obtained from [aa-benchmark](https://github.com/zerodevapp/aa-benchmark) from ZeroDev.

Since these are gas numbers, lower is better.

|                   | Creation | Native transfer | ERC20 transfer | Total  |
| ----------------- | -------- | --------------- | -------------- | ------ |
| Solady ERC4337    | 212262   | 100149          | 89532          | 401943 |
| Kernel v2.1-lite  | 230968   | 101002          | 90321          | 422291 |
| Kernel v2.1       | 265215   | 106460          | 96038          | 467713 |
| Biconomy (deprecated)         | 270013   | 104408          | 93730          | 468151 |
| SoulWalletCore    | 276529   | 101162          | 90466          | 468157 |
| LightAccount      | 279820   | 100910          | 90411          | 471141 |
| Etherspot         | 279219   | 103719          | 93324          | 476262 |
| ERC7579 reference | 289438   | 103811          | 93213          | 486462 |
| Kernel v2.0       | 339882   | 110018          | 99622          | 549522 |
| SimpleAccount     | 383218   | 101319          | 90907          | 575444 |
| Safe 4337         | 401848   | 115469          | 105089         | 622406 |
| Alchemy ModularAccount | 827723   | 106630          | 96438          | 1030791 |
