Smart Accounts
A Smart Account is a smart contract that acts as a user’s wallet. Unlike a traditional Externally Owned Account (EOA) like MetaMask, which is controlled directly by a single private key, a Smart Account defines its logic in code.
0xGasless uses the industry-standard ERC-4337 to enable this.
Why use Smart Accounts?
Section titled “Why use Smart Accounts?”EOAs are notoriously difficult for mainstream users:
- Gas: You need ETH to do anything. Want to send USDC? You need ETH first.
- Batches: Approving a token and calling a contract takes two separate transactions and two separate signatures.
- Key Loss: If you lose your seed phrase, you lose your wallet.
Smart Accounts fix these problems by moving validation and execution on-chain:
- Gasless Transactions: A “Paymaster” can sponsor the gas for your users. They transact for free.
- Pay gas with ERC-20s: If you don’t sponsor them, users can pay gas in USDC instead of ETH.
- Batched Transactions: Approve and swap in a single click.
- Session Keys: Grant an app permission to trade on your behalf for 1 hour without asking for a signature every time.
- Account Recovery: Set up guardians to restore access if the primary key is lost.
How it works
Section titled “How it works”Instead of sending standard transactions directly to the network, the user signs a UserOperation — a data structure describing what they want to do.
- The user signs the
UserOperation. - The app sends it to a Bundler.
- The Bundler groups multiple UserOperations together and submits them to the global
EntryPointcontract. - The
EntryPointvalidates the signature via the user’s Smart Account. - If a Paymaster is involved, the
EntryPointcharges the Paymaster for gas. - The
EntryPointtells the Smart Account to execute the transaction.
The 0xGasless SDK
Section titled “The 0xGasless SDK”The @0xgasless/smart-account SDK handles all of this complexity. You don’t need to manually construct UserOperations, negotiate with Bundlers, or calculate Paymaster deposits.
If you are using the Embedded Wallet (0xgas-auth), it sets up the smart account for you automatically under the hood via OxGasClient.
Next Steps
Section titled “Next Steps”- Check out the Quickstart to see how easy it is to deploy your first smart account.
- Read about Bundlers and Paymasters.