BLOG — Updates

201 days ago

Upgrading ERC 4337: ZeroDev and Gelato

Gelato's bundler and paymaster system, now integrated with ZeroDev, takes a new approach to ERC-4337 - a game-changer in Ethereum's gas estimation!

Gelato launches its cutting-edge bundler and paymaster system to ZeroDev's platform, raising the bar for efficiency and accuracy in gas estimation. Discover how this integration simplifies Ethereum's transaction process and get the inside scoop on Gelato's fresh approach on ERC-4337 in our latest post.

Understanding ERC-4337 Account Abstraction

ERC-4337 plays a pivotal role in modernizing Ethereum's blockchain transactions. It represents a shift from traditional Externally Owned Accounts (EOAs) to a more flexible and secure framework through account abstraction. This approach enables the creation of smart contract wallets, which offer several advantages over EOAs:

  • Enhanced Security: Directly addressing vulnerabilities associated with EOAs.
  • Customization and Programmability: Empowering users to establish custom rules and operations.
  • Gas Payment Flexibility: Enabling fully sponsored transactions through a paymaster, utilizing a 1Balance USDC deposit for streamlined and efficient fee handling.

Key Components of ERC-4337

  • Sender: An ERC-4337 compatible smart contract wallet that stores user assets and follows a specific interface for validating UserOperations.
  • UserOperation: These are pseudo-transaction objects sent to an alternate mempool, containing all necessary transaction details.
  • EntryPoint: A singleton smart contract that handles the execution of UserOperations, offloading complex logic from individual wallets.
  • Bundler: Nodes that package multiple UserOperations and send them to the EntryPoint, initially covering transaction fees.
  • Paymaster: Paymaster covers transaction fees on behalf of the users. This feature is particularly crucial in complex blockchain operations where managing transaction costs can be challenging.

Gelato's & ZeroDev: Pioneering ERC-4337

Gelato's bundler and paymaster system, now integrated with ZeroDev, takes a new approach to ERC-4337.

Key Advantages

  • 100% Accuracy on Post-Execution Gas Settlement: Gelato's system excels in charging users for the exact amount of gas consumed, with 100% accuracy. This method is a significant improvement over traditional estimations, ensuring users only pay for what they use, thus eliminating common issues of overcharging.

  • 30% cheaper vs traditional methods: A standout feature of Gelato's approach is its cost efficiency, which is up to 30% cheaper compared to traditional methods. This efficiency is achieved by avoiding on-chain paymaster and fee transfer overheads, making transactions more economical.

  • Unrestricted Smart Account Operation: Gelato's system offers unlimited freedom in the validation and execution of transactions. It removes limitations such as blacklisted opcodes or restrictive gas limits. This unrestricted environment is particularly advantageous for ZeroDev, as it facilitates their exploration into signature verification and authentication logic.

  • Broad Network Support: The system is designed to operate seamlessly across all major EVM-compatible networks, including all Gelato Rollups. This wide-ranging compatibility ensures that the benefits of Gelato's approach can be leveraged across a diverse array of blockchain environments.

Gelato’s Reimagined Bundler & Paymaster

The Gelato Bundler, built on top of our existing battle-tested Relay infrastructure, receives UserOperations and immediately includes them in their own dedicated bundle which is executed by the EntryPoint smart contract. This eliminates any delay in waiting for bundles to form and prevents multiple UserOperations from invalidating each other, allowing the bundler to afford them more freedom during validation and execution.

The key difference between the Gelato Paymaster and other providers is that no EntryPoint deposit or on-chain paymaster is required. Instead, our 1Balance payment solution settles transaction fees post-execution across all supported networks with just a single deposit. Settling the transaction after the fact, with perfect information, ensures that the user is only charged for the exact amount of gas consumed with 100% accuracy and reduces the overall on-chain footprint. This allows projects to seamlessly sponsor transactions on behalf of their users.

ZeroDev's Modular Smart Wallet SDK

ZeroDev is the most developer-friendly SDK for building AA-based wallets and applications. Thanks to AA, projects using ZeroDev are able to sponsor gas for users and batch transactions. More importantly, ZeroDev is a pioneer in the concept of “modular smart wallets” – developers can use ZeroDev to develop custom wallet experiences.

At the core of ZeroDev’s modularity is Kernel – the most gas-optimised as well as the most widely-deployed smart account. Developers can extend Kernel accounts by writing “plugins,” which are smart contracts that modify the authorization logic of the wallet. Through plugins, you can easily integrate with a variety of popular authentication flows, such as session keys, 2FA, recovery, and multisig. If existing authentication flows don’t fit your needs, you can develop your own plugins.

Importantly, ZeroDev integrates with a variety of popular authentication methods, ranging from socials (e.g. Google/Facebook) to email to passkeys. You can even use ZeroDev alongside your favourite WaaS providers such as Privy and Dynamic, to enable AA on top of your favourite embedded wallet services.

Key Features of ZeroDev

To sum up, the key advantages of ZeroDev are:

  • Flexible authentication methods – your users can sign in using anything from socials, to passkeys, to EOAs.
  • Native AA features – you can sponsor gas for users, batch & automate transactions, and more.
  • Extensible wallet architecture – you can program custom authentication logic for your users, or integrate with existing plugins such as session keys, 2FA, recovery, etc.

Conclusion

This partnership makes Gelato's gas calculations and transaction handling better and more efficient. At the same time, it showcases ZeroDev's unique Kernel technology for smart wallets. ZeroDev's Kernel is built to be adaptable and work well with ERC-4337, laying the groundwork for more advanced wallet features. Together, they offer a complete solution that makes dealing with complex blockchain transactions easier. Moving forward, the combination of ZeroDev's versatile wallet system and Gelato's effective transaction management is setting a new standard, pushing forward new developments and making Ethereum easier and better to use.

About Gelato

Gelato is a Web3 Cloud Platform empowering developers to create automated, gasless, and off-chain-aware Layer 2 chains and smart contracts. Over 400 web3 projects rely on Gelato for years to facilitate millions of transactions in DeFi, NFTs, and gaming.

  • Gelato RaaS: Deploy your own tailor-made ZK or OP L2 chains in a single click with native Account Abstraction and all Gelato middleware baked in.

  • VRF: Gelato VRF provides fast, on-chain verifiable randomness for blockchain applications.

  • Functions: Serverless, event-driven functions to automate blockchain transactions.

  • Relay: Give your users access to reliable, robust, and scalable gasless transactions via a simple-to-use API.

  • Account Abstraction SDK: Gelato has partnered with Safe, to build a fully-fledged Account Abstraction SDK, combining Gelato's industry's best gasless transaction capabilities, with the industry's most secure smart contract wallet.

Subscribe to our newsletter and turn on your Twitter notifications to get the most recent updates about the Gelato ecosystem! If you are interested in being part of the Gelato team and building the future of the Internet browse the open positions and apply here.