Gas Benchmarks
Raw Savings Per Function
| Function | Gas Saved WNATIVE vs WETH9 |
|---|---|
| balanceOf | 88 |
| native transfer (deposit) | 48 |
| deposit | 108 |
| withdraw | 395 |
| approve | 213 |
| transfer | 627 |
| transferFrom (Self Transfer) | 481 |
| transferFrom (Operator Allowance) | 1080 |
| transferFrom (Operator Unlimited) | 508 |
Aggregate L1 Savings ($2189.25 Avg USD/ETH)
| Operation | Savings Per Operation | ETH Mainnet Operations (2022/09/15 - 2024/10/28) | Gas Units Saved | Avg Post-Merge Gas Price | ETH Saved |
|---|---|---|---|---|---|
| balanceOf | 88 | 327,453,459 | 29B | 21.6 gwei | 626E |
| transfer | 627 | 179,154,025 | 112B | 21.6 gwei | 2419E |
| withdraw | 395 | 61,370,490 | 24B | 21.6 gwei | 518E |
| transferFrom | 794 | 24,489,452 | 19.5B | 21.6 gwei | 421E |
| approve | 213 | 6,936,611 | 1.5B | 21.6 gwei | 32E |
| deposit | 108 | 125,633 | 13.5M | 21.6 gwei | 0E |
| total | 186B | 21.6 gwei | 4016E ($8.8M) |
Fun Fact: The eight zero-bytes mined in the official Wrapped Native address would save an additional 96 gas in calldata. Accounting for additional calldata gas savings, it is estimated that and additional $1.2M would have been saved!
Note: Benchmarks focused only on interfaces that are shared between WETH9 and WNATIVE, and do not include measurements for features that did not exist in WETH9. Benchmarks were prepared and executed so that the identical conditions were recreated on both contracts in order to achieve and accurate comparison between contracts.
