Cross-Chain USDC Supply to AAVE with Gasless Fusion Orchestration
This guide demonstrates how to use LiFi Protocol together with Biconomy’s Modular Execution Environment (MEE) to perform a cross-chain supply of USDC into AAVE, completely gasless using Fusion Orchestration.
Overview
The integration enables:
Cross-chain bridging from Optimism to Base using LiFi Protocol
Automated AAVE supply on the destination chain
Gasless execution through Fusion Orchestration
Single signature UX for the entire flow
Optimized routing with FASTEST or CHEAPEST options
Architecture
Key Components
LiFi Protocol: Smart routing aggregator for cross-chain swaps and bridges
Biconomy MEE: Orchestrates the entire transaction flow
Fusion Mode: Enables gasless execution with external wallets
Companion Account: Temporary smart account for orchestration
Flow Diagram
User EOA (Optimism) ↓ [Sign Trigger]Companion Account ↓ [Bridge via LiFi]Base Network ↓ [Supply to AAVE]aUSDC → User EOA (Base)
Implementation Guide
1. Setup and Dependencies
First, create the LiFi Quote Service file. Copy and paste this entire code block into a new file called lifi-quote-service.ts:
import { createMeeClient, toMultichainNexusAccount, createChainAddressMap, runtimeERC20BalanceOf, greaterThanOrEqualTo, type Trigger, getMEEVersion, MEEVersion} from "@biconomy/abstractjs"import { getLifiQuote } from "./lifi-quote-service" // Import the service you just createdimport { base, optimism } from "viem/chains"import { privateKeyToAccount } from "viem/accounts"import { http, parseAbi, parseUnits } from "viem"