Parthasarathy Ramanujam
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    3
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    *Acknowlegements: We would like to thank [Hazim Jumali](https://twitter.com/hazimj_) (Stackup), [Kristof Gazso](https://twitter.com/kristofgazso) (Pimlico), [Derek Chiang](https://twitter.com/decentrek) and [Taek Lee](https://twitter.com/leekt216) (ZeroDev Kernel) for their review and feedback on this. [Vignesh Aravamudhan](https://github.com/vignesha22) and [Sherif Abdelmoatty](https://twitter.com/SherifA990) for running the necessary tests. We would like to emphasize from the beginning that the purpose of this exercise was not to assert the superiority of one implementation over the other. The primary goal was purely academic, aiming to document the extent of gas consumption by smart wallets during different operations in comparison to EOAs. Gas consumption is a critical factor to consider when developing and deploying smart contracts on the Ethereum blockchain. Different implementations of account abstraction can have varying gas costs for various operations. In this blog post, we will compare the gas consumption of different account abstraction implementations, specifically focusing on the following SDKs: Simple Account, Kernel, Etherspot, and Biconomy. We will analyze the gas costs for wallet deployment, native token transfer, ERC20 transfer, NFT minting, NFT transfer, and swaps. Before we dive into the comparison, it's important to note the additional information related to the testing of these implementations: - All transactions were performed on the Mumbai Testnet, ensuring that the results are specific to the test environment and may not directly reflect the gas costs on the Ethereum mainnet. - ZeroDev Kernel contracts were tested using the Stackup bundler and UserOp.js. This approach provides a comprehensive evaluation of the Stackup implementation, as it involves both the bundler and UserOp.js for transaction execution. Currently, UserOp.js uses an alpha version of Kernel 2.0, which is expected to be further optimized before entering production. - Etherspot and Biconomy contracts were tested using their respective SDKs. This testing methodology ensures that the gas costs reflect the specific implementation details of each SDK, giving a fair comparison within their ecosystem. - SimpleAccount contracts were tested using both Stackup's and Pimlico's bundler. - UserOps using Paymasters were not considered for these tests. - Gnosis Safe contract was [Candide Wallet's](https://www.candidewallet.com/) implementation. - The github commit hashes of the contracts that were used for testing are as follows: - Etherspot - [88e99223540d1b2352d45b238469ea617509d123](https://github.com/etherspot/etherspot-prime-contracts/commit/88e99223540d1b2352d45b238469ea617509d123) - Biconomy - [9cea2f63c0a61380f295be122aeb6ee4697608d5](https://github.com/bcnmy/scw-contracts/commit/9cea2f63c0a61380f295be122aeb6ee4697608d5) - SimpleAccount - [abff2aca61a8f0934e533d0d352978055fddbd96](https://github.com/eth-infinitism/account-abstraction/commit/abff2aca61a8f0934e533d0d352978055fddbd96) - ZeroDev Kernel - [130d258f1b8996718894c5a40222af06262c96e1](https://github.com/zerodevapp/kernel/commit/130d258f1b8996718894c5a40222af06262c96e1) - Gnosis - [f7131dad4532e40488ade1932b9fd4f68c8d0e58](https://github.com/candidelabs/CandideWalletContracts/commit/f7131dad4532e40488ade1932b9fd4f68c8d0e58) **Gas Consumption Results:** Below is a table displaying the gas consumption results (in gas units) for each operation across various account abstraction implementations. The table also includes the corresponding gas consumption for an externally owned account (EOA). | Implementation | Wallet Deployment | Native Transfer | ERC20 Transfer |NFT Transfer | NFT Mint | Swap | | -------- | -------- | -------- | -------- | -------- | -------- | -------- | [Etherspot](https://github.com/etherspot/etherspot-prime-contracts)|[172994](https://dashboard.tenderly.co/tx/polygon-mumbai/0x3a198487d62e4af12fbc5bb188faacffe8022bcb0e87d9df7bdce4670121e46a/gas-usage)|[105682](https://mumbai.polygonscan.com/tx/0xfde380a76d67e6201b5313e564107ceb72541d243c6afdf892f7dbcee993d223)|[110983](https://mumbai.polygonscan.com/tx/0xfa52ca11bf6dc61b7fe73860a3b482d9ee315c7b3a9bb0c57a622fc78aec6e72)|[118390](https://mumbai.polygonscan.com/tx/0x34e55ce6ab8c2ac003b46f39b3ce08e182a367306cb6e71d2e44fc4ef95a7a4b)|[153451](https://mumbai.polygonscan.com/tx/0xf17f2983b68b6e0710fcc23ff9de026c57f1ad7364d453a5ff29fbae163ba2ac)|[185612](https://mumbai.polygonscan.com/tx/0x281514b31e6fb02a59419c78441c7d03948857630b9407d4756c9b515976e95a)| [SimpleAccount](https://github.com/stackup-wallet/contracts)|[279730](https://dashboard.tenderly.co/tx/polygon-mumbai/0x20322da82dbdc13ea69ae462ab60bab9ee71b82ca4dd963ec939caf66e632dfc/gas-usage)|[96806](https://mumbai.polygonscan.com/tx/0x969778adca19122e402c5c12a65248f5cc75b42f19d1d38045b70dfe6a9c8655)|[105273](https://mumbai.polygonscan.com/tx/0xa168918dfc8d611b0063ae8b193cabccce88e02ea8d869e7dc5449f0ace5ab02)|[135850](https://mumbai.polygonscan.com/tx/0x22f98286b701f6717f2db60f50f122eb35146ea8c289070616601719124c65ee)|[146816](https://mumbai.polygonscan.com/tx/0x3ccb8212406c1b8c375a5c8c53a21c89ff1ddc8f5fe8764bd82bfcd761d9ae21)|[198567](https://mumbai.polygonscan.com/tx/0xb22269bdd03203085ec1a0843da452a6922f589aa4e7a269832e2e4679e9770d)| [Biconomy](https://github.com/bcnmy/scw-contracts)|[161207](https://dashboard.tenderly.co/tx/polygon-mumbai/0x87bb3bd2171e0727720fb089ff0d7935abb38b8ef7f57ab4461dddf89cf9baa5/gas-usage)|[126111](https://mumbai.polygonscan.com/tx/0x95927823a3d6bf89cd1e67aa4acb5fe852d81ef058a85b37b5269e16a54eee0b)|[136489](https://mumbai.polygonscan.com/tx/0x3bb31f24cb3ff31ee76c6214bab6c5e2cd8686206b5a4383c53a9cbe592ef120)|[143472](https://mumbai.polygonscan.com/tx/0x28742f7e1d12d81e4810ae9cf0f4fd673273a1c3044b2fe0ede9cd3d60d8ed66)|[157517](https://mumbai.polygonscan.com/tx/0x45432a0213cd921359dbe72f29ceceb6addfd6321df861590149618da6e2a4a4)|[198544](https://mumbai.polygonscan.com/tx/0xdcb7b030c77e8ba94f2036c9767773f14c9ef8323de917808454514b33a9638e)| [ZeroDev Kernel](https://github.com/zerodevapp/kernel)|[200157](https://dashboard.tenderly.co/tx/polygon-mumbai/0x20c25b162fc0b0dd2f5597a0c911b7e7aa660b859800684fd1d60203e314aac7/gas-usage)|[114862](https://mumbai.polygonscan.com/tx/0xe07ecbe7bee4cf4874f86ca0b515167bc6c4ae87d9fc523f793d23758f29d19d)|[117551](https://mumbai.polygonscan.com/tx/0x410caad89e0d7edffba23c6fa67c0a1ee3eaf2a669ae6c1ddd8ff60f522ce199)|[146989](https://mumbai.polygonscan.com/tx/0x8020a2d6db124de439bb2d396390ff8fd632036a91f31832f1ceb4fb31c50f6f)|[164917](https://mumbai.polygonscan.com/tx/0x65b9e5607d207c19a7cee6fd37c6d26f3d4b9a97ee4696fc0794e924a7f9d415)|[214226](https://mumbai.polygonscan.com/tx/0x43b9c8eeded61d4870bc020973d2dfa2e57d03e753c9f9e89f35849766f826bb)| [Gnosis Safe*](https://www.candidewallet.com/)| [244315](https://dashboard.tenderly.co/tx/polygon-mumbai/0x614bc42b9f027b0c8145f78e211f643a5ad4aa934b041f930936e6132acfc868/gas-usage)|[106585](https://mumbai.polygonscan.com/tx/0x2f1ccd0cd79b083f5c2ca5731110a2a1bc3d72829b6fe10d442fbb95c18b1bd8)|[116868](https://mumbai.polygonscan.com/tx/0xdca0d6cdb4aa86c2605f02795158c377b2b7180a7d86b0ab1a8be508b43c7c76)|[124406](https://mumbai.polygonscan.com/tx/0x93251532af7920d5bf6836f469746b41d066d89f2b05ef6bdb3b8989cbed5199)|[159379](https://mumbai.polygonscan.com/tx/0x738355b4f0a1f53063f10646a2fc8fc5ff7be13948c309613f3160acf957974d)|[191623](https://mumbai.polygonscan.com/tx/0xaa0036ff5bcc645ee0fac853c8286fb9b9d515387f22f958f8bd2d4ab4052372)| EOA| - | [21000](https://mumbai.polygonscan.com/tx/0x2972c60b246a92ad291e5c8fde90b5c3a1d0987270e002170c5944e6aaa8f1dd)|[51806](https://mumbai.polygonscan.com/tx/0x27e43f02d11cf35ef4fad8dc4df5763757ef7cb94b3a38a3ffed97a07482fb1d) | [61044](https://mumbai.polygonscan.com/tx/0x4ee748cd877a5499aa564720c402091cb4030e880a3972f84a1979992a01bff5)| [57708](https://mumbai.polygonscan.com/tx/0xaae579f986f15373fca5b521a27fa859394fb152acf60deb7fea55427f38dee3)| [102027](https://mumbai.polygonscan.com/tx/0xdbca611d064f3b8d6fb2335a32778603a823003bfbd16259e5c428a12d6bf664)| ![](https://hackmd.io/_uploads/r11-fYgK3.png) **Wallet Deployment:** Finding the gas consumption for wallet deployments posed a challenge due to the interconnected nature of the deployment process. The deployment of the wallet contract is not an independent event but rather occurs within the context of the first UserOp initiated from a specific wallet address. To address this, we utilized Tenderly's gas profiler feature, which allowed us to determine the gas consumed by the `_createSenderIfNeeded` contract function call. Through our testing, we discovered that SimpleAccount consumed the highest gas (279K), followed by Gnosis (244K), ZeroDev Kernel (200K). Etherspot's implementation at 172K and Biconomy at 161K gas units. **Native Token Transfer:** Simple Account implementation leads in terms of gas efficiency for native token transfers, with a consumption of 96k. Etherspot closely follows with 105k, while Kernel, with 114k gas have slightly higer cost and Biconomy's implementation consumes 126. **ERC20 Transfer:** Simple Account implementation consumes the least amount of gas at 105K, Etherspot follows closely utilizing 110k gas,followed by Kernel at 117k. Biconomy has a gas cost of 136k. **NFT Minting:** Simple Account implementation requires the least amount of gas at 143K closely followed by Etherspot that requires 153k, followed by Biconomy and Gnosis at 157k and 159k, respectively. Kernel uses 164k gas units. **NFT Transfer:** Simple Account and Kernel demonstrates the lowest gas consumption for NFT transfers at 147K gas units, closely followed by Etherspot at 153k. Biconomy's implementation consumes at 157k. **Swaps:** Kernel is the highest in terms of gas consumption for swaps at 214k. While Biconomy and Simple Account implementations have gas costs of 199k and 198k, respectively. Etherspot's implementation consumes the least gas units (185K) for swaps. **Conclusion** In this comparison of gas consumption in various account abstraction implementations, we analyzed the gas costs for wallet deployment, native token transfer, ERC20 transfer, NFT minting, NFT transfer, and swaps. The results show that the performance varies across the implementations and operations tested. Ultimately, the choice of account abstraction implementation depends on the specific requirements of your project and the trade-offs you are willing to make between functionality and gas efficiency. Consider these gas consumption results as a starting point for your evaluation and conduct further research to determine the best implementation for your needs.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully