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

SuperchainERC20: Support permit2 #11899

Closed
tynes opened this issue Sep 13, 2024 · 0 comments · Fixed by #12476
Closed

SuperchainERC20: Support permit2 #11899

tynes opened this issue Sep 13, 2024 · 0 comments · Fixed by #12476
Assignees

Comments

@tynes
Copy link
Contributor

tynes commented Sep 13, 2024

Given #11868 has been merged, we will also want to support native permit2 in the OptimismSuperchainERC20 token. The diff is very small

    function allowance(address _owner, address _spender) public view override returns (uint256) {
        if (_spender == PERMIT2) {
            return type(uint256).max;
        }
        return super.allowance(_owner, _spender);
    }

The rationale can be found in #11880 (comment)

  • Default support for ERC2612 permits is a pretty clear UX improvement, enabling single tx actions and gas abstraction without native token in wallet to pay for an initial approve
  • Permit2 has become the primary approval mechanism for all Uniswap interface interactions and is integrated by many other DeFi protocols. Directly integrating tokens with it saves an entire approval step for users, simplifying the user experience of interacting with these protocols. It also synergizes well with intents-based trading systems like UniswapX, where users could submit a trade with a single signature without ever requiring any native token to set up for the trade
  • Pol token follows this pattern

This should be implemented in both OptimismSuperchainERC20 as well as SuperchainWETH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
3 participants