Overview

LI.FI Zaps, also referred to as “contract calls”, “transaction batching”, or “transaction orchestration”, delivers one-click UX for any combination of onchain actions across any number of chains. Zaps provide a streamlined way to bundle multiple actions within a single transaction on same-chain or cross-chain, eliminating the need for users to coordinate multiple transactions and navigate different interfaces by abstracting complex onchain operations into a single user intent. Current DeFi UX forces users to hop between multiple platforms and manage potentially dozens of transactions just to complete a single workflow. Zaps solves this by transforming multi-step, multi-chain operations into a single click, reducing the need for multiple steps, lowering gas fees, and enhancing the user experience.

Key Benefits of LI.FI Zaps

  • Single Transaction Execution: Zaps allow multiple actions to be completed in one transaction, eliminating the need for users to sign and pay for each individual action separately.
  • Cost Efficiency: By batching actions into a single transaction, Zaps reduce gas costs, as each step in a multi-action sequence does not require its own transaction fee.
  • Improved User Experience: Zaps minimize the complexity of onchain interactions by consolidating them, making it easier for users to perform multi-step operations without extensive technical knowledge.
  • Atomic Transactions (same-chain only): Zaps are executed as atomic transactions (same-chain only), meaning all actions are completed as a single unit or none at all, ensuring security and consistency in execution.

How LI.FI Zaps Work

LI.FI Zaps work by consolidating a series of contract calls into a single transaction through an onchain VM. Each Zap is designed to follow a predefined sequence of actions that enables users to perform complex DeFi operations without needing to interact directly with multiple protocols. This single transaction can perform multiple actions on behalf of the user, such as:
  • Swapping Tokens: Convert one asset to another using decentralised exchanges (DEXs)
  • Depositing into Vaults: Deposit into protocols like lending protocols or yield-bearing vaults
  • Staking: Stake into LSTs and restaking protocols
LI.FI Zaps enable the execution of the following multi-step process in a single transaction: on the Base network, swap USDC for ETH; bridge ETH to the Ethereum network; swap ETH for USDC; and deposit USDC into Aave. Zaps uses two core components to achieve this functionality:
  1. Onchain VM (Execution Engine): Smart contract that can call any other onchain protocol or series of them, handling all onchain execution without requiring users to understand blockchain interactions.
  2. eDSL and Compiler (Intent Abstraction Layer): Purpose-built domain-specific language that translates high-level user intentions into executable calldata for arbitrary smart contract interactions across multiple chains.

Value Proposition for Integrators

Protocol Teams Integrate their protocols as Zaps to expand user accessibility and adoption. Partner protocols can be invited to Zaps backend code base. Wallet & DeFi Platforms Zaps offer users more sophisticated onchain actions, and “campaigns” can be created for further user engagement (e.g., deposit into new protocol). This significantly reduces user friction whilst expanding the breadth of DeFi operations your platform can support. Onchain Protocols (e.g., lending protocol) Zaps allows users to perform a 1-click cross-chain action into the desired protocol. For example, users with assets on Base can deposit into a lending protocol on Arbitrum in 1-click.

Supported Actions in LI.FI Zaps

LI.FI Zaps currently support the following actions:
  • DeFi Protocol Interactions: Deposit into, withdraw from, or interact with supported lending platforms, yield farms, and staking protocols
  • Cross-Chain Protocol Access: Execute cross-chain operations to access protocols on different chains through the broader LI.FI API
  • Tokenised Position Management: Handle vault tokens and other tokenised positions
Note: While Zaps itself is currently single-chain only, it can leverage the entire LI.FI API/backend for cross-chain functionality as Zaps is categorised as a ‘tool’ in the LI.FI backend.

Example Workflow: Cross-Chain DeFi Deposit with Zaps

Traditional Flow: User wants to increase their USDC position on Aave (Base chain) but only holds SOL on Solana
  • 4+ transactions across 3+ websites
  • Manual coordination of swaps, bridges, gas acquisition, and protocol deposits
Zaps Flow: Single transaction executes:
  1. SOL → USDC swap
  2. Cross-chain bridge to Base
  3. ETH acquisition for gas
  4. Aave deposit
By using a Zap, LI.FI transforms this complex multi-step process into a seamless one-click operation.

Technical Details

Key Technical Features

  • Atomicity via pre-execution simulation: Simulates the entire execution path before submitting transactions onchain, providing users with certainty about outcomes and preventing failed transactions
  • Dynamic calldata injection: Automatically intercepts and injects necessary parameters between transaction steps when step 2 requires data from step 1’s output
  • LI.FI ecosystem integration: As part of the broader LI.FI ecosystem, Zaps can combine cross-chain swaps, bridges, and protocol interactions in a single workflow, enabling complex operations like cross-chain swap + deposit combinations

Current Capabilities & Limitations

Limitations
  • Single-chain only (for all LI.FI supported chains)
  • No Solana or non-EVM chain support
  • Tokenised positions only (e.g., vault tokens)
  • No DEX support (staking, lending, and vault protocols only)
Supported Protocols at Launch Team is open to protocol integration requests based on technical feasibility and community feedback.

How to Implement LI.FI Zaps

No custom integration required! Zaps works out-of-the-box with the LI.FI API, Widget and SDK. To utilise Zaps, developers can leverage the LI.FI API, which provides endpoints for creating, configuring, and executing Zaps. The API enables developers to set up multi-step transactions according to their requirements.

Technical Implementation

Vault token addresses need to be inputted into the GET /quote and POST /routes endpoints Zaps is categorised as a “tool” in the LI.FI API and requires manual addition to integrator whitelists

Use Cases for LI.FI Zaps

  • Cross-Chain Yield Farming: Deposit an asset on one chain, bridge it to another chain, and deposit into a yield farming protocol in a single transaction.
  • Multi-Chain Arbitrage: Execute operations across different chains to exploit opportunities without needing separate transactions for each chain.
  • Onboarding New Users to DeFi: Simplify user onboarding by allowing them to perform multi-step DeFi operations in a single, seamless transaction.
  • Protocol Access Simplification: Enable users to access any supported protocol from any supported chain with a single click.

Next Steps

Ready to integrate? Contact the LI.FI team to discuss your specific use case and get Zaps added to your integrator whitelist.