Documentation Index
Fetch the complete documentation index at: https://anypay-docs-sdk-0-15-0-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Route Providers
Trails integrates with multiple liquidity sources and bridge providers to find the best routes for your cross-chain transactions. You can specify preferred providers for swapping and bridging, or let Trails automatically select the optimal ones.Available Providers
AUTO(recommended): Automatically selects the best provider based on the routeRELAY: Uses Relay for fast bridging operationsCCTP: Uses Circle’s Cross-Chain Transfer Protocol for USDC transfersSUSHI: Uses SushiSwap for on-chain swapsZEROX: Uses 0x protocol for DEX aggregationLZ_OFT: Uses LayerZero Omnichain Fungible Token bridgeLZ_STARGATE: Uses LayerZero Stargate for native asset bridgingGASZIP: Uses Gas.zip for gas-optimized routing
Configuration
Widget-level configuration
Specify route providers on any focused component:Hook-level configuration
When using theuseQuote hook, you can specify both swap and bridge providers:
Provider Details
AUTO (recommended)
TheAUTO setting lets Trails intelligently select the best provider for each transaction based on cost, speed, liquidity, and reliability. Use this unless you have a specific reason to lock to a particular provider.
Relay
Relay provides fast cross-chain transfers through an intent-based filler network. Fillers front the destination execution and settle asynchronously.- Fast finality on most routes
- Competitive fees
- Good coverage across major EVM chains
CCTP
Circle’s Cross-Chain Transfer Protocol enables native USDC bridging without wrapped tokens. There is no slippage — 1 USDC in equals 1 USDC out.- Available on Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche
- No wrapped USDC; transfers use Circle’s burn-and-mint mechanism
- Best choice when users need exact USDC amounts at destination
SushiSwap
SushiSwap provides on-chain swap routing using its V3 concentrated liquidity pools across multiple EVM chains.- Available on most major chains
- Works well when deep Sushi liquidity exists for the token pair
0x Protocol
0x aggregates liquidity across multiple DEXs to find optimal swap rates. It optimizes for both price and gas.LayerZero (LZ_OFT / LZ_STARGATE)
LayerZero is an omnichain messaging protocol that powers two distinct bridge providers: LZ_OFT — Omnichain Fungible Token bridge. Used for tokens that have native OFT deployments across chains (no wrapping, direct cross-chain transfers). Live since late February 2025. LZ_STARGATE — Stargate protocol routes native assets across chains using a unified liquidity pool model, minimizing slippage on stable assets.- Both providers expand coverage to chains and tokens not served by Relay or CCTP
- AUTO will select the appropriate LayerZero route when it is optimal
Gas.zip
Gas.zip is a gas-optimized routing provider that reduces the total gas cost of cross-chain transactions. Shipping with v1.5.- Useful when minimizing gas costs is the priority over speed
- AUTO will select Gas.zip when it provides the best cost efficiency
Best Practices
- Use
AUTOby default: Let Trails optimize the route for you. - USDC transfers: Use
CCTPfor guaranteed 1:1 native USDC bridging. - Fast bridging: Use
RELAYwhen speed is the priority. - Gas-sensitive routes: Use
GASZIPor leave asAUTOto minimize fees. - Separate swap and bridge:
swapProvidercontrols same-chain DEX routing;bridgeProvidercontrols the cross-chain transport layer. - Fallback support: Set
swapProviderFallback: trueorbridgeProviderFallback: trueto automatically fall back to another provider if your preferred one is unavailable.