Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FAQ: Why does it cost more on Ethereum L1? #108

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages/FAQ.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ and can view and manage assets at [wallet.coinbase.com](https://wallet.coinbase.
See [Getting Started](/sdk/getting-started#parameters) documentation for nuances based on different configurations.

## Do users have the same address across chains?
Yes, a user's Smart Wallet address will be the same across all the chains we support.
Yes, a user's Smart Wallet address will be the same across all supported chains.

## How much does it cost?
Smart Wallet is free to use for both developers and users.
Expand Down
73 changes: 73 additions & 0 deletions docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Why does it cost more on Ethereum L1?

Smart Wallet transactions on Ethereum L1 (mainnet) generally cost more than regular EOA wallet transactions due to several technical factors and overhead costs.

## Core Overhead Components

When compared to an EOA (Externally Owned Account), Smart Wallets have additional overhead with:

1. **ERC-4337 Bundling**
- Bundlers require at least 27% base fee padding
- Additional gas limits and preverification gas padding
- Complex bundling verification process

2. **Smart Contract Operations**
- Contract deployment costs for first-time users
- Multiple contract interactions per transaction
- Additional security validations

3. **Signature Verification**
- WebAuthn + p256 signature verification overhead
- More complex than standard ECDSA signatures used by EOAs

## First-Time Deployment Costs

The first transaction for any Smart Wallet account requires contract deployment, which can be particularly expensive on Ethereum L1. Current gas costs can easily exceed $100 for initial deployment.

## Gas Cost Breakdown

Here's a rough comparison of gas costs:

| Operation Type | EOA Wallet | Smart Wallet |
|---------------|------------|--------------|
| Native Token Transfer | ~21,000 gas | ~100,000 gas* |
| ERC-20 Token Transfer | ~65,000 gas | ~150,000 gas* |
| First Deployment | N/A | ~300,000+ gas* |

*Note: Actual gas costs may vary significantly due to bundler padding and network conditions.

## Recommended Solution: Use Layer 2

Due to these inherent costs, we strongly recommend using Layer 2 networks like:
- Base
- Optimism
- Arbitrum

Layer 2 solutions provide:
- Significantly lower transaction fees
- Same security guarantees
- Full Smart Wallet functionality
- Better user experience

## Alternative Cost-Reduction Strategies

If you must use L1, consider:
- Batching multiple transactions together
- Using gasless transactions with paymasters where available
- Implementing session keys for frequent operations

## Benefits vs Costs

While L1 transactions are expensive, Smart Wallets provide crucial benefits:
- Enhanced security features
- Account recovery options
- Transaction batching
- Gasless transactions (on supported networks)
- Programmable permissions
- Future extensibility

## Looking Forward

While there may be opportunities to optimize bundler padding and gas limits in the future, L1 transactions will likely remain costly due to the inherent complexity of Smart Wallet operations. For cost-effective deployment, we strongly recommend using Layer 2 networks.

Feel free to reach out to our team for more detailed discussions about gas optimization strategies or L2 deployment options!
10 changes: 10 additions & 0 deletions vocs.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,15 @@ export default defineConfig({
},
],
},
{
text: "FAQ",
collapsed: false,
items: [
{
text: "Why does it cost more on Ethereum L1?",
link: "/faq/why-does-it-cost-more-on-ethereum-l1",
},
],
},
],
});
Loading