
introduce
introduce
The proposal includes changes to avoid changes to the consensus layer protocol, rather than relying on higher layer infrastructure. It aims to achieve the following goals:
Account Abstraction: Allows users to use a smart contract wallet containing arbitrary verification logic instead of EOA as their primary account.
Decentralization: Allowing any binder to participate in a process that encompasses account abstraction of user activity. Users do not need to know the direct communication address of any participant in order to process any activity that occurs across the common memory pool.
No Consensus Changes: For faster adoption, this proposal avoids consensus changes.
Pay transaction fees: Pay transaction fees using ERC-20 tokens, enabling developers to pay fees for their users, and EIP-3074-like use cases for sponsored transactions.
Work
Work
The user sends a UserOperation object, which encapsulates the user's purpose as well as signatures and other data for verification. Miners or binders utilizing services such as Flashbots can combine UserOperation objects into a single bundled transaction, which can then be included in an Ethereum block. Binders pay the cost for the bundled transactions in ETH and are compensated by fees paid for each individual UserOperation execution. The binder will use cost priority logic to choose which UserOperation objects to include.
To simplify the logic of the wallet, most of the complex smart contract logic needed to maintain security is executed outside the wallet, in a global contract called an entry point. The validateUserOp and execute functions are expected to be gated with require(msg.sender == ENTRY POINT) so that only trusted entry points trigger the wallet to perform operations or pay fees. After verifying userop success using UserOperation with calldata, the entry point makes arbitrary calls to the wallet, this is done to protect the wallet from attacks.
If validation of the UserOperation is successfully mocked, the UserOperation is guaranteed to be containable until the sender's account's internal state changes.
Initiate a transaction
We can allow application developers to pay fees on behalf of users, and allow users to pay fees with ERC20 tokens, receive ERC20 tokens through the contract as an intermediary and use ETH to pay.
This proposal can support the above use cases through the payment supervisor mechanism.
For use case 1: Paymaster verifies that the initiator's signature is contained in paymasterData, indicating that the initiator is ready to pay for the UserOperation. If the signature is valid, Paymaster accepts and the UserOperation fee is deducted from the initiator's share.
Advantage
Advantage
Verification logic flexibility: The validateUserOp function adds arbitrary signature and random number verification logic.
Execution Logic Flexibility: Wallets will be able to add custom logic to the execution steps.
shortcoming
shortcoming
Increased DoS vulnerability: verification logic is more complex than single ECDSA verification.
One transaction at a time: Accounts cannot queue and send multiple transactions to the Mempool.
This article comes from the decentralized financial community and is reproduced with authorization.
Source:https://medium.datadriveninvestor.com/account-abstraction-eip-4337-40a94d5b6d2c
This article comes from the decentralized financial community and is reproduced with authorization.