PARTNER: LayerZero Swap
Overview
The LayerZero Swap allows you to perform same-chain token swap using the LayerZero core asset transfer protocol directly inside a Decimal workflow. It enables automated, same-chain token swap while leveraging LayerZero’s routing and liquidity optimisation.
This integration is designed for Web3-native workflows where same-chain asset swapping needs to be executed programmatically, conditionally, or as part of a larger automation.
Common use cases include:
Same-chain asset movement
Treasury and fund management workflows
Strategy-based DeFi automation
Available Module
LayerZero Swap
Executes a token swap using LayerZero based on the configured source token, destination token, and amount.
When to use LayerZero Swap
Use the LayerZero Swap node when:
You need to same-chain swap tokens programmatically
Swaps are part of a larger automated workflow
You want best-route aggregation without manual execution
You need same-chain token movement
This node is typically used after wallet connection and before downstream actions like transfers or contract calls.
Adding LayerZero to a Workflow
Open the Decimal workflow editor
Add a Trigger node
From Web3, select LayerZero Swap
Connect the node to the trigger or previous step
Once added, the LayerZero Settings panel opens automatically.
Module Configuration
From Token
Select the source token to bridge from.
Example:
ETH (Ether)
Note: Native tokens (e.g. ETH) may not be supported as source tokens directly. In such cases, use the wrapped version (e.g. WETH).
Destination Chain
This is defaulted to the same chain as the source chain.
Example:
Base
For cross-chain swaps, the destination chain must be different from the source chain. Choose the LayerZero Bridge node instead.
To Token
Select the destination token to receive.
Example:
WETH (Wrapped Ether)
Amount
Enter the human-readable amount to swap.
Example:
0.1
Decimal automatically handles token decimals during execution.
This field is required.
Recipient (Optional)
Specify a recipient wallet address for the destination tokens.
If left empty, tokens are received in the connected wallet
Useful for routing funds to external wallets or contracts in a single transaction.
Example:
0x...
Output & Execution
When executed, the LayerZero node:
Fetches the optimal swap route
Executes the bridge onchain
Returns execution details to the workflow
Typical output includes:
Transaction hash
Source and destination tokens
Amounts swapped
Execution status
These results can be used in downstream nodes for validation, logging, or follow-up actions.
Example Workflow
Use Case: Swap ETH to WETH on BASE automatically.
Workflow:
Trigger
Wallet Connection
LayerZero Swap
If Else (validate execution)
Transfer or store result
This enables fully automated swap workflows without manual intervention.
Here are the official 1inch references
LayerZero Documentation: https://docs.layerzero.network/
LayerZero Developer Docs (API & Protocol): https://portal.1inch.dev
LayerZero on X (Twitter): https://x.com/1inch
Last updated