Skip to content

Conversation

@dohaki
Copy link
Contributor

@dohaki dohaki commented Oct 31, 2025

Closes ACX-4608

Adds support for sponsored CCTP route strategy. The strategy is enabled for Sepolia Arbitrum -> HyperCore Testnet. Here is an example request.

Examples

Below are some test transactions that at least validate that the signatures are correct and the values are correctly set. We can't test the full e2e flow yet though:

@linear
Copy link

linear bot commented Oct 31, 2025

@vercel
Copy link

vercel bot commented Oct 31, 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 Nov 3, 2025 2:35pm
sepolia-frontend-v3 Ready Ready Preview Comment Nov 3, 2025 2:35pm

Comment on lines +44 to +45
// TODO: Should this always be fast?
const cctpMode = "fast" as const;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@melisaguevara Do you know if this should be always fast?

Copy link
Contributor

@melisaguevara melisaguevara Oct 31, 2025

Choose a reason for hiding this comment

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

I'm not sure either. We should double check with Niha or Ryan.

Comment on lines +204 to +207
inputAmount:
crossSwap.type === AMOUNT_TYPE.EXACT_INPUT
? bridgeQuote.inputAmount
: bridgeQuote.inputAmount.add(maxFee),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not 100% sure about this for output-amount based flows 🤔 Appreciate some input

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have to use inputAmount because we are already considering the difference caused by the maxFee inside calculateMaxBpsToSponsor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok right. so that means we can use the same calculation for input- and output-amount based flows?

Copy link
Contributor

@melisaguevara melisaguevara left a comment

Choose a reason for hiding this comment

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

Looking good! Left some questions


export const SPONSORED_CCTP_INPUT_TOKENS = ["USDC"];

export const SPONSORED_CCTP_OUTPUT_TOKENS = ["USDC-SPOT", "USDH-SPOT"];
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be USDC-PERPS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this commit I removed the notion of USDS-SPOT like we discussed offline. Lmk what you think 14f2588

chainId: outputToken.chainId,
tokenIn: {
symbol: "USDC",
decimals: 8,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be 6? Or could we use the values from inputToken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thinking here was that USDC as a spot token on HyperCore always has 8 decimals 🤔 Because inputToken has 6 decimals, I opted to hardcode the 8 decimals here.

But I guess the question is: when we do a swap on HyperCore, will it always be spot-to-spot swap?

Comment on lines +204 to +207
inputAmount:
crossSwap.type === AMOUNT_TYPE.EXACT_INPUT
? bridgeQuote.inputAmount
: bridgeQuote.inputAmount.add(maxFee),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have to use inputAmount because we are already considering the difference caused by the maxFee inside calculateMaxBpsToSponsor.

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.

3 participants