Unifying Liquidity in Defi - an order routing saga
EthCC[8] · 3 Jul 2025 · 20:52
Ahmet Ozcan examines insufficient liquidity in DeFi and approaches to improving it through order routing. The presentation discusses integrating that infrastructure across protocols to reduce cost and friction.
Speakers
Topics
From EthCC[8], hosted by Ethereum France.
Transcript
[Music] Okay. Hello everyone. Thanks for being here. I know there's a lot of side events, many things going on in parallel. So I appreciate you coming here. And if you're a, you know, film lover, I think it's really amazing to be here on a, you know, movie stage like that. So I'm I feel very lucky. Uh hopefully I'll make it fun for you and interesting for you. So I'll talk about um liquidity aggregation and order routing. I think it's one of the areas that is a little bit underappreciated I feel like and users are still you know not only uh trading on centralized exchanges but even on defy trading many users are uh not familiar with
aggregation and what it can bring. So most of you I assume came from another city maybe some other country and uh for my myself I came from San Francisco and uh probably what you were doing is looking at some travel aggregation site to find the best route and there are so many routes you can take there's no direct route from SF to Khan of course you have to fly into but you take into many factors cost is one of them but uh it's sometimes you know loyalty program that you want to get earn points and many other considerations. So right now travel aggregators or aggregators in you know web 2 are really u addressing a critical problem and making you know
saving money to users and making it really easy for users. So you can think of it for DeFi, a very complicated map and uh I asked one of our algorithm developers actually to show me a map of D5 in one of the chains and to see how complex that is and uh what it looks like. So he struggled to really visualize it because it's so complex and then came up with this visualization which is actually a little bit filtered and on the left hand side what you're seeing is a visualization of uh an arbitum defy map. So each node is a token here and each arrow is a route and these routes are typically AMMs AMM equations that govern the relation
between those uh swaps. and uh I think he filtered down to 4,000 tokens or so so that we can see something otherwise everything would be white. So it's it's really complex. It's it's orders of magnitude more complex than like a travel aggregation what we are doing. And when you look at this map of course the there's some pattern that emerge from it. It's not uh just uh made uh to look like that. You see that in the center you have some uh small number of tokens uh in orange and blue at the center ring. So these are the most connected tokens. These are almost like hubs, hub tokens. Uh and I think it makes sense if you're launching a new token, most likely you're going to, you know, provide, you know, liquidity with a paired asset. And most people choose
ET or a stable coin. So there are really, you know, hop tokens that always are very well connected and some of the of course uh other tokens on this ring are uh the most connected tokens the others. So when you look at then the second ring outside these tokens are still connected to um the hub tokens there is you know direct path easier path but at the very end at the edge you see these lonely you know sparse tokens uh which have usually don't have direct connections to these hop tokens and you know they have connections to um perhaps another token in the second ring and uh going there you know from swapping from one token in this case I believe it's uh
from going from green to blue you uh it's not an easy thing to find the optimal path unfortunately it's not like ranking which decks has this you know simplest price what we are doing is actually really complex path finding so what does odos is a leading defy aggregator liquidity aggregator in addition to aggregation of liquidity the optimizing the route is uh what we specialize in and bring value to users and the routing engine basically filters and simplifies this complexity. So whenever a user uh would like to you know uh wants to get a code swap from token A to B. Of course at every um uh
block we are building this graph and from this graph we need to simplify to the um optimal value and you need to do it really fast and cost effective because you know people are just entering values to swap but not every you know code request results in a transaction. So it needs to be fast and cost effective. So this is what Odo does going through this uh very fast and efficient order routing to navigate users from A to B and of course superior routing delivers better rates that's the whole purpose and uh this is a you know snapshot from our front end uh in aggregation you know we would like to show transparently to
users uh what kind of route the algorithm shows so you know you don't only see a code both um result, but you also know exactly uh how the routing will happen. And in this case, for example, going from eat to die, uh the algorithm finds routes uh hopping over different assets, splitting your order and doing really complex um order routing. As you can see, this is just a random request and feel free to try and find uh interesting uh pictures, sanki diagrams like that. And by the way, these uh uh intermediate uh assets that you go through often have uh arbitrage opportunities that deliver, you know, as part of the better price.
So that's uh one of the reasons that we help through different tokens. So as I mentioned aggregation is a big part of this and uh since uh we launched about three years ago we've been aggressively aggregating onchain liquidity uh currently on 16 chains and uh there are many different categories. This is just some categories that uh I picked. I'm sure you can break it into even smaller categories but it's a variety of uh different sources. DEX pools with constant product AMMs like unis swap v2.
There are concentrated liquidity sources, hybrid stable AMMs, weighted AMMs, RFQ sources uh which allow us to connect to off-chain liquidity and uh so that we can include offchains liquidity in an atomic route as well. So these are also very important and as chains uh you know faster and cheaper chains come up of course the centralized uh central limit order books clo are also becoming popular and uh this is are coming as well. So in order to provide this uh service and value, we need to be on top of aggregating all these liquidity sources into our optimization algorithm and uh make sure that of course the security uh aspect of it is also solid
and all of them have different strengths and weaknesses as you can imagine um from you know capital efficiency of course and uh some types are better for volatile versus stable and uh some are more complex in terms of um implementation. and gas cost. So there are many strengths and weaknesses but uh the value we bring is that by aggregating all these different types that you don't need to worry about these things. We basically you know uh make it easy for the users to deliver the best uh value in the end. Another thing I mentioned you know coming back to the travel analogy you know rewards loyalty rewards are important. Uh we also launched the rewards program, tokenized
rewards program to uh again uh bring users, give users back value when they keep using the same product. And uh currently more than 100,000 users have you know been claiming monthly rewards. These are basically cash backs almost that uh give you a part of your transaction fees that uh you incur for eligible um swaps. So I believe uh tokenized loyalty programs will continue to grow. I know that there's a lot of implementation in the industry and uh some are have been I think targeting mostly airdrops and rewards and not so much long-term loyalty but I believe the breakthrough will happen when you have alliances of um loyalty programs just like airlines and hotels and different
alliances because you know individual loyalty programs are uh sometimes difficult to justify. So if you're building a loyalty program in DeFi, you can also talk to us and see how we can partner. I'm also very happy to announce that uh we are launching a totally new um app design coming with great features uh based on all the user feedback in the past couple years and uh in this we are basically bringing multiple features that improve user experience and I'll break it into couple parts.
And uh one of them is uh wallet improved wallet connection. So believe it or not still the number one issues you know that we are facing emails and complaints from users is something about their wallet the type of wallet that they use and some kind of problem that result in a bad experience and they think that it's the autos website is broken or you know transaction you know had a problem but it's you know usually the wallets and we are improving it by partnering with dynamic uh and providing an embedded wallets and it's not only user experience improvement for savvy users But now onboarding uh users, firsttime users who are maybe going to create their first wallets using their uh Google, Twitter or Discord accounts and
just bring more people to DeFi. And I think that's our biggest challenge just bringing users from centralized exchanges to DeFi and let them you know step into DeFi um a lot easier and wallets are the gateways to all of these apps as you as you know. Another thing we worked on a lot on improving token selection because living in a multi-chain world and having assets on multiple chains and crosschain swaps this is really you know uh becoming a big problem like dealing with tens of thousands of tokens custom tokens. So we improved that selection worked on uh the user experience aspect and uh we'll provide a lot um an improved token selection interface uh very soon. Uh the
third one protection right uh def I think users are afraid of defi because again this is the second big complaint we get is because of uh slippage price impact and sometimes uh mistakes from users who adjust their slippage for some volatile token and they forget to change it back or um some other reason but uh this is a constant problem and causes users to lose a lot of money and um so we are we've uh come up with this product called protected mode which is the toggle of a switch. We guarantee the rate. So what you see is what you get.
Uh there's no like you know minimum amount or unknown slippage but it's the guaranteed rate. Gas is included and it's me protected. So it's all protected in one. So again we're protecting users and bringing hopefully users who are used to centralized exchange and just like have a very easy experience and get the amount you know exactly what they see on the screen and don't have uh failures. So more of course uh D5 native users advanced users can uh toggle off and adjust uh all the parameters they like and uh finally crosschains. So until now we've been uh doing this optimization in single chains and finally we are launching crosschains uh working with
the across protocol. We went through many different uh options as you can imagine. Unfortunately, there's no standard. There's no magic like one like solution that covers all the bridges. Uh this is the reality we are living in. But hopefully with this solution, what we aimed was uh making sure that the chain coverage that we support is there. And the latency we feel that you know waiting uh 10 minutes or many minutes is unacceptable especially if you're doing a crosschain swap and optimization. uh we would like to provide almost an instant um uh swap experience for users and hopefully we'll bring that to market and uh make a difference uh in this area and before this talk I was in an
interoperability panel actually and you know this was uh number one topic that came up crosschain and uh hopefully the new experience will um satisfy our users and finally um AI I assisted trading. So I'm very passionate about AI. Uh this was my expertise prior to you know uh getting into crypto and uh with the state-of-the-art there's a lot of opportunities and we are right now taking a conservative approach looking at more AI assistance uh not letting AI do things for you but assisting our users and uh trying different things.
One is uh real-time market intelligence uh providing more you know analysis and more you know information to users very quickly in the tip of their hands. Crosschain optimization again when a user comes and clueless about let's say the liquidity depth in a certain you know chain or for the asset they are swapping you providing insights for a cross-chain world I think is going to be really important and also automated transaction preparation. Imagine that you're you know you have a chat interface uh you're designing you're discussing your trait when everything finally is prepopulated in the interface and all the settings that you want and uh again this is a great opportunity for writing these uh current AI models and
finally personalized portfolio intelligence and agent that knows your portfolio your wallet contents and again making recommendations personalized to you and even remembering your history hopefully in the future. So this is a feature that is uh coming soon, not this uh new uh update that I mentioned with crosschains which is happening uh in a couple weeks. But this ODOS AI helper uh probably by the end of the summer is going to uh look like that a chat interface like you see when you want to do a swap providing you a little bit more information and uh giving you a final like a um basically an information about what you will receive the fees and even comparisons between different
options to guide users. So uh we'll see how this kind of language interfaces will evolve in DI. I'm sure you know that many projects and new projects are developing and thinking that you know language will be the normal you know way of uh interacting with protocols. I'm not sure yet but I think we want to give users the option and observe and see how they are using it what they are you know what are the benefits and of course security is always on top of mind for us and uh uh we'll make sure that we do this experimentation in a uh careful manner and I think my last slide here is again excitement about uh all the tokenizations that are going on this
weeks like Robin announcement about tokenized stocks uh I think was a big thing but you know remember we've been like swapping has been mainly about uh BTC eat and other al tokens of course stable coins meme token craziness still happening but more and more we are going into a you know tokenization of everything all assets kind of territory and what we are uh again emphasizing here is by tokenizing everything you're just like adding new nodes on that graph graph that I showed you at the beginning. So that graph is getting complicated with all kinds of different assets and you need a navigation tool.
Without navigation, you won't be able to get uh efficient results and inefficiencies will discourage people to come on chain. So navigation order routing for any tokenized asset. It could be real estate next time we're here. uh will be really essential and uh really currently a lot of people are not I think looking at aggregation and order routing as a fundamental u value proposition but uh more and more as this complexity happens you will see that you can't be in just like one silo and do your swap but uh you need aggregation tools and optimized order routing and uh we'd like to be you know building and continue to improve our solution in the
space and bring value to all our users And again, thanks for listening and coming here and would love to get your questions. [Applause] Uh thank you for the presentation. This is really good. I'm just curious how you're doing crosschain swaps uh in a single transaction and how do you handle estimates uh when it comes to gas slippage and things of this sort doesn't have to be comprehensive response but just curious. Yeah. Yeah. Unfortunately, it's not a single transaction right you
still have to uh bridge but across is basically a relayer based solution that uh basically you know market makers relayers are taking their risk. So what we do is we are swapping into a you know a stable asset and then in the destination chain from that stable asset to the final token. But I think the final end game is hopefully when you have shared sequencers and when you have true atomicity across chains we can do true you know routing across chains and with a unifiedity but we are not there yet. This is I think it's just a step in that direction.
Hi thanks for the presentation. Uh I'm curious about like the path selection. Um can you give a bit more insight like are you using traditional network flow algorithm to find like the the path within like the different swap or are you using like some specific customization uh for defy? Uh yeah for path optimization we are using our own algorithm uh that we developed. So it is uh again one of the you know you can call graph optimization algorithms but it's you know customized for this specific problem. I think you know uh as you know there are many different algorithms like modified dextra algorithms etc. We are not using it. We are using a gradient-based approach and going from a you know basically full graph and slowly pruning and approaching
to a you know final result but um yeah we have uh a patent application that you can read more about it um yeah I think there are more details if you want to see it there. Thank you. Thank you. Uh hi, thanks uh for the talk on math protection. Can you just expand a bit more? Um what methods do you use uh to enable this protection?
Um so for me protection so we are of course uh working with partners like in this case blocks route. Um but uh with the protected swap so we are basically using an intentbased solution and uh it's not um it's not like um external solvers. So in the protected swap it's basically we are the solver and when a quote request comes it's not public. So we are actually protecting users rather than uh broadcasting the swap they're providing and uh in of course order routing by you know splitting the order in many different chunks and doing this complex routing actually the opportunity of for me is really very little and uh
but of course you know private relayers are of course uh another protection layer that you can add on top here. Hello uh thank you very much for the talk. Um I wanted to know if the crosschain part is only integrated into the front end or do you have an API? An API will be coming soon as well. So yeah, we will support an API not currently but uh within a month it will be available. Yeah, thank you. Thank you so much again. Thanks for coming.
[Music] [Music]