Uniswap / Uniswap/interface

Use Router instead of Permit2 for smart wallets like Safe

Open
#6,177 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
At the moment with Permit2, when using gnosis safe via wallet connect you are wasting $ on transactions. Smart wallets like Safe can't do off-chain signatures, so if you want to do a swap (USDC -> ETH), you need to:

  1. Approve max uint256 to Permit2
  2. signTypedMessage to do a swap, but since you are using a smart wallet that is a transaction
  3. Swap USDC -> ETH

Describe the solution you'd like
When swapping via gnosis safe UI(app) use Router directly instead of Permit2.
In that case, the flow is/was:

  1. Approve USDC to Router
  2. Swap USDC -> ETH

Describe alternatives you've considered
/

Additional context
signTypedMessage with gnosis safe
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the TypeScript swap flow and locating where Permit2 is selected for wallet-connected swaps. Verify how Safe or other smart wallets are identified, then confirm that Safe swaps use Router directly while the existing flow remains intact for wallets that support off-chain signatures.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.