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

Loading player…

Mobius V2 - Nested AMMs - Robert Leifke

Ethereum DenverSun, Oct 9, 2022, 12:00 AM

Transcript

yeah so my name is robert i'm one of the core contributors to mobius and mobius as of the past couple of weeks is the leading decks on uh ancelo yeah so um yeah so with that we've been actually able to gain a lot of user traction and for the past couple of uh really years and months you've seen that a ton of volume has been traded on shane through these amms so as we're going about designing mobius v2 we're really thinking about ways to push the boundaries of what a constant function market maker is supposed to be so to start off i'm going to give just a very high level overview of uh what constant function market makers are their their definitions and sort of the innovations that have been taking place so yeah what is a constant function market maker uh that is a great question if anybody was wondering uh so constant function market makers are effectively a subclass of automated market makers they're really cool in the sense that they use a trading function to to determine if a trade is accepted or denied a trading function the way i like to sort of formalize it is it's just a rule that is algorithmically programmed and then as you can see the trading function is effectively an aggregate of the reserves so a trade will be accepted or rejected based on the amount of reserves that are available in the pool and what makes constant function market makers so awesome and unique is that they provide really fantastic instant liquidity so so that trading function that a constant function market maker has is effectively the way to price your your assets so if if an automated market maker quotes a price and you accept it liquidity is provided instantaneously and then another really great reason why they're so successful on shane is because high fees have been really preventative for things like order books that are more capital efficient and more widely used in traditional finance so the the holy grail of a constant function market maker is the one that you see a lot with uh you know with ford projects but really implemented well by uniswap and that's the the constant product in verily variant uh it's effectively the holy grail as as you say it's super simplistic but it's deeply profound and there's been a lot of innovation around the constant product in variants but the constant product invariant is the the training function that allows for the the most variety of assets being traded it forms this really cool hyperbolic curve that lps can provide to and so that hyperbolic curve is essentially liquidity providers providing to a range of zero to infinity and then usually you only have two assets that's one of the limitations of a constant product curve but we'll kind of get into that a little bit later too so mobius as some of you might know is a stable swap exchange we use a stable swap invariant that was pioneered by ergoff so essentially what happens is it's this hybridization between the constant sum and constant product constant sum is really where the constant is the the sum of of x and y and then you have also a which is this amplification amplification coefficient that allows you to move the curve a little bit depending on the balance of the pool which is really really cool for things like large trades yeah so for for people that are interested in kind of seeing how this looks like you see the stable swap in variant is this a little bit more zoomed in hyperbolic curve whereas the unit swap invariant is this really beautiful hyperbolic curve that they still use today and then the constant price is just this straight linear curve so geometric mean market makers so this is another type of constant function market maker it's also a subclass balancer is the one that pioneered it to effectively create index funds they wanted to support multi-asset trades and they wanted to support more specific and customizable lp payoffs so they effectively created what is known as a geometric mean market maker i don't know how to add a summation in the google slides otherwise i would have done that but effectively you're adding weight vectors to to the trading function and that would be formalized by sort of a summation so lp and arbitrage dynamic that is probably one of the most important things with an automated market maker is you need to be able to balance out liquidity providers and arbitragers right you want arbitrage to effectively balance the price to some sort of reference price because that's really really important but then at the same time arbitrages take away from liquidity providers because they're effectively trading against the assets of liquidity providers so really really smart guy alex evans came out with a paper called optimal fees for geometric mean market makers where he kind of discusses this this dichotomy and ways to to figure out the optimal trading fee nested ms this is also one of the core innovations that i really really like this was essentially formalized by professor anthony zhang really cool guy by the way he essentially found a relationship between utility functions and economics and related that back to constant function market makers so as you can see the trading function is essentially an aggregate of utility functions uh this can support more multi-asset trades which is really cool so it's very similar to like uh to balancer in the sense and you know stable swap meta pools but uh it is a little bit more flexible which i really like and it's related to ces ces utility functions in economics for any econ whizzes out there at uniswap v3 so you know swap v3 is essentially concentrated liquidity it's probably where the majority of trading volume happens now on shane and that is essentially mimicking a pro rata order book so pro random sort of meaning price first execution and what's really cool is they essentially have these logarithmically spaced ticks on an constant product curve so they sort of compress them and you can simulate any sort of curve you want uh like a constant product market curve if you will or a constant sum curve or something like a stable swap invariant and this is really unique because you create this universal amm that dan robinson describes but you know there are limitations like uh non-fungible liquidity positions and and so on uh last and but not least you have replicating market makers so replicating market makers is an innovation formalized by garrosh and he essentially showed that you can construct any sort of trading function from a portfolio value function what that essentially means is you can replicate any type of payoff that you want as long as it's concave and and one thing that lambert showed who's a professor in physics is he was able to show that you can replicate a covered call by localizing uh two to one tick space and you know swap v3 so primitive finance is a replicating market maker that effectively is creating like a covered call strategy and if you can have a cover call strategy that's separate from you know swap v3 then you can all of the sudden entertain trading volume right like the arbitrage between them which is essentially allowing for better price discovery for things like derivatives and options which is really fantastic so when we're thinking about mobius v2 we're thinking about amms right and one thing that we're really excited about is this path to order book like amms now this is a bit controversial a lot of people are like you know let's have passive liquidity providing that's the innovation of amms but at the end of the day order books are more capital efficient and the assumption that we make at the mobius team is that active liquidity providers will beat passive liquidity providers in the long run so things like just in time liquidity and unit swap v3 is a really good indicator of that so but there are benefits to constant function market makers like you can better characterize lp payoffs the lp shares so the liquidity providing shares are highly composable with other applications uh things like that and so other questions that we we also have that are sort of open-ended and can be answered by anyone here can we have a nested amm that enables swaps of lp shares so uh of of things like if you have an automated market maker and that is essentially just pool of liquidity can that pool of liquidity be uh denominated by lp shares instead of tokens itself other open questions we have is how do we aggregate assets into a singular pool while reducing or keeping risk to a minimum like balancer right they have a multi-asset pool but with that there's more risk that is associated with it and then lastly can we mimic an order book but also specifically the type of execution model that an order book has order books use different execution models some have priority time execution models some have paretta execution models you know swap v3 specifically doing pro rata execution so lastly but not least and this is the thing that we're most excited about is mobius v2 and the essential idea philosophy and ambition that we have with mobius v2 is to really build this universal automated market maker right so the question that we're trying to answer from a research perspective is can we replicate a broader range of trading functions by localizing liquidity along a different curve so unit swap v3 is essentially localizing liquidity with their tick spaces on a constant product curve but that means that the type of trading functions that they can approximate for or simulate are really limited so you can't do things like time weighted uh automated market makers you can't do things like multi-asset pools and the really cool part about things like time weighted automated market makers is you can get into things like zero coupon bonds and more derivative instruments so if you are able to replicate a broader range of trading functions truly you know all types of automated market makers then perhaps you can really create this universal automated market maker that can be asset agnostic that can trade any sort of financial product and that is what we hope to do with mobius v2 and then potentially even launch to to other evm chains and and explore the multi chain world uh yeah that will that's pretty much it thanks guys happy to answer questions too uh afterwards

Automatic transcript — names and jargon may be misspelled.