# Building Onchain Workflows with LI FI Composer I Leonardo Cascianelli

- Channel: [ETHGlobal](https://streameth.org/ethglobal)
- Date: 2026-08-09
- Duration: 12:35
- Topics: LI.FI, Leonardo Cascianelli, Composer, ETHGlobal New York 2026, DeFi, atomic transactions, onchain workflows, compiler, JSON, DSL, declarative flow, swap, zap, vault, staking, guards, multicall, user proxy, delegate call, virtual machine, SDK, TypeScript, API, resources, flash loans, materializers, cross-venue migration, Aave, Morpho, Balancer, ERC-3156, ERC-20, AI agents, llms.txt, smart contracts, gas simulation, workshop, hackathon
- Watch: https://streameth.org/watch/yt-ydHLHdQFJL8
- YouTube: https://www.youtube.com/watch?v=ydHLHdQFJL8

## Description

In this workshop at ETHGlobal New York 2026, Leonardo Cascianelli from LI.FI introduces Composer, the project LI.FI is sponsoring for the hackathon, and walks through its interaction pattern. Composer is essentially a compiler that lets you execute complex DeFi strategies in one atomic transaction. You define a declarative flow in JSON (a simple embedded DSL), and Composer transforms it into something executable with one click on chain, pre-simulating everything so you learn your expected outputs, gas usage, and whether the transaction will fail. He motivates it with a common pain point: wanting to chain a swap, a vault deposit, and a stake or restake often ships as multiple transactions needing a coordinator to feed each output into the next. People try to solve this with multicall, but multicall does not give real data flow (you must hardcode intermediary values), so it is flaky. Composer instead defines the whole flow in one spot and passes intermediate values through automatically.

Leo walks through a simple flow performing a swap and a zap (staking into a vault) using the TypeScript SDK, though any language that produces JSON works. He explains declaring inputs (like wrapped ETH as an ERC-20 resource via direct deposit from an EOA), the nodes that transform resources (swap WETH to USDC, then zap USDC to staked USDC), and optional guards that set minimum amounts. He covers the account model, where each signer (EOA, safe, or smart wallet) gets a dedicated auto-deployed user proxy that isolates approvals, with execution via delegate call to LI.FI's on-chain virtual machine. He details the simple API surface (the /compose endpoint plus manifest and zaps metadata routes, authenticated with an API key from the LI.FI portal), whose response returns the transaction to send yourself, required approvals, and dangling output resources. For the hackathon he previews new operations on a dedicated ETHGlobal deployment, including a cross-venue migration demo (moving an Aave position to Morpho in one flow) where flash loan complexity is abstracted away via materializers, supporting Aave V3, Balancer V2, Morpho, and ERC-3156 flash loan providers. He points agents to an llms.txt file and a repo of 30+ examples, invites AI, UX, and dev tooling builds, and closes with Q&A on targeting any smart contract, chain availability, and third-party contract whitelisting.

00:00 Introduction
00:11 Meet Leo and Composer
00:42 How the Declarative JSON Flow Works
00:58 Pre-Simulating Outputs, Gas, and Failures
01:08 The Multi-Transaction Pain Point
01:36 Why Multicall Falls Short
02:03 The JSON Specification and Embedded DSL
02:30 A Simple Swap and Zap Flow
02:50 Declaring Your Inputs
03:18 The Nodes That Transform Resources
03:42 Using Guards for Minimum Amounts
04:04 The User Proxy Account Model
04:27 Execution via Delegate Call
04:37 The API Surface and Endpoints
04:51 Authentication and the API Key
05:21 What the Compilation Response Returns
05:41 Exposing Dangling Resources
05:53 New Operations for the Hackathon
06:11 The Cross-Venue Migration Demo
06:49 Abstracting Flash Loans With Materializers
07:09 The Three Beats of a Migration
07:30 The Preview Deployment and Supported Protocols
07:56 Pointing Your Agents to llms.txt
08:22 The Repo of 30+ Examples
08:44 What You Can Build With Composer
09:19 Q&A: Targeting Any Smart Contract
11:01 Q&A: Partners and Chain Availability
11:39 Q&A: Third-Party Contract Whitelisting
12:00 Closing

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  

*ETHGlobal New York 2026*
This workshop is specifically for ETHGlobal New York 2026, a 3-day hackathon held June 12-14 at the Metropolitan Pavilion, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! Watch the full ETHGlobal New York 2026 playlist here: https://www.youtube.com/playlist?list=PLXzKMXK2aHh7MZ8T-ict6YshkFDw9WJCu

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  

✅ *Follow ETHGlobal*
X: https://x.com/ETHGlobal​
Website: https://ethglobal.com
YouTube: https://www.youtube.com/c/ETHGlobal 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  

_Are you interested in Ethereum development and entrepreneurship?_
👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events
🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus
📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
