Omnichain Liquidity Routing on Rootstock with LI.FI
Rootstock is natively supported by LI.FI, a cross-chain liquidity aggregator. LI.FI routes swaps and bridges across dozens of chains and protocols, including Hop, Stargate, Across, and Gas.zip. It delivers the specific destination token your users select (for example, bridged USDC on Rootstock), straight to Rootstock, in a single transaction.
This guide covers three integration paths:
- LI.FI Widget - embed a pre-configured, customizable UI component
@lifi/sdk- fetch quotes and execute routes programmaticallygetContractCallsQuote(Advanced) - bridge assets and call a Rootstock contract atomically in one user click
Prerequisites
- Node.js 18+
- A Next.js or React project
- Basic familiarity with
viemand EVM wallets - LI.FI API access (no API key required for basic rate limits; register at portal.li.fi for higher limits)
Rootstock does not have native USDC issued by Circle. USDC on Rootstock is bridged from other networks via protocols such as LayerZero or Stargate. Always verify the exact contract address of the bridged asset you wish to interact with on Rootstock before deploying.
Integration 1: The LI.FI Widget
The LI.FI Widget is a self-contained React component. Lock the destination chain to Rootstock so users always land on Chain ID 30. The widget handles wallet connection, route selection, approvals, and transaction execution automatically.