AA Wallet

Basic Concepts of Wallet


Generally, wallets can be roughly divided into 2 categories:

  • Externally Owned Accounts(EOAs), such as MetaMask

  • Contract Accounts (CAs), such as Safe

The main difference between EOAs and contract wallets lies in their control mechanisms. EOAs are controlled by individual users through private keys, whereas contract wallets are controlled by smart contracts. While EOAs are simpler and used for managing individual cryptocurrency holdings, contract wallets can have more complex rules and be used for specific purposes.

Pain Points

EOA wallet users need to be careful to protect their private keys. Any mistakes or negligence regarding the private key can lead to the loss of funds, making the use of EOA wallets relatively high-cost and high-risk. Additionally, complicated operations, the inability to bypass gas fees or perform gas fee delegation, and limited wallet functionality are all issues that trouble users.

Smart contract wallets provide solutions to some of these problems, but currently, all operations are required to be packaged in transactions from an EOA protected by ECDSA. This results in additional transaction fees and the consumption of an extra 21,000 gas, along with potential centralization risks and complex operations.

These pain points have led to the emergence of the new AA standard — ERC-4337.

What is AA Wallet?

AA Wallets (Account Abstraction) based on ERC-4337, combines the advantages of existing CA and EOA, making the account itself "programmable.” While ensuring that assets are held only by smart contracts, it allows for more customization and extended functionalities, such as

  • Gas Abstraction: Gas abstraction includes transactions without gas fees and the ability to pay gas fees using any ERC20 token. This logic can be executed in a Paymaster contract or through relayers. For AA, many smart contract wallets themselves can implement Paymaster contracts compatible with EIP-4337 and stake tokens on the entry point contract to help users pay gas fees.

  • Social Recovery: In case of lost or compromised private keys, users can authorize new keys as legitimate wallet owners. The logic for social login and social recovery is typically defined in the wallet's main contract. Various methods can be used, such as email, multi-signature, MPC, etc..

  • Transaction Batching: Transaction batching is a unique feature of CAs, allowing wallet users to execute multiple transactions in a single on-chain transaction.

  • Cross-chain Bridging and Bridge Integration: Currently, many wallets collaborate with third-party providers to integrate fiat payment and cross-chain bridging into the wallet. These fiat ramps and cross-chain bridges can further integrate with payment contracts (Paymasters) in gas abstraction.

  • Modular Design: One of the advantages of AA may be its modular services, where Bundlers, Paymasters, and other components can be flexibly combined.

Particle Network: AA Wallet on Merlin Chain

Merlin Chain is an EVM-compatible BTC Layer2 network, and the assets of most BTC ecosystem users are typically stored in BTC wallets such as UniSat, XVerse, OKX, etc. Therefore, if there is a need to connect to these wallets, it requires corresponding wallet adaptation and abstraction. Merlin Chain collaborated with Particle Network, using its AA wallets to simplify operations during bridging in and out.

How does Particle Operate?

  1. When users initiate transactions with a BTC wallet address, the BTC wallet must first use the SDK provided by the Particle Network to generate the EVM CM corresponding to the Layer1 address, and the AA address initiates a transaction in the EVM environment, requesting a response from the Merlin Chain interface.

  2. When users first use Merlin Chain for bridging operations, they need to pre-deposit a portion of their Bitcoin Layer1 assets into the Particle AA wallet address, thereby using its Paymaster function and executing subsequent transaction delegations, gas deductions, and other operations.

  3. After the AA address is generated, the Particle Network will work in coordination with Merlin Chain, i.e., when Merlin Chain receives a new transaction request, the AA will call the contract to verify the signature and complete the transaction.

User Guide

Using the Particle AA Wallet on Merlin Chain:

  1. Navigate to Merlin Chain Bridge

  1. Connect Your Wallet

Last updated