DAPPCON 2024: HOT - An MEV Aware AMM Design - Raphael Mankopf

DappCon 2024 · May 2024 · 23:24

Raphael Mankopf presents HOT, an MEV-aware automated market maker design, at DappCon 2024, covering how an AMM can be designed with awareness of the value block producers can extract by reordering trades around it. The talk covers what MEV-aware design changes for liquidity providers and traders.

Speakers

Topics

From DappCon 2024, hosted by Dappcon Berlin.

Transcript

thanks everyone for joining in and attending the talk I'm Rafael I'm leading product and growth at araus ARA is a decentralized market making protocol and today I'm here to talk to you about hot hot amm which is an me over design for new amm uh orak has designed this amm with uh valunas together in corporation and we will will be launching this uh new type of a DEX very soon so this is really exciting for us today this the first talk public talk about uh Hot and Hot was is a creation that is a reaction on what we observe in the

entire onchain trading and we do a lot of research we look a lot at order flow and one thing that we noticed in the last month and yeah sort of like the last year is this increasing importance of private market makers and they are capturing more and more of the intent order flow and with heart we want to react to this and provide an alternative source of liquidity but before we jump into hot I want to go back and actually yeah start at the beginning why are we trading on chain like if you want to trade digital assets you have three different op options basically you can trade them on

a centralized exchange you can trade them on a decentralized exchange and you can trade them on so-called hybrid exchange so with regards if you look there in these three uh worlds if you look at the different dimensions liquidity trade settlement custody and Market making what we notice is when it comes to liquidity decent a centralized exchange has offchain Central limit order books where takers and makers uh meet each other and it's all settled offchain with hybrid exchanges we've seen many different forms but it's mainly still offchain Central limit order books some sort of like solver auction relatively new uh designs there

that have come up and we see the decentralized exchanges where we have a liquidity pool so acal LP providing liquidity with regards to trade settlement we see that centralized exchanges they settle all the trades offchain hybrid exchanges and decentralized exchanges they settle them on chain in custody uh we see the soall Omnibus Wallets on centralized exchanges but then we actually have self custody for Traders on hybrid exchange and with things happening in 2022 with FTX self custody becoming really important so sort of like those hybrid exchanges and decentralized exchanges have been come

more favorable for Traders for us as a market maker the rackers the market making side is really important and we see that in a centralized exchange there's centralized market makers so all the parties also providing the maker quotes and the audit book they all centralized well then in a hybrid exchange we still in many cases see a centralized maker like a solver which is a centralized party but we actually have a decentralized taker and then you have the dexs WHERE actually both the liquidity provider the maker and the taker both of them are decentralized and with hot we try to bring in the best of the Two Worlds of a DEX and of a hybrid exchange and actually bring them together and try to

overcome the weaknesses of an amm so looking a little bit back at the history of amm what is actually the objective of an amm here we have two objectives mainly one is price Discovery so actually finding the right price for the asset and this is largely Happening by an arbitrageur coming in and bringing in outside price information most likely from a centralized exchange and updating the so-called stale price in uh the amm and at the other side is bringing in liquidity from all sort of liquidity providers and actually centralizing this liquidity so that you and me also as

retail participants can provide liquidity but also institutional liquidity providers can come in and give liquidity to the market so the evolution of the um automated Market maker so the amm has seen different forms of basically math behind the scenes and an amm started off with this constant function amm this means you have x * yal k x is the amount of asset asset uh one asset and and uh Y is the amount of the other asset and then this is always equal to K so those sort of like where the initial like Unis swap uh developments like anything

around Unis swap V1 Unis swap V2 where you basically provide liquidity from zero to Infinity also called like a uniform uh un uniform liquidity distribution and providing liquidity from zero to Infinity for almost all assets is not really efficient because you provide liquidity in price ranges where there's no trading activity happening so another concept was developed called concentrated liquidity amm and univ V3 was one of the first ones launching this where you actually provide liquidity in a specific range so you can provide liquidity ac across certain price ranges and then you can

rebalance those ranges to have more form of a concentrated liquidity and this is much more Capital efficient however still as an a liquidity provider in a concentrated liquidity amm you face the so-called term impermanent loss or lvr so if the inventory that you provide basically changes in price there volatility you sort you have to face some sort of loss and you have to make sure that your trading fees are actually larger than this loss so a lot of new amm designs and new Dex designs try to reduce the so-called LV are and also hot goes into that direction so resuming again the

motivation for change we're coming from this constant product amm where we really had like a inefficient Capital allocation and we're moving towards the right to get actually more Capital efficiency so the motivation between constant product to move to concentrated liquidity is really to like get active liquidity and now the liquidity providers actually have nonf funable positions in like a constant product amm usually the all the liquidity providers have like the the same position while now in a concentrated liquidity amm everyone has their own specified liquidity position uh in the amm and then all the new amm designs we've seen

recently and cfop I see the guys there uh thanks for joining it's it's basically one of the designs but there are many more um designs and uh I want to spend the rest of the talk basically to go over hot and explain more why hot amm like hybrid order type amm is a solution for this so hot amm has three main objectives first objective is lvr protection so we're trying to protect the liquidity providers we are an RFQ orderflow we still want to preserve this permissionless trustless Dex design and provide the traditional swap amm for mainly targeted at retail Traders so

that everyone can come in and trade at hot and then we have this permissioned araus quoting service that actually enables Dynamic fee updates so these are where the three main objectives when designing hot amm looking behind the scenes what happens in h is that on the one side we have this solver type order flow so this comes via flash flash swaps and actually brings in like um solvers quot competing for quotes So solvers come in and compete for prices and they bring in price updates and updates to our Dynamic

fee schedule and at the same time it brings in the benefit that um the the entire like LPS in the pool get additional nonto toxic order flow because to be a solver on hot you have to be a trusted party so not everyone it's basically a permissioned uh order flow and then at the same time we still have a regular amm design very similar to concentrated liquidity where retail essentially be receives better amm prices because solvers are competing for prices and they're frequently updating and our objective is that in an amm no longer orbit Treasures are updating the

price but solvers competing for Price updates uh and bringing in the best information are up updating then the amm uh stale price and at the same time we introduce Dynamic fees that protect LPS from lvr because with the time in the block and amm are limited by the block time we basically increase the fees for swaps and thereby at the beginning we can bring in rather low fees but then they're increasing and we create this dynamically Rising no trade zone essentially trying to avoid Arbitrage being profitable looking at these Dynamic fees

and uh there's a really nice graph there on the left I hope you can can see it and it's not too small but it basically shows on the uh x-axis the time and then you have the price on uh the Y AIS and then basically the line lines that are drawn there that's the that's the price the stale price in the amm and then you have the centralized Exchange price moving but every time this line sort of breaks this is uh when the price is updated this is when a solver comes in and quotes a new price and at the same time like you have the block times on the xaxis we can actually update um always the price on top of the block so

this means the longer we are without an update the longer we're waiting for another solver coming in updating the price the higher is the dynamic fee and that means that we're trying to capture yeah this Arbitrage and reduce the Arbitrage possible you can see in some situations there will still be Arbitrage possible so if the centralized Exchange price goes out of this no trade zone then actually there will be Arbitrage and therefore we're trying to minimize it and ENT like if you look at the equation on the right we want to protect LPS by always ensuring in in as many cases as possible that the trading fee is actually larger than the difference

in prices between a centralized exchange and a decentralized exchange by having this feature we actually able that in on average the minimum hot trading fee is likely to be lower than the regular amm fee because an AM am traditional amm just quotes like a standard fee for all retail flow while here in hot we can actually have Dynamic fees and we only quote higher fees if it's really necessary to protect against Arbitrage this was a really brief yeah excurse on hot uh we haven't launched yet we will be launching this soon we're

really excited about this obviously it's only one attempt to solve this problem there many more um but I'd like to summarize our perspective on the entire Market from the research we're doing and we think that the market will move towards many different Dex designs like while the past has been rather like we started off with this uniform liquidity mve to concentrated liquidity and now sort of we are breaking out of this by many people finding different ways of Designing better amm we think the different solutions Dynamic fees is a very good solution to protect against Arbitrage but you can also for example integrate offchain price information

like bringing in uh information from Central exchanges various ways to do this um we also think request for quote so like actually this entire solver Searcher type quoting mechanism is really a way a good way to to solve problems in the amm space and it means is essentially that you have to discriminate Traders and Order flow to make sure that you avoid toxic order flow reaching your liquidity and in protocol auctions are also likely yeah uh where possibility that you can choose or a way to choose um to avoid um yeah

Arbitrage oh no flip too quickly um quickly talking about araus so you might know araus this automated liquidity manager uh but Iraq is is more than uh this Iraq is a decentralized permissionless onchain market maker we focus on two uh sectors on the one hand we building out infrastructure so we're an infrastructure protocol hot amm is one of the uh solutions that we or products that we will be launching to the market soon and we try to bring in Innovation to the entire Dex and Market making uh sphere at the same time we're serving algorithmic strategies to our clients being the Dows and Labs um and

teams raising um money via tokens launching tokens but also providing a sustainable uh liquidity providing uh strategies so that marks the end I'm happy to take any questions uh up front and yeah thanks for attending and yeah hope you get get excited about hot then feel free to follow Ras at Finance on uh yeah Twitter and telegram we will be posting update soon there's also our research paper about hot amm was released a couple of weeks ago so uh if you want to dive into detail um the paper is public you can read up on uh this

[Applause] thank you for the talk uh what part of the benefit of your uh protocol comes from uh things like the dynamic pricing versus stuff that you cannot do without basically being uh hybrid in a way so the Hybrid part is really the solver orderflow so interacting with trusted parties which are permissioned to access liquidity and that brings in the price information and sort of segregates the

order flow and we can make sure that from solvers we only get non-toxic order flow for updating our prices so this is really for bringing in price updates instead of relying on arbitragers we want to rely on sols to update the price the dynamic fees is a measure of reducing Arbitrage while we're waiting for the next solver to give us this new price update I terms Quan basically it's hard to quantify before you launch it I would say um let's see um

yeah like we will we will be launching this soon and then we can definitely measure this but right now to it would be pure guas I would say um if there's only um your hot um amm for a specific uh liquidity source is it possible that it basically gets stuck because if the fees increase for trading on the pool there's like and it's the only liquidity Source could it be that nobody is like incentivized to like settle any arbitr like um trades for for a specific token for example good thought

um I mean essentially would need to have a solver coming in to provide price updates if we solely rely on this otherwise the price would basically stay there and then the fees would be would be increasing I think hot really is a solution first for like more liquid assets and we're not planning to launch like tokens which are very IL liquid and not trading elsewh I think in initially we will be starting with tokens that are yeah more common and tradable at other venues so would you I'm not sure if you try to you know project or throw some

numbers at it but would you then expect the dynamic fee increase to then ultimately benefit liquidity providers as um up sh come in and try to bring the price of equium in to the model and is that the intention then to benefit LPS over users yeah so the intent is to benefit LPS by you have this increasing P fees on the traditional amm and thereby it gets less and less profitable for someone take exploiting this and doing actually an Arbitrage because this amm like the right side in in the diagram is actually

permissionless everyone can come and everyone can orb into this pool so you have Dynamic fees while we're still stuck with a stale price people could come in and actually AR the pool um because we have to wait until a solver reaches our uh liquidity and provides this new price update and then actually can reset the fees because with a solver we have a trusted party where we know this is actually the true price from an external venue and thereby like we aim at increasing the noow trade zone so that actually no toxic order flow can reach our liquidity but at the same time obviously also compensate the liquidity should someone come in and actually

trade against the liquidity Yeah question regarding the user perspective um like if the fees are Dynamic would there and there these large no trade uh zones how you call them uh would there be like longer times where it doesn't make sense for a user to trade on on hot decks and uh rather use let's say a DEX aggregator um because otherwise you would always need to um keep track of the dynamic prices and prices somewhere

else and you may get a very bad deal because the um no trade zone is quite big so ideally from a user perspective you come via intent based trading and then you have a solver basically filling your trade that's the one side if you interact with the amm sort of like obviously the fees will be rising so it makes sense you can then quote also like what price you want to settle against and then you basically can trade after an update right so you can weight and in an Ideal World these updates will be very frequent so ideally we get an update from a solver every few blocks

and then you we will not reach this territory where prices or like where the trading fees are actually surpassing an traditional amm uh fee it's just like this traditional am cannot react with its prices so it basically needs to charge a certain price and you see like more volatile pairs being on like higher Fe tiers than like Sable tokens or uh St like stake packed assets and there you already have lower fee tiers for us what we want to achieve is that the average trading fee that the user like the retail user gets is actually below below a traditional amm yeah makes makes sense thanks thank

you um with uh unisoft at the moment um if there's a fixed amount of liquidity as the price moves the depth changes is that the same with this design or as the price is updated all the liquidity just for say one of the assets stays at the same depth or does the depth change it's going to be the same so the traditional amm for accessible for everyone like the permission l amm that's going to be a concentrated liquidity amm and then part this liquidity is also accessible for

solvers so we have sort of like the sovereignity where you can think of like it's a sort of like a pool with a hook where a solware can come in and actually also access this liquidity where um the competition of different solvers actually quoting for the best price and bringing in updates so so as The Silver updates the price they're not actually taking assets out of the poll it's just a like an oracle okay yeah exactly so they're trading against this liquidity by competing for the liquidity okay cool thanks cool awesome thank you very much

[Applause]