FAQ

A compilation of frequently asked questions relating to Stackup, ERC-4337, and Account Abstraction.

What networks does Stackup support?

Stackup's open source software works on any EVM compatible chain. Here are the ones that we host ourselves and make available through our user portal:

NetworkSupported
Ethereumβœ…
Sepoliaβœ…
Polygonβœ…
Mumbaiβœ…
Avalancheβœ…
Avalanche Fujiβœ…
Optimismβœ…
Optimism Sepoliaβœ…
Binance Smart Chainβœ…
Binance Smart Chain testnetβœ…
Arbitrum Oneβœ…
Arbitrum Sepoliaβœ…
Baseβœ…
Base Sepoliaβœ…

Why am I receiving an "Invalid UserOp signature or paymaster signature" error even though I verified the signature is valid?

If you encounter the "Invalid UserOp signature or paymaster signature" error, it typically indicates that either the UserOp signature or the paymasterAndData) is not valid. Here are some steps to troubleshoot the issue:

  • Ensure that you are using the correct private key or secret to sign the User Operation. Double-check that the key or authentication method you are using matches the one associated with the account you intend to sign for.
  • Verify that only the final User Operation is signed by the user. In some cases, middleware functions like userop.js may modify the user operation after receiving the signature, leading to signature validation errors. Middleware functions in userop.js are executed in order when the user operation is built, and mis-ordering of middleware functions (especially when using presets) may be the issue. Make sure that no unintended modifications are occurring.
  • Review your RPC request and ensure that all the required parameters are included and properly formatted. Check for any missing or incorrect data that may cause the signature validation to fail.

How can I enable social login with ERC-4337?

While ERC-4337 allows a smart contract to define its approval logic, by itself it does not enable social login. To enable social login, you can consider the following options:

  • Utilize an MPC (Multi-Party Computation) service such as Web3Auth, Particle Network, Magic.link, or Lit Protocol to link a user's social identity to a cryptographic key. This key can then be set as the owner of the Smart Account.
  • Create an OAuth signing service that facilitates account recovery for users who may have lost their device key. You can explore Stackup's research on this topic by visiting this blog post: The Future of Ethereum Access: OAuth and Account Abstraction

How do I enable session keys with ERC-4337?

ERC-4337 empowers a Smart Account to establish its own approval logic. To enable session keys, it is recommended to use a contract implementation that natively supports session keys, such as Kernel.

Why did my user operation fail to execute even though I received a successful response from eth_sendUserOperation?

The eth_sendUserOperation method in ERC-4337 performs a validation process that ensures the User Operation meets certain conditions. However, passing the validation does not guarantee the execution of the User Operation. The validation process primarily checks factors like gas availability, nonce correctness, and other security measures. If a User Operation fails any of these validation checks, it will be filtered out and not executed, even if the initial response indicates success.

My user operation made it on-chain, but it didn't execute. What could have happened?

If your User Operation successfully reached the blockchain but did not execute as expected, it is possible that the issue lies beyond the initial verification process. Bundlers and the EntryPoint perform checks to ensure that user operations pass verification with the Smart Account, but they do not guarantee the successful completion of the included callData. In such cases, although the user operation is recorded on the chain, the remaining actions specified within the callData may encounter errors or conditions that prevent their execution.

Can I sponsor EOA (Externally Owned Account) transactions using a Paymaster?

No, ERC-4337 paymasters can only sponsor transactions for Smart Accounts. Externally Owned Accounts (EOAs) are not supported for sponsorship with paymasters.

Is it possible to make the signature for a user operation valid only within a specified time frame?

Yes, it is possible to specify a valid time range for the signature field of a User Operation. By signing over the time range, you can restrict the validity of the signature and mitigate replay attacks. Your Smart Account contract needs to include logic to verify the time range during its validation process.

Why would bundlers share User Operations with the public mempool instead of keep them for themselves?

The primary reason Bundlers would share User Operations with the public mempool is related to their incentives to provide a good quality of service to users:

  1. Maintaining Reputation and User Base: Bundlers that receive transactions directly from customers, like any other service providers, need to provide their end users with the best service to stay in business. If they consistently withhold transactions from the public mempool, users will notice delays in their transactions getting included on-chain. This would lead users to switch to other bundlers or RPC providers who offer better and faster service.
  2. Transaction Fee Revenue: Bundlers earn transaction fees from the operations they include in the blocks they propose. While bundlers could potentially maximize their own earnings by only including operations themselves, doing so would lead to decreased service and therefore order flow from users, leading to reduced usage and ultimately lower transaction fee revenue over the long term.
  3. MEV: Bundlers also earn money through Maximal Extractable Value, or MEV. If a bundle has low or no MEV opportunities, the best option is to submit the bundle to the public mempool. If a bundle has high MEV opportunities, the bundler will participate in mev-boost or other proposer-builder-separation (PBS) protocols to get the operation included quickly before the opportunity disappears. This comes with a higher fee, but guarantees they can extract the value. There are more opportunities to extract value without being grieved by participating in the public UserOperation mempool.

Can I use Stackup with a local test network using Hardhat or Foundry?

To use Stackup with a local test network, you need to run the Stackup bundler alongside a local Geth node. Detailed instructions for setting up your own Stackup bundler can be found in the Stackup Bundler repository.

I already have a node provider. Can I use Stackup's bundler with my own node?

Yes, it is possible to use Stackup's bundler with your own node. However, your node must have custom JS tracing enabled, which is typically not available by default on most node service providers. Therefore, you will likely need to run your own node with the required configuration.

Why are some of my user operations being rejected or taking a long time to be included?

The gas settings for your User Operation are likely too low. If you are using userop.js, we recommend using the gas price middleware or a gas price oracle. This can especially be a problem on public testnets when gas prices spike.

How can I resolve the "AA23 reverted or OOG" error?

OOG = "out of gas." If you encounter an "AA23 reverted OOG" error, it means the sender does not have sufficient native tokens to cover the User Operation's gas costs. If you intended to use a Paymaster for sponsorship, ensure that the paymasterAndData field of the user operation is correctly set to enable proper handling of gas fees.

Learn more about the AA23 error and other related EntryPoint errors.

How can I resolve the "AA21 max prefund" error?

The "AA21 max prefund" error indicates that the preVerificationGas value specified in your User Operation is set too high. Stackup imposes a limit on this value to protect against unintentionally sending user operations with excessively high fees. If you have large user operations that exceed this gas limit, please reach out to Stackup's support through Discord or email for further assistance.

Learn more about the AA21 error and other related EntryPoint errors.

Can I use a non-Stackup paymaster with Stackup's bundler?

Yes, Stackup's bundler is compatible with non-Stackup paymasters. As long as the user operation is valid and adheres to the required specifications, it can be processed by Stackup's bundler regardless of the paymaster used.

How do bundlers and Stackup protect against MEV (Miner Extractable Value)?

Bundlers can leverage services like Flashbots to protect against Miner Extractable Value (MEV). Some bundlers may even be block builders themselves. Regardless, even if a bundler faces front-running and the bundler's transaction is replaced, the User Operation will still be processed on-chain, ensuring the integrity of the intended action.

Can I implement custom logic for sponsoring transactions with paymasters?

Yes, it is possible to implement custom logic for sponsoring transactions with Paymasters. To do so, you need to create an API key with paymaster enabled. On the server side, implement your desired custom logic to determine whether a user operation should be sponsored. If the user operation meets the specified criteria, call Stackup's paymaster with your API key to sign the user operation. Ensure that the API key remains confidential and protected.

Can I sponsor only part of a user operation with Stackup's paymaster?

Directly sponsoring only part of a user operation with Stackup's paymaster is not possible. However, you can utilize Stackup's paymaster to sponsor the entire user operation while requiring that the user operation includes a transfer of funds to an account you own, effectively achieving partial sponsorship indirectly.

Can I add my own fee on top of Stackup's ERC-20 paymaster?

Yes. Please contact us to enable this on your account.

Can I add my ERC-20 token to Stackup's paymaster?

For adding your ERC-20 token to Stackup's paymaster, please reach out to Stackup via Discord or email.

Why use ERC-4337 smart accounts instead of ERC-2771 metatransactions?

ERC-2771 is a precursor to ERC-4337 that provided a standard for smart contracts to parse metatransactions on Ethereum.

Metatransactions are transactions that allow a relayer to pay for gas fees on behalf of a smart contract wallet. In order to do that, smart contracts needed a way to differentiate between the data from the relayer and the data from the sender. ERC-2771 is the standard for this.

ERC-4337 provides many more features for gas abstraction, and many ERC-2771 relayers are migrating to ERC-4337 bundlers. In fact, many of the authors of ERC-2771 and developers of relay services like Gas Station Network went on to propose ERC-4337.

Why choose Stackup over other alternatives like Alchemy?

At Stackup, we're more than just another node operator. Our unique offering lies in the foundation of our business - account abstraction. This isn't just a peripheral feature for us, but rather the essence of our services. We understand that smart accounts will constitute a crucial part of your blockchain products and hence, you require a partner who can provide top-tier, reliable support in this area.

Our journey began with a singular focus on ERC-4337 back in November 2021, when we commenced the development of a consumer-centric smart contract wallet. Throughout the course of this initiative, it became evident that the industry was in dire need of a dedicated ERC-4337 solution. And who better to fulfill this demand than us, the ones knee-deep in the trenches, experiencing first-hand the gap in the market?

We redirected our efforts towards filling this void, and since then, we've never looked back. We pride ourselves on having achieved a remarkable uptime of >99.9%, a testament to our unwavering commitment to quality and reliability.

You understand the importance of choosing a partner that aligns with your strategic objectives. With Stackup, you're not only gaining a service provider, but a partner with an intricate understanding of account abstraction, who can offer guidance and robust support tailored to your needs.

Trust us, as many leading blockchain enterprises have done, to provide the tools and expertise required to take your blockchain products to new heights. Stackup is a choice for assurance, innovation, and long-term partnership. Embrace the future of smart accounts with us, knowing that you're in capable hands.