Migration Guide for Relayers

Supporting deposits where outputToken is not the same as inputToken.

This is a feature highlighted in the Across V3's depositV3 function but it is currently not supported in the example Relayer implementation. Upon the CCTP migration, deposits will begin to be sent with inputToken = USDC and outputToken = Bridged USDC.

Eventually, Across will encourage depositors to take advantage of this feature and send other types of cross chain token swaps, for example setting input to USDC and output to WETH. Therefore, relayers should update their code to handle the case when the input USDC (Native) is not the same as the output USDC (Bridged) with an eye towards generalizing the code to handle arbitrary output tokens. But, relayer implementations can choose to temporarily hardcode this specific USDC to Bridged USDC deposit route.

Note, the inputToken must always be a token that Across natively supports. This is why Bridged USDC cannot be an inputToken. However, outputToken can technically be any ERC20 that exists on the destination chain.

Relayers should at minimum be prepared to compute the price of the outputToken relative to the price of the inputToken and normalize the inputAmount and outputAmount to avoid filling unprofitable deposits. To support CCTP, relayers should also be prepared to hold inventory in both Bridged and Native USDC on CCTP-enabled chains.

Last updated