We do a little learning
We do a little learning

Subscribe to 0xhubman.eth

Subscribe to 0xhubman.eth
Share Dialog
Share Dialog

Stablecoins
For this post, we'll be diving into one of the crypto industry's most popular use cases - stablecoins. As of November 2023, USDT and USDC, the two biggest stablecoins by market cap, have a combined market cap of ~$110 billion within the crypto industry's entire $1.48 trillion market cap. However, this rise in popularity of stablecoins has not come without its controversies. If you've spent any amount of time following or participating in the crypto industry, you've no doubt seen the barrage o...

Nostr
Tired of the Twitter/X drama? Don't know what the heck Mastodon is or how to use it? Do you like ostriches? Well then there is a protocol for you! In this post, we'll actually be veering off the blockchain-specific beaten path and delving into an exciting protocol that can best be described as crypto-adjacent - the Nostr protocol! Nostr (short for Notes and Other Stuff Transmitted by Relays) is an exciting protocol that aims to be a fully fleshed out decentralized social network and so much m...

Account Abstraction - Part 1
After much anticipation, the Account Abstraction (AA) primer post is here! AA is a hot topic within the Ethereum developer community and has been touted as one of the improvements that will help onboard the next wave of users to the Ethereum ecosystem. AA, as proposed by ERC-4337, can be defined as allowing users to use smart contract wallets (SCAs) containing arbitrary verification logic (i.e., programmable instructions) as their primary wallet instead of utilizing EOAs with a private key. S...

Stablecoins
For this post, we'll be diving into one of the crypto industry's most popular use cases - stablecoins. As of November 2023, USDT and USDC, the two biggest stablecoins by market cap, have a combined market cap of ~$110 billion within the crypto industry's entire $1.48 trillion market cap. However, this rise in popularity of stablecoins has not come without its controversies. If you've spent any amount of time following or participating in the crypto industry, you've no doubt seen the barrage o...

Nostr
Tired of the Twitter/X drama? Don't know what the heck Mastodon is or how to use it? Do you like ostriches? Well then there is a protocol for you! In this post, we'll actually be veering off the blockchain-specific beaten path and delving into an exciting protocol that can best be described as crypto-adjacent - the Nostr protocol! Nostr (short for Notes and Other Stuff Transmitted by Relays) is an exciting protocol that aims to be a fully fleshed out decentralized social network and so much m...

Account Abstraction - Part 1
After much anticipation, the Account Abstraction (AA) primer post is here! AA is a hot topic within the Ethereum developer community and has been touted as one of the improvements that will help onboard the next wave of users to the Ethereum ecosystem. AA, as proposed by ERC-4337, can be defined as allowing users to use smart contract wallets (SCAs) containing arbitrary verification logic (i.e., programmable instructions) as their primary wallet instead of utilizing EOAs with a private key. S...


<100 subscribers
<100 subscribers
Welcome back to part 2 of the Account Abstraction (AA)! Last post we covered the concept of AA, the benefits of AA, and the infrastructure needed to utilize SCAs in the manner proposed by ERC-4337. This week we'll take a look under the hood and discuss how ERC-4337's components actually interact with each other to make AA a reality.
You'll remember that every transaction that occurs on Ethereum currently requires an EOA to initiate the transaction (by signing the transaction with a private key). ERC-4337 aims to allow users to instead use a SCA (instead of an EOA) as their primary wallet, but SCAs can't initiate transactions on their own. That's where all the components of ERC-4337's infrastructure come in to allow this paradigm shift. You'll also remember from part 1 that there are 5 main components of ERC-4337's AA implementation:
User Operations (UserOps)
Bundlers
Entry Point
Paymaster
Aggregator
With all that in mind, let's dive into ERC-4337 step by step to understand the process that allows users with only a SCA to interact with the broader Ethereum ecosystem.
End-user with a SCA wants to perform a specific action. For example, swap ETH for USDC, mint an NFT, or stake ERC-20 tokens. This specific action is called a UserOp and can be considered a meta-transaction since it does not have the typically characteristics of a transaction coming from an EOA and does not live on-chain.
Bundlers are EOAs, typically from a third-party, and monitor UserOp-specific mempools. Mempools are like the waiting room to see the doctor, only in this case the UserOps are waiting to get picked up by the Bundler, not see the doctor. Once a Bundler's specific mempool (or other P2P mempool) has sufficient UserOps waiting in it, Bundlers will combine the multiple UserOps into a single standard transaction (which we'll dub 'Bundler transactions') and execute the Bundler transaction on-chain. Bundlers are a critical component of ERC-4337 since they are the EOAs that actually effectuate the UserOps on-chain.
Now I know what you're thinking, who pays the transaction fee for these Bundler transactions? Astute observation! The Bundlers hold ETH and pay from their ETH balance to initially cover the gas for executing these transactions. More details regarding who pays for what are covered below.
The Bundler executes these transactions by forwarding them to the Entry Point. The Entry Point is a smart contract that's sole purpose is to receive transactions from Bundlers and then call the end-user's SCA to actually perform the specific action from step 1 (the end goal). When the Entry Point receives the Bundler transactions, validation is performed to ensure the Bundlers are paid back for the gas they spent executing the Bundler transactions from step 2.
Congrats on making it this far! These three steps are the basic description of the mechanics behind ERC-4337. The steps below provide more flexibility and help optimize the end-user's experience, but are not mandatory for SCA's to ultimately perform the end-user's specific action.
As discussed in step 2, Bundlers are the critical piece of infrastructure that effectuate UserOps on-chain and initially pay the transaction fee for doing so. When Bundlers forward the Bundler transactions to the Entry Point, the Entry Point ensures that the Bundler is reimbursed for this transaction fee (since no one is doing this out of the kindness of their heart). When validating the Bundler's reimbursement, the reimbursement can either come from funds held in the end-user's SCA or from the Paymaster. The Paymaster is a smart contract that handles the implementation of gas payment policies for applicable UserOps. The Paymaster could choose to cover the gas for certain eligible users or allow transaction fees to be paid in non-native gas tokens (i.e., USDC, SHIB).
Lastly, the Aggregator is a component that helps greatly optimize the transaction fees for ERC-4337 transactions. In the above steps, it has been assumed that each UserOp that is picked up by a Bundler has its signature verified individually. This can become quite costly in terms of gas, especially when SCA transaction signatures can be verified by arbitrary, programmable logic instead of just private keys. To account for these various signature schemes, smart contracts called Aggregators are created to handle specific schemes. Through complex cryptography, aggregators can combine multiple signatures from a common scheme into an aggregated signature to help reduce transactions fees by verifying multiple UserOps with a single signature.
And there you have it - you have successfully completed your introductory crash course on ERC-4337! For anyone looking to further enlighten themselves on the topic of ERC-4337, below are a few helpful resources.
Entry Point smart contract (Etherscan)
You can see all the ERC-4337-related network activity going through the Entry Point here
Until next time!
Welcome back to part 2 of the Account Abstraction (AA)! Last post we covered the concept of AA, the benefits of AA, and the infrastructure needed to utilize SCAs in the manner proposed by ERC-4337. This week we'll take a look under the hood and discuss how ERC-4337's components actually interact with each other to make AA a reality.
You'll remember that every transaction that occurs on Ethereum currently requires an EOA to initiate the transaction (by signing the transaction with a private key). ERC-4337 aims to allow users to instead use a SCA (instead of an EOA) as their primary wallet, but SCAs can't initiate transactions on their own. That's where all the components of ERC-4337's infrastructure come in to allow this paradigm shift. You'll also remember from part 1 that there are 5 main components of ERC-4337's AA implementation:
User Operations (UserOps)
Bundlers
Entry Point
Paymaster
Aggregator
With all that in mind, let's dive into ERC-4337 step by step to understand the process that allows users with only a SCA to interact with the broader Ethereum ecosystem.
End-user with a SCA wants to perform a specific action. For example, swap ETH for USDC, mint an NFT, or stake ERC-20 tokens. This specific action is called a UserOp and can be considered a meta-transaction since it does not have the typically characteristics of a transaction coming from an EOA and does not live on-chain.
Bundlers are EOAs, typically from a third-party, and monitor UserOp-specific mempools. Mempools are like the waiting room to see the doctor, only in this case the UserOps are waiting to get picked up by the Bundler, not see the doctor. Once a Bundler's specific mempool (or other P2P mempool) has sufficient UserOps waiting in it, Bundlers will combine the multiple UserOps into a single standard transaction (which we'll dub 'Bundler transactions') and execute the Bundler transaction on-chain. Bundlers are a critical component of ERC-4337 since they are the EOAs that actually effectuate the UserOps on-chain.
Now I know what you're thinking, who pays the transaction fee for these Bundler transactions? Astute observation! The Bundlers hold ETH and pay from their ETH balance to initially cover the gas for executing these transactions. More details regarding who pays for what are covered below.
The Bundler executes these transactions by forwarding them to the Entry Point. The Entry Point is a smart contract that's sole purpose is to receive transactions from Bundlers and then call the end-user's SCA to actually perform the specific action from step 1 (the end goal). When the Entry Point receives the Bundler transactions, validation is performed to ensure the Bundlers are paid back for the gas they spent executing the Bundler transactions from step 2.
Congrats on making it this far! These three steps are the basic description of the mechanics behind ERC-4337. The steps below provide more flexibility and help optimize the end-user's experience, but are not mandatory for SCA's to ultimately perform the end-user's specific action.
As discussed in step 2, Bundlers are the critical piece of infrastructure that effectuate UserOps on-chain and initially pay the transaction fee for doing so. When Bundlers forward the Bundler transactions to the Entry Point, the Entry Point ensures that the Bundler is reimbursed for this transaction fee (since no one is doing this out of the kindness of their heart). When validating the Bundler's reimbursement, the reimbursement can either come from funds held in the end-user's SCA or from the Paymaster. The Paymaster is a smart contract that handles the implementation of gas payment policies for applicable UserOps. The Paymaster could choose to cover the gas for certain eligible users or allow transaction fees to be paid in non-native gas tokens (i.e., USDC, SHIB).
Lastly, the Aggregator is a component that helps greatly optimize the transaction fees for ERC-4337 transactions. In the above steps, it has been assumed that each UserOp that is picked up by a Bundler has its signature verified individually. This can become quite costly in terms of gas, especially when SCA transaction signatures can be verified by arbitrary, programmable logic instead of just private keys. To account for these various signature schemes, smart contracts called Aggregators are created to handle specific schemes. Through complex cryptography, aggregators can combine multiple signatures from a common scheme into an aggregated signature to help reduce transactions fees by verifying multiple UserOps with a single signature.
And there you have it - you have successfully completed your introductory crash course on ERC-4337! For anyone looking to further enlighten themselves on the topic of ERC-4337, below are a few helpful resources.
Entry Point smart contract (Etherscan)
You can see all the ERC-4337-related network activity going through the Entry Point here
Until next time!
No activity yet