Skip to content

Conversation

ashwinrava
Copy link
Member

This PR implements the routing logic below. Changes here: a8c41f2

  • Update /limits to return utilization data so that we don't need to refetch it
  • Call limits with a standard amount to maximize cache hits
  • Use data to determine Across/CCTP bridge strategy
image

Copy link

linear bot commented Sep 30, 2025

Copy link

vercel bot commented Sep 30, 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 Sep 30, 2025 8:23pm
sepolia-frontend-v3 Ready Ready Preview Comment Sep 30, 2025 8:23pm

@ashwinrava ashwinrava changed the base branch from master to mguevara/acx-4479-add-cctp-bridge-strategy September 30, 2025 12:02
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.

Left some remarks! Also some inline comments seem to be incorrect/outdated

const isLargeDeposit = depositAmountUsd > 1_000_000; // 1M USD

// Check if eligible for Fast CCTP (Polygon, BSC, Solana) and deposit > 10K USD
const fastCctpChains = [CHAIN_IDs.POLYGON, CHAIN_IDs.BSC, CHAIN_IDs.SOLANA];
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 part of the CCTP bridge strategy?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, for this use case we are already exporting CCTP_FILL_TIME_ESTIMATES from the strategy. Maybe we can use that combined with a threshold.

Copy link
Contributor

Choose a reason for hiding this comment

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

fast CCTP chains can be taken from here. Chains with "seconds" are considered fast

@ashwinrava ashwinrava marked this pull request as draft September 30, 2025 14:18
@ashwinrava ashwinrava force-pushed the ashwin/acx-4481-implement-acrossnative-routing-logic branch from a8c41f2 to 671465d Compare September 30, 2025 20:11
@ashwinrava ashwinrava changed the base branch from mguevara/acx-4479-add-cctp-bridge-strategy to master September 30, 2025 20:12
@ashwinrava ashwinrava marked this pull request as ready for review September 30, 2025 20:29
@ashwinrava ashwinrava changed the base branch from master to feat/mint-burn-bridge-routing September 30, 2025 21:51
Comment on lines +65 to +67
if (bridgeStrategyData.isUtilizationHigh) {
return getCctpBridgeStrategy();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

when utilization is high CCTP strategy should be used only for USDC, right?


import { CrossSwap, CrossSwapQuotes, Token } from "../_dexes/types";
import { AppFee, CrossSwapType } from "../_dexes/utils";
import { Logger } from "@across-protocol/sdk/dist/types/relayFeeCalculator";
Copy link
Contributor

Choose a reason for hiding this comment

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

I see we have some utils in api/_logger.ts. Can we use getLogger from there?

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