-
Notifications
You must be signed in to change notification settings - Fork 63
feat: mint + burn routing logic #1864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/mint-burn-bridge-routing
Are you sure you want to change the base?
feat: mint + burn routing logic #1864
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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]; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
a8c41f2
to
671465d
Compare
if (bridgeStrategyData.isUtilizationHigh) { | ||
return getCctpBridgeStrategy(); | ||
} |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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?
This PR implements the routing logic below. Changes here: a8c41f2
/limits
to return utilization data so that we don't need to refetch itlimits
with a standard amount to maximize cache hits