Repo: https://github.com/ERC4626-Alliance/WETHPlus
Is ERC-20, ERC-2612, ERC-4626, ERC-7535: Native ETH ERC-4626, ERC-7550: Transient ERC-20 Approvals, and backward compatible with weth9
It will also have a convenience method withdrawAll(address receiver, address owner)
and a payable receive function which wraps deposit()
.
The WETH upgrade router allows for conversion from native ETH or WETH9 to WETH+ along with the following patterns:
implementation in huff or assembly: gas savings on this level are not worth the tradeoffs of code legibility and security
flash loanable: maybe, but probably unnecessary as higher layer protocols can add flash loans
EIP-3009: Stagnant and functionally replaced by Permit2
Built in max approval of permit2: Antipattern to auto max approve a specific contract, transient approve makes this relatively unnecessary. The WETH Upgrade Router will also allow for an atomic depositAndApprove of Permit2
built-in migration from weth9: antipattern due to differences across multiple chains. Will be added at router layer as well
There is no fallback function and calls to the fallback function will revert to protect against phantom method vulnerabilities.