feat: add SwapProxy contract for permit2-less swap flow#469
feat: add SwapProxy contract for permit2-less swap flow#469
Conversation
🤖 Claude Code Review
Clean, minimal proxy contract that enables a 2-tx (approve + swap) flow without Permit2 signatures. The design is sound:
One consideration worth noting:
Tests cover the main flows (exact in, exact out + sweep, reverts, no stuck tokens, gas comparison). Looks good to ship. 💡 Want a fresh review? Add a comment containing |
88337a3 to
1fb270b
Compare
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
Superseded by new review after PR update
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
4af15e6 to
486f4fb
Compare
Superseded by new review after PR update
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
External proxy contract that enables a 2-transaction swap flow (approve + swap) without requiring Permit2 signed messages. Addresses integrator feedback about the 3-tx first-time flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
486f4fb to
154cb4e
Compare
Superseded by new review after PR update
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
Superseded by new review after PR update
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
Superseded by new review after PR update
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only.
✨ Claude-Generated Content
Summary
Introduces a stateless
SwapProxycontract that enables a 2-transaction swap flow (approve + swap) without requiring Permit2 signed messages. This provides an alternative integration path for platforms that cannot or prefer not to support EIP-712 signed permits.Changes
SwapProxy.solcontract that pulls ERC20 tokens from users directly into the Universal Router, then executes UR commands withpayerIsUser=falseISwapProxy.solinterface with NatSpec documentationDeploySwapProxy.s.soldeployment scriptHow It Works
Integration Notes
payerIsUser=falseMSG_SENDER(which resolves to the proxy contract)SWEEPcommand to return unused input tokens