Key difference from EOA wallets: Smart wallets cannot sign EIP-712 permit
messages, so they must use the approval flow. However, they can batch the
approval and deposit into a single user confirmation.
Wallet Type Comparison
| Aspect | EOA (Privy) | Privy Smart Wallet | Alchemy Smart Account |
|---|---|---|---|
| Send Method | sendTransaction() | sendTransaction({ calls }) | sendTransactions({ requests }) |
| Batching | No | Yes | Yes |
| Permit Support | Yes | No | No |
| Gas Payment | User | Sponsored | Sponsored |
| Return Value | txHash | txHash | userOpHash |
| Receipt Polling | useWaitForTransactionReceipt | useWaitForTransactionReceipt | waitForUserOperationReceipt |
| USDT Deposit | 2 transactions | 1 batched tx | 1 UserOperation |
| USDC Deposit | 1 tx (permit) | 1 batched tx | 1 UserOperation |
Privy Smart Wallet
Uses Privy’s embedded smart contract wallet with gas sponsorship and transaction batching.Imports
usePrivySmartWalletDeposit Hook
Key Characteristics
- Uses
smartWalletClient.sendTransaction({ calls })for batching multiple contract calls sponsor: trueenables gas sponsorship (users don’t pay gas)- Cannot use permit signatures (smart contracts can’t sign EIP-712)
- Batches approve + deposit into a single user confirmation
- Returns a standard transaction hash
Alchemy Smart Account (ERC-4337)
Uses ERC-4337 Account Abstraction via Alchemy’s SDK with Dynamic as the auth provider.Imports
useAlchemyDeposit Hook
Key Characteristics
- Uses
alchemyClient.sendTransactions({ requests })for batching - Returns
userOpHash(not a standard transaction hash) - Must use
waitForUserOperationReceipt()instead of wagmi’s receipt hook - Bundler submits the UserOperation to the network
- Gas can be sponsored via paymaster configuration
USDT Special Handling
USDT requires special handling because itsapprove() function requires resetting to 0 before setting a new value if there’s an existing non-zero allowance:
When batching is not possible (e.g., non-smart-wallet USDT deposits with
existing partial allowance), these three steps must be sent sequentially.
Token-Specific Behavior
| Token | Supports Permit | Best Flow |
|---|---|---|
| USDC | Yes | Permit (EOA) or Batched (Smart) |
| USDG | Yes | Permit (EOA) or Batched (Smart) |
| pyUSD | Yes | Permit (EOA) or Batched (Smart) |
| USD0 | Yes | Permit (EOA) or Batched (Smart) |
| USDT | No | Batched approval + deposit |
Troubleshooting
| Issue | Solution |
|---|---|
| ”Smart wallet not connected” | Ensure user has a smart wallet configured in Privy/Dynamic |
| UserOperation fails | Check gas estimation, paymaster may need funding |
waitForUserOperationReceipt times out | Bundler may be congested, increase timeout |
| Batched tx reverts | Check individual call data, one call may be failing |