feat: Enable Across support for perps deposits#8334
Open
pedronfigueiredo wants to merge 2 commits intomainfrom
Open
feat: Enable Across support for perps deposits#8334pedronfigueiredo wants to merge 2 commits intomainfrom
pedronfigueiredo wants to merge 2 commits intomainfrom
Conversation
1261941 to
677ae2e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
packages/transaction-pay-controller/src/strategy/across/AcrossStrategy.ts
Show resolved
Hide resolved
vinistevam
reviewed
Mar 31, 2026
|
|
||
| - Add route-based `confirmations_pay` strategy resolution ([#8282](https://github.com/MetaMask/core/pull/8282)) | ||
|
|
||
| ### Fixed |
Contributor
There was a problem hiding this comment.
Wouldn't it be more suitable as an Added ?
vinistevam
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
Re-enable Across for perps deposits by allowing the specific quote-time perpsDeposit route and normalizing Arbitrum USDC targets to Across’s new HyperCore USDC-PERPS direct-deposit token. Keep the change limited so only the supported perps deposit flow bypasses Across’s same-chain rejection and same-token quote skipping.
At quote-build time, transaction pay still represents the required asset as Arbitrum USDC, so Across sees sourceChainId === targetChainId and “same token” even though the real destination we need to quote is HyperCore 1337 + 0x2100...0000. If we do not bypass those checks for this narrow case, the request is filtered out before we ever rewrite it into the actual Across direct-deposit route.
References
Checklist
Note
Medium Risk
Changes Across strategy request filtering and quote-shaping for
perpsDeposit, including token/chain rewriting and bypassing same-token/same-chain skips; mistakes could misroute deposits or produce incorrect quote amounts.Overview
Re-enables Across for a narrow
perpsDepositpath by allowing same-chain Arbitrum USDC requests when they match a supported perps-direct-deposit shape, instead of rejecting them as same-chain swaps.Adds a perps-specific normalization layer that rewrites quote requests to Across’s HyperCore direct-deposit route (chain/token + USDC 6→8 decimal amount conversion) and adjusts destination handling to produce no post-swap actions and use
fromas recipient. Also updates source-amount calculation to avoid skipping “same token” quotes for this perps+Across case, with expanded test coverage and changelog entry.Written by Cursor Bugbot for commit efc279b. This will update automatically on new commits. Configure here.