Description
Recipe showing how to wrap ETH into WETH and unwrap it back — the gateway operation for almost every DeFi interaction.
Why this matters
Native ETH doesn't conform to the ERC-20 standard, but DeFi protocols need ERC-20 tokens. WETH (Wrapped ETH) solves this. Before you can deposit into Aave, swap on Uniswap, or provide liquidity — you often need WETH. It's the first step in any DeFi workflow.
Scope
- Deposit ETH → get WETH (wrap)
- Withdraw WETH → get ETH back (unwrap)
- Check WETH balance
- WETH contract addresses per chain
- When you need WETH vs when protocols auto-wrap for you
- Gas cost comparison: wrap vs direct ETH operations
w3-kit approach
- Simple, clean viem pattern
- Explain WHY WETH exists (ERC-20 compatibility)
- Multi-chain WETH addresses from w3-kit registry
- Integration with other DeFi recipes
Acceptance criteria
Description
Recipe showing how to wrap ETH into WETH and unwrap it back — the gateway operation for almost every DeFi interaction.
Why this matters
Native ETH doesn't conform to the ERC-20 standard, but DeFi protocols need ERC-20 tokens. WETH (Wrapped ETH) solves this. Before you can deposit into Aave, swap on Uniswap, or provide liquidity — you often need WETH. It's the first step in any DeFi workflow.
Scope
w3-kit approach
Acceptance criteria
recipes/evm/.learn.mdexplaining the WETH contract (deposit/withdraw pattern, why ETH isn't ERC-20)