-
Notifications
You must be signed in to change notification settings - Fork 1
feat: univ4Hook + Approve Across Hook + Native Transfer Hook #819
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
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: 0xTimepunk <[email protected]>
How to use the Graphite Merge QueueAdd the label contracts to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Graphite Automations"Request reviewers once CI passes" took an action on this PR • (09/17/25)1 reviewer was added to this PR based on 's automation. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
🛡️ Immunefi PR ReviewsYour project is enrolled in automatic code reviews. We've received your submission and are currently assigning a reviewer from our team. You'll hear back shortly once a reviewer is on it. Appreciate your patience — we'll keep you posted right here. |
Summary by OctaneNew Contracts
Updated Contracts
🔗 Commit Hash: 20bc881 |
Overview
Detailed findings
|
ApproveAndAcrossSendFundsAndExecuteOnDstHook
SwapUniswapV4Hook
Key Technical Achievements:
Dynamic minAmount recalculation with ratio protection
On-chain quote generation eliminating API dependencies
Real V4 math integration using SwapMath.computeSwapStep
Hook chaining for complex multi-protocol workflows
uses pre and post execute steps to perform state changes (including external calls) and transfers tokens temporarily to the hook itself (unique among all Superform hooks, requires careful audit).
Support native token swaps via an additional NativeTransferHook
Test with destination swaps with Across
Todos
NOTE: anyone can transfer tokens to any hook. This hook by design only uses the amounts sent/specified by the user in the call data. Any other values already present will be ignored, effectively locked forever in the contract
NativeTransferHook
Warning: not deployed, currently just for tests. Will be deployed if architecture of SwapUniswapV4Hook is correct for natives
Note: this hook is required by UniswapV4Hook for natives case to work