Configure token routing
Token routing rules let you select the output token based on what the user deposited. When registering an account, thetarget object accepts two optional fields:
Each rule has:
A rule’s
match must specify at least one of chain, token, or symbol. You can combine them for more specific matches.
Rule priority
When multiple rules match a deposit, the most specific rule wins. Declaration order only matters when two rules share the same specificity.Example: USDC and ETH passthrough
Route USDC deposits to USDC.e and ETH deposits to WETH on Optimism, while defaulting other tokens to a fallback:- User deposits USDC (from any chain) → receives USDC.e on Optimism
- User deposits ETH (from any chain) → receives WETH on Optimism
- User deposits any other token → receives
target.token(default fallback)
Example: chain-specific overrides
Combinechain and symbol for chain-specific routing. The chain-specific rule takes priority because chain + symbol outranks symbol alone.