From f89356e31c58faa3483d5c971ca5c0a04d407642 Mon Sep 17 00:00:00 2001 From: Eric Shenghsiung Liu Date: Sun, 15 Dec 2024 11:20:54 -0800 Subject: [PATCH 1/4] minor test --- docs/pages/FAQ.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/FAQ.mdx b/docs/pages/FAQ.mdx index c259beb..5f5966f 100644 --- a/docs/pages/FAQ.mdx +++ b/docs/pages/FAQ.mdx @@ -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. From 3fcb849a42e3b8bcd48abe778f4b4aca97d4e4c8 Mon Sep 17 00:00:00 2001 From: Eric Shenghsiung Liu Date: Sun, 15 Dec 2024 19:06:43 -0800 Subject: [PATCH 2/4] add l1 costs --- .../why-does-it-cost-more-on-ethereum-l1.mdx | 73 +++++++++++++++++++ vocs.config.tsx | 10 +++ 2 files changed, 83 insertions(+) create mode 100644 docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx diff --git a/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx b/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx new file mode 100644 index 0000000..2dda968 --- /dev/null +++ b/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx @@ -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 | +|---------------|------------|--------------| +| Simple Transfer | ~21,000 gas | ~100,000 gas* | +| 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! \ No newline at end of file diff --git a/vocs.config.tsx b/vocs.config.tsx index 8b5e660..f5514f7 100644 --- a/vocs.config.tsx +++ b/vocs.config.tsx @@ -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", + }, + ], + }, ], }); From b46a7f5ed21faae140bf8eea80f9ca3ac3dee908 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 16 Dec 2024 06:30:08 -0800 Subject: [PATCH 3/4] Update token transfer copy Co-authored-by: Conner Swenberg --- docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx b/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx index 2dda968..59c473b 100644 --- a/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx +++ b/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx @@ -30,8 +30,8 @@ Here's a rough comparison of gas costs: | Operation Type | EOA Wallet | Smart Wallet | |---------------|------------|--------------| -| Simple Transfer | ~21,000 gas | ~100,000 gas* | -| Token Transfer | ~65,000 gas | ~150,000 gas* | +| 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. From 0a20907a714fce7253c6ebdb085db9a7215ded18 Mon Sep 17 00:00:00 2001 From: Eric Shenghsiung Liu Date: Mon, 16 Dec 2024 06:35:15 -0800 Subject: [PATCH 4/4] RIP-7212 --- docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx b/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx index 59c473b..696e2e9 100644 --- a/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx +++ b/docs/pages/faq/why-does-it-cost-more-on-ethereum-l1.mdx @@ -49,6 +49,11 @@ Layer 2 solutions provide: - Full Smart Wallet functionality - Better user experience +An advantage of L2s is the support of [RIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md): +- Precompiling makes P256 verification cheaper compared to L1 +- Implemented by L2s like Base and Optimism +- Not available on Ethereum L1 + ## Alternative Cost-Reduction Strategies If you must use L1, consider: