I hear that by imposing account abstraction specified in ERC-4337 EOA is not the only one that can instantiate a transaction.
What I'm confused about is the actual entity that pays the gas fee and the relationship with the paymaster
.
From Vitalik's article, it says that bundler is paying for the transaction.
The bundler pays the fee for the bundle transaction in ETH, and gets compensated though fees paid as part of all the individual UserOperation executions. Bundlers would choose which UserOperation objects to include based on similar fee-prioritization logic to how miners operate in the existing transaction mempool. A UserOperation looks like a transaction; it’s an ABI-encoded struct that includes fields such as:
In this case, is the bundler an EOA that originates the transaction? Also, if the bundler pays the fee for transaction for each UserOperation what will it get in return? (e.g. Paymaster pays the bundler the transaction fee it receives?)
To sum up,
- Is bundler an EOA that monitors the mempool of UserOperation which initiates the transaction?(If it's the case, then it's still the EOA that originates the tx right?)
- What is the incentive model of Bundler? and the relationship between paymaster and bundler? (Why should the bundler pay the gas fee for
Bundle transaction
that includesUserOperation
) - If Paymaster pays for the gas fee on behalf of a user, should it hold native ETH balance to pay it? Can a Paymaster pay the Entrypoint Contract with an ERC20 token?
Thank you for answering in advance :)