Skip to content

feat: Add Across Perps withdraw support#8841

Open
pedronfigueiredo wants to merge 1 commit into
mainfrom
pnf/perps-withdraw-across
Open

feat: Add Across Perps withdraw support#8841
pedronfigueiredo wants to merge 1 commit into
mainfrom
pnf/perps-withdraw-across

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

@pedronfigueiredo pedronfigueiredo commented May 18, 2026

Summary

Adds Across support for HyperLiquid-source Perps withdraw post-quote flows in transaction-pay-controller.

Changes

  • Adds perpsAcrossWithdraw to TransactionType for Across Perps withdraw bridge legs.
  • Detects direct and nested perpsWithdraw transactions.
  • Allows supported HyperLiquid-source Perps withdraw post-quote requests through the Across strategy.
  • Normalizes HyperLiquid-source Across requests to HyperCore USDC-PERPS and shifts USDC amounts from 6 to 8 decimals.
  • Uses Arbitrum USDC as the fiat-rate anchor for HyperCore USDC-PERPS source quotes.
  • Skips prepending the original EVM transaction for HyperLiquid-source post-quote Across withdraw submissions.

Note

Medium Risk
Adds new transaction typing and conditional quote/submit logic for HyperLiquid-source Perps withdrawals, affecting how Across requests are normalized, validated, and submitted. Risk is moderate due to changes in transaction classification and gas/fiat calculations, but the behavior is gated to a specific request shape.

Overview
Adds Across support for post-quote HyperLiquid-source Perps withdrawal flows.

Introduces a new TransactionType.perpsAcrossWithdraw bridge-leg type and a new isPerpsWithdrawTransaction helper (including nested-transaction detection) so the Across submit path can label generated transactions correctly.

Updates the Across strategy/quotes/submit pipeline to accept supported HyperLiquid-source withdraw requests even when source/target are same-chain, normalize them to HyperCore USDC-PERPS with 6→8 decimal shifting, anchor fiat-rate lookup to Arbitrum USDC, and avoid prepending the original parent tx / post-quote gas when submitting these withdraws (covered by new tests and changelog entries).

Reviewed by Cursor Bugbot for commit ddcc878. Bugbot is set up for automated code reviews on this repo. Configure here.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/perps-withdraw-across branch 2 times, most recently from aa718cf to dc6ef3f Compare May 18, 2026 13:09
@pedronfigueiredo pedronfigueiredo changed the title [codex] Add Across Perps withdraw support feat: Add Across Perps withdraw support May 18, 2026
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/perps-withdraw-across branch from dc6ef3f to a30e120 Compare May 19, 2026 10:32
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/perps-withdraw-across branch from a30e120 to ddcc878 Compare May 19, 2026 10:35
@pedronfigueiredo pedronfigueiredo marked this pull request as ready for review May 20, 2026 09:28
@pedronfigueiredo pedronfigueiredo requested review from a team as code owners May 20, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant