John Rising Profile picture
Mar 28, 2023 12 tweets 4 min read Read on X
Gas fees suck.

Here's how Paymasters get rid of them, step by step:
Paymasters are smart contracts that can handle gas fees for users, so users don't need ETH in their accounts.

This lets users pay for gas however they like. Projects can also pay fees directly for users of their app!
Paymasters are part of ERC-4337. All user operations, the ERC-4337 transaction object, can specify a Paymaster, and anyone can create a paymaster.

There are four major steps:
Step 1

The paymaster deposits ETH (or the blockchain's native token) into the Entry Point.

The Entry Point is the contract that handles the validation and execution of ERC-4337 transactions.
Step 2

When the Entry Point receives a user operation with a nonzero paymasterAndData field, it calls verifyUserOp on the corresponding Paymaster contract.
Step 3

The paymaster contract returns approval, and the Entry Point uses the paymaster's deposit to cover the gas fee.

The paymaster doesn't just return approval - it returns validation data and context.
Step 4

If the paymaster returned information in the context object, a postOp function is run after execution.
There are two broad categories of paymasters: those that have their logic on-chain or those that have their logic off-chain.
When the logic is off-chain it is called a Verifying Paymaster.

Some off-chain service decides whether to sponsor the transaction and returns a signature. If the signature is valid, the paymaster will pay.
On-chain paymasters are usually Deposit Paymasters.

It uses an oracle to charge the user ERC-20 tokens for gas and pulls tokens from the account.

The user must make an initial token deposit (which requires gas), and can only be sent to bundler mempools whitelisting it.
These are broad classifications. In theory, you could have a hybrid, where the initial deposit into a deposit paymaster is made with a verifying paymaster.
I'm the cofounder of @stackup_fi - follow me for more information about account abstraction and ERC-4337!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with John Rising

John Rising Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @johnrising_

Nov 13, 2023
Some sobering ERC-4337 data 👇
Retention is terrible.

The one exception to this is CyberConnect, who had a lot of users return to claim an airdrop.

Data: @0xBundleBear Image
90% of all paymaster activity so far ($572k) has gone to only three providers: Image
Read 7 tweets
Mar 7, 2023
A few weeks ago @yoavw proposed a new API to help layer 2 blockchains attract ERC-4337 bundlers.

Here's how it works 👇
First the official link:
notes.ethereum.org/@yoav/SkaX2lS9j

Bundlers need some assurance that the network state will not change on a layer 2 blockchain between the time a bundler does its checks and the transaction is included.

This would lose bundlers money.
To fix this, Yoav proposes a new RPC request.

The request is eth_sendRawTransactionConditional, which acts just like eth_sendRawTransaction but includes some lightweight checks for the sequencer so the bundler doesn't submit an invalid bundle.
Read 6 tweets
Mar 3, 2023
Wow, lots of excitement and questions about ERC-4337!

I'm going to address a few of the common questions and concerns people have about it:
"Account abstraction has existed before! What's new about this?"

This is true! Smart accounts have existed before, notably Safe and Argent.

Three things make it stand out.
Standout 1:

Unlike other implementations of account abstraction including Argent, Safe, Biconomy, Gelato network, and so on, it provides a decentralized relay system so it's censorship resistant.
Read 16 tweets
Mar 2, 2023
EIP-4337 is LIVE on Ethereum

Here's what it means and why it's a big deal 👇
EIP-4337 is an Ethereum proposal that enables accounts to be abstracted from the blockchain.

This enables:
- Any authentication logic (not just private keys!!!)
- Gasless transactions
- Bundled transactions
- Recoverable wallets

And a ton more.
Today @yoavw of the Ethereum Foundation announced EIP-4337 passed its security audit.

cointelegraph.com/news/ethereum-…
Read 11 tweets
Feb 27, 2023
We're excited to announce that Stackup is now providing nodes as a service!

Here's how you try it out 👇 Image
Just go to app.stackup.sh and create an account. All instances can now be sent either ERC-4337 or regular node requests.

stackup.sh/blog/announcem…
This is a great option if you are developing a dapp using ERC-4337.

On the developer plan, you can also sponsor transactions using the same API key 👀
Read 6 tweets
Feb 25, 2023
Account abstraction is extremely powerful.

Here are a few of the things you can do to make the most of it:
1. Bundle transactions

You don't need to request a signature for every little step - all you need is one for the whole batch.

You don't pay separately for every item at the grocery store, why would crypto users?
2. Sponsor transactions

No ether? No problem. Pay gas fees for your users or let them pay in stablecoins. Any custom fee structure is possible.
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(