Skip to content

Conversation

@melisaguevara
Copy link
Contributor

@melisaguevara melisaguevara commented Oct 28, 2025

This PR prepares the swap API to support sponsored flows to HyperCore through our own OFT periphery contracts.

Enabled routes for now:

  • USDT → USDT-SPOT
  • USDT → USDC-SPOT (waiting on USDC-SPOT address to be available).

It includes:

  • Intermediary routing: all transfers route through HyperEVM USDT before reaching HyperCore
  • Estimation of maxBpsToSponsor based on real time market simulation for USDT → USDC-SPOT transfers
  • Decimal conversion handling between 6-decimal (USDT) and 8-decimal (HyperCore tokens)
  • Signature generation fixes to match Solidity contract expectations for on-chain verification
  • Transaction building for calling deposit function on SponsoredOFTSrcPeriphery

See this example calls:

  • Common params:
{
  "amount": "1000000",
  "inputToken": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
  "outputToken": "0x200000000000000000000000000000000000010C",
  "originChainId": "42161",
  "destinationChainId": "1337",
  "depositor": "0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D"
}

See also this Tenderly simulation showing that signature validation is working as expected. Simulation is failing only because of allowance check.

Note: only Arbitrum contract has been deployed as of now.

@linear
Copy link

linear bot commented Oct 28, 2025

@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
app-frontend-v3 Ready Ready Preview Comment Oct 29, 2025 10:52am
sepolia-frontend-v3 Ready Ready Preview Comment Oct 29, 2025 10:52am

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved some functions from oft/strategy to this utils file to reuse them. There should be no changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, there should be no changes beyond using the imported utils.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed this strategy to oft-sponsored

Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! Left some remarks

Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worked on integrating the CCTP sponsored flow on top of your branch but some questions came up.

@melisaguevara melisaguevara merged commit 6e8e5c4 into epic/sponsored-bridging-to-hypercore Oct 30, 2025
10 checks passed
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.

4 participants