New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Building Onchain Workflows with LI FI Composer I Leonardo Cascianelli

ETHGlobalSun, Aug 9, 2026, 12:00 AM

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 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Transcript

Let's start at the beginning. Who remembers my name? Hello everyone, I'm Leo from Lei , and today we're sponsoring the Composer project for the global IT hackathon. Composer is essentially a compiler. It allows you to execute complex DeFi strategies within a single atomic transaction.

It works like this : you define a declarative flow. This happens in JSON format. The interface is pretty simple, and the idea is that we take this JSON stream, process it a little, and turn it into something that can be executed in one click on the web. Everything is simulated beforehand. So you get information about what the results will be , how much money you will spend, and whether the transaction will fail.

Many of you have probably found yourself in this situation. You wanted to perform an exchange, a deposit to a vault, and then some other operation, such as staking or resttaking your shares. Often this is broken down into several different streams. There is a need for multiple transactions, and you need a coordinator need a coordinator that takes the original data from the previous transaction and passes it to the new one. This is quite inconvenient, and some people try to solve it using multicall.

The problem is that multicall does not provide such a data flow, you need to hard- code intermediate values ​​in the call, and this is not the best way to build such flows. This is quite unstable. So, Composer allows you to define such a flow in one place, and all intermediate values ​​are automatically passed between different operations. As I said, everything goes through our JSON specification, which is essentially a built-in DSL. Er...

You specify what input data goes into the transaction and what operations are performed operations are performed , and we take care of the rest. Here I have created a very simple flow that performs the exchange and zap operation. Zap means you are contributing assets to the repository. I'll walk through the different parts to show how it works in practice. This is the TypeScript SDK that you can use.

But essentially, as long as you can generate JSON in one of your favorite programming languages, you can work with Composer without any problems. So, the first step of your flow is to declare the input data. In this case, we are announcing where Ethereum is going. This is an ERC20 resource. You determine exactly how to provide this input to the Composer context.

In this case I used direct deposit, meaning you have EOA, you have some WETH and you want to deposit them into a composer context. The basic elements of a flow are nodes. We have two nodes here. We created a swap that takes a WETH resource and converts it to a USDC resource, and then a subsequent operation that we call a zap that allows you to go from a USDC resource to USDC staking. Note that we also support what we call guards.

Essentially, this allows you to have some certainty about the minimum amount that will be required when executing a transaction executing a transaction . They are optional, but it's worth adding them to most of the streams you create. Yes. So, I wanted to clarify one point about how composer works—it's the account model. Each signer, whether it's your EOA, safe, or smart wallet, gets a dedicated user proxy.

Therefore, all interactions through composer occur in this isolated environment. The idea is that each user has their own. It is deployed automatically if you don't already have it, and allows you to not share permissions with other composer users. When you are inside the user proxy, execution occurs via a delegate call to our on-chain virtual machine. The API interface is quite simple.

We have one main endpoint that you interact with. This is the /compose endpoint. You send your data flow graph in JSON format, and you also have two metadata endpoints useful for defining available operations. This is the route/ operations. This is the route/ compose/if, and the other is for zap zap operations.

It allows you to find out what types of zapping operations we support. There are some details on how to authenticate to the system. You need an API key. You can get it on portal.ly.

fi. The response you receive after submitting a stream for compilation contains a number of fields. Of course, you receive a transaction in return. You are responsible for sending it to the network. You also get a list of permissions required to complete the transaction complete the transaction .

This is a " . This is a " best efforts" situation. We are trying to determine what exactly you might need. And one of the most interesting results is the resources that are created in the process. Since it's a complete system, you can do almost anything you want.

We try to determine which resources remain incomplete at the end of the flow, and they are reflected in the response. It's something like this Essentially. Specifically for AATON, we decided to go further and provide a number of new operations that are not yet available in the main interface, and tied the demo to this . This was a migration of debt between different platforms. The situation that justifies this example is—imagine you have a position with a certain annual percentage rate ( percentage rate ( APY) and you want to switch to a better position, say Morpho with a higher rate.

You can do this using Composer within a single thread. And what's cool about this, as I show on the slide, is that a lot of the complexities of using flash of using flash credits that are required for this kind of migration are abstracted away by a concept we call " we call " materializers." This is just a snippet of code to show how easy it is to deposit funds and also get flash also get flash credit to fund your stream. So, you only need three lines of code, we take care of the complexity , and the migration takes place in three stages. First you need to exit the position to close the old one.

You repay the Aave debt, convert the assets to release the collateral, and enter a new position. You see we use two flash credits here and here for interaction, and then you close the flash credit, returning the funds used. As I said, all of this functionality is available in preview mode specifically for Composer deployment on ETH Global. To work with the SDK, you simply need to specify this URL to access new operations, and we support Aave v3, Balancer v2, Morpho, and standard standard EIP-3156 flash credits. Uh-huh.

Most of you will probably work with this through agents. We provide the files llm.txt and llm-full.txt. Thanks to them, you can direct your agents to this your agents to this URL and they will understand how to build flows.

You can take a screenshot of this slide. There is also this QR code here. We have created a repository of over 30 examples of over 30 examples that you can run on our backend to understand what is available and what can be done with this product. As I said, the only thing you need to work with this is an API work with this is an API key, which you can get on our partner portal. We thought about a lot of things that could be built with this.

These are just a few examples. Essentially, you can perform, as I said, complete operations. So we're really interested to see what use cases you can come up with. We are interested in AI areas, as well as UX and developer tools. I'll take a short pause so you can take a screenshot.

Oh, sorry. And yes, it was a short presentation. I just wanted to show what the interaction pattern with this product looks like. If you have any questions, I'll be at the booth. And yes, thank you for your attention.

Have a question? It seems not. OK. See you later, guys. Yes.

So, it depends on what surface you are targeting. If it requires Web2 interactions, it's a little more complicated. But we allow you to access almost any smart any smart contract on the network. So, you have every opportunity to call any smart any smart contract using Composer. You can use our primitives, as well as create your own, to invoke to invoke any contract on the network.

Yes. I mean, Composer is still pretty new. We don't have any partners yet who would build on it. This is, in a way, a launch, the first public launch of this product. We have partners working on migration processes.

I think this is the most difficult task, which is probably in the greatest demand. Yes. support. Oh, you mean Arc Chain? OK.

So the question is whether Composer is available in Arc Chain, unfortunately not yet. This is in our development plan, but we haven't had time to implement it yet. OK. Does the contract have to be officially registered or verified to work with a deposit, or can any arbitrary deposit contract be used? So the question is, is there any whitelist when it comes to interacting with third-party contracts?

The answer is no. You can interact with almost any contract on the network. Okay, I think that's all. Thank you.

Automatic transcript — names and jargon may be misspelled.