CFMMs and Equivalence to Prediction Markets with Bo Waggoner | a16z crypto research talks
15 May 2023 · 1:12:35
Bo Waggoner argues that two kinds of automated market maker are formally equivalent: constant function market makers (CFMMs), built to facilitate trade, and the cost-function market makers that prediction markets use to elicit beliefs. Starting from a general model, he shows how four axioms, namely path independence, no dominated trades, liquidation and demand responsiveness, yield a CFMM with a concave increasing potential function. Replacing cash with a grand bundle of one unit of every security turns a prediction market cost function into a CFMM, a construction from risk measures runs the other way, and so convex CFMMs such as Uniswap carry a proper scoring rule. The main result makes the conversion one-homogeneous, so liquidity scales through the perspective transform.
Speakers
Topics
Transcript
so welcome everyone it's been a while but uh a16z crypto research seminars back for today uh very happy to introduce Beau Wagner professor at University of Colorado um telling us about his new work on off the press um about amm's and prediction markets and the connections between them so about all yours great thanks great so this is uh about a paper draft that's up on archives with Ralph in Manisha okay so luckily I think just about everyone's very familiar with the general setup of automated market makers so we have a single Market maker and every Trader is going to interact with that market or not with each other so sequentially over time
um not included in this picture because I won't talk about it today are some other participants in the market making ecosystem so liquidity providers which are people that provide funds to the market maker that they can use the trains um it's very interesting to think about that interaction but I'm not worrying about it today and then also any other Market that's happening that might have other prices that are different than this one that's also very interesting but also something I'm going to skip today so I'm just thinking about this very small closed system and rules for this Market maker just sort of on their on their on their own um okay so again I think I can skim through motivation pretty quickly and uh
so these automated market makers have been useful in blockchains recently um and also they've been historically useful for Designing prediction markets including prediction markets that you might run on blockchains um so it's good to think about how to design them and what I want to talk about today are reductions and the equivalences between prediction markets as they've been designed and thought about for I guess 20 years um and constant function market makers which have been used much more recently in blockchain um and one thing I'm very interested about my co-authors and I are interested in is designing for what you might call functionality of the market meaning like
facilitating trade that's like the point of running a CFM app um versus the point of a prediction Market which is to get information so how to criteria whatever when you have those two different goals or they seem to be the same to us so we'll talk about it um so first I'm going to recall constant function market makers and actually give you a result we have about sort of axiomatic characterization of those um there are others in the literature but um uh I'll tell you why ours is interesting and I want to spend a bit of time um recalling prediction markets and the theory of design of automated protection
markets and tell you what I think are the kind of most important things to know about that theory just as a kind of Crash Course quick tutorial and then uh finally get to Main results which are equivalence of the prediction Market world and cfmm World in some sense equivalence I'll tell you what that means yeah okay so before I talk about constant function Market anchors let me try to make this as general as a model as we could come up with for an automated Market maker so there's some set of n assets we assume they'll have non-negative value we'll talk a bit about why that
assumption why I want to highlight it um and you want to facilitate trade among those assets okay so what's a trade let's just say a trade is a vector in R to the n okay and it's the net increase of the market makers position so a positive number means the market maker gains some of that asset and a negative number in position I means the market maker is transferring on that to the trader absolutely convention on the sign of this sorry I keep saying a half percent being yeah my understanding is that in cfmms this is the more common convention whereas in predictive markets the negative is the more common convention um and yeah so we're trying to talk to
CFM and see posting we appreciate it yeah so um yeah so in general you would expect a trade to have some positive and some negative components because they're giving some things to the market maker in return for some other things um so what you might call a pricing rule or there are different terms for it but the rule that defines the market maker is some function from the history of trade so far to the set of Trades that it's willing to accept today for this round um yeah so that that's kind of what we think of as the most General way to define an automated Market maker so each round a Trader arrives they see
the set of valid trades or they know it because they know the definition of market makers they pick one of those traits they communicate the trade happens between them and the market maker and we repeat uh okay um some notation the market maker has some initial reserves Q zeros presumably all positive so some amount of each asset that they're starting with um and so their current reserves is the q0 plus the sum of all the trades let me just maybe this is not the right time for this question but here your pricing rules very general like any history to a set of Trades which are allowed I could imagine more restrictives that's like I can imagine pricing rules that depend only on the
current reserves right is there is the additional generality useful like are there interesting designs which are path dependent or uh yeah so we're going to nail down and cfmms very soon so we're going to say from this General design some axioms give you cfmx and so we're not going to end up using the generality okay but then we'll be able to say hey like anything in this space is satisfies the axioms actually has to be CSM so that's the point for us um path Independence is a great one because um we'll only talk about vanilla sort of models that satisfy path dependence I'll explain that
um but it's actually the most important to weaken in Practical terms because of things like charging transaction fees for people who know this that makes sense um yeah so it's nice to keep in mind the generality to know the space of things you could do yeah for sure thanks okay yeah so in general so from this hopefully very general design space you could ask you to do anything what should you do and by the way this axiomatic thing is kind of following like a common exercise in the prediction markets literature like write down axiom's character as your Market as
the only thing you could possibly want to do so that's what we're going to do here um okay so what is a cfmm constant function Market maker um so if you have this function Phi which we'd like to call the potential function um you accept a trade if I of your Reserves afterward is equal to the side of your research before so Q is your current Reserves R is the trade and you'll call that trade acceptable it's in your set of things you'll accept uh if and only if this equation satisfying why are you working potential function uh I guess I guess that came out of our thinking of on prediction
markets um but I can't remember why where we because to me it suggests you're going to be using some argument which you're probably not yeah it's not going to change yeah it's not really going to change over time but I think we're kind of thinking of different liquidity so the different values of it is different liquidity levels and that's probably why it sparked this in online yeah so I've seen uh you use the term bonding function I think in papers that seems that's like C-Max favorite you know I think that's invariants on variant functions [Music] yeah it's not going to change over the course of a single market so that might have been misleading
um okay yeah a primary example is the constant product Market maker which was used in unislot um which basically keeps the product of the quantities as a constant so two assets it's the square root of how many apples you have times how many arches you have that's probably everyone knows many people know it uh okay and so this is the picture that everyone draws for cfmms so your reserves a point in the space is your reserves number of apples comma number of oranges um and the red curve is a set of reserves that the cfmm considers valid
so the way cfmms in particular work there's a valid Reserves and a trade is valid If It Moves you from one valid Reserve to a different valid Reserve okay and let me just State this result that I alluded to so if and only if an automated Market satisfies a certain set of four accidents then it's a cfmm in particular for a concave increasing function five right and so this would be by the way the red curve would be the set for example of Q such that 5q equals for whatever the constant is right
okay so next I'll just walk through the axioms and explain them briefly verbally um but then try to you know skim through pretty fast because I think the rest of our results are more interesting and separately these are like precisely the cfmms one might think about in any way yeah so a lot of a lot of what I'm going to say today is on the cfms you're already thinking about anyways seem to be the right ones to think about and maybe just and reassuring ourselves to out of this large design space area we're currently exploring is kind of inevitable um and we don't seem to be missing anything because yeah actually this is what people do it's concave increasing
functions and I yeah some of this is just by convention and it's not necessarily like increasing concave increasing versus context decreasing you could do you could do those and they would give you the same set of things sorry I guess I can cavity gives you a computational benefit right okay concave and increasing you do the convex optimization type stuff but uh yeah but there's there's good Market reasons as well okay yeah which which we'll talk about it like you basically want incentives for arbitragers for example right or like that's one thing that's one property you could write down yeah which I think tends to force you to these kinds of properties yeah yeah we'll have a different name for it okay
I was going to ask about the increasing it seems that to be pedantic we would say it's equivalent to an increasing right because one level curve doesn't specify any restrictions on the actual function of two variables right so you could you could do any warping to those levels curves and and not have it be increasing but still maintain the the amm structure correct um probably correct I don't know about any possible working but you could definitely yeah um right so an important point that I should make more clear is uh we're going to say a market that satisfies things can be implemented as a
cfmm with a concave increasing function and as you're pointing out it could also be implemented as a cfmm with some other function as well thank you and maybe equipment yeah thanks for that point okay so path Independence we've mentioned so what that means is that it doesn't a sequence of traits that leads to the same Reserves as another sequence of Trades should have the same set of valid trades offered at that point in time um okay there are different ways to phrase path Independence but that's one of them so
you so one way to phrase a very strong way to phrase it is you should only depend on the current reserves not in the history this also Axiom comes up a lot the prediction markets literature one thing people can are concerned about there is um do you have an incentive to instead of just coming and make the trade that you want to make to break it up and first you need to trade and then you make a different trade and all of those add up to the trade you wanted to make but somehow you like made money along the way and you'd like to say there's no incentive to do that just come and squish that entire path into one trade and you get the same thing and I'm only going to Define these axioms out loud because again other things we want to get to but I
hope that's clear so path Independence is very much giving us this cfmms it's a big part of why you get the CFM structure which is there's a set of valid reserves and a valid trade is just moved to a valiant Reserve okay yeah okay um so no dominated trades says that for example if I offer to trade one orange for one apple I'm not going to also offer to trade one orange for half an apple because um the trader would always pick the second one they'd always say okay I'll just give you half an apple and I'll get an orange
so it's basically removing redundant offers from the set so it's kind of a for convenience um the nail down you could have a sub-level set of this Phi instead of just a level set and yeah so what you could picture here is uh if I shade in the upper right side of this those would be all the reserves that result from a dominated trade and from the trade no one would ever trade with you yeah so it's like you know you move to this Lower Blue Point but then the market maker gets an extra one unit of each thing for free you move out into this number right space so yeah in at least for mathematical convenience this is an easy
condition to add that just removes these redundant things but it's not a super big deal okay liquidation is very important uh the way we interpret this is you should be off allowing people to sell you anything they want to sell so if they want to get rid of things you should offer some price for those things um let me make that a little bit more formal so for any non-negative Vector which is the set of items the trader wants to sell to there should be some other non-negative Vector that you're willing to trade them in return the things that you're using to buy
actually stronger than that they should also just be the negative of the same Vector stronger than that so they should the trader should also be able to specify which assets they want and even in which proportions and you'll tell them how much of that you're going to give all right so just to keep it simple if I had two assets for whatever quantity of one asset someone wants to sell me I'm willing to offer him some non-zero quantity of the other okay so this would rule out things like uniswap V3 where you could run out of one of the okay yeah a better or a more complicated example is if I have n assets if someone says all right I have five of us at one three of us at four and so on we should be able to give them a
non-negative price in asset 27. or if they say I want asset 27 and asset 20 in proportion three to two we should be able to give them a non-negative price in that proportion it might be scaled very very far down we're only off ering Epsilon and three halves Epsilon but it should be something those are good well it's kind of what it means to be a market maker I guess is what our thinking was go ahead this might be sort of a strange question but like and and I guess you're probably gonna show us as you sort of explain the the characterization but how much does it really like is this sort of like an edge condition or or you know is it
basically continuous at zero um in this like liquidation ability like you know that you know that that amount of exchange can sort of like Trend arbitrarily close to zero or or is this really like does it need to be sort of a a really a truly strictly positive quantity if that makes any sense oh um I think we will allow you to offer zero for things in this proposition so I think um and Roth and Manisha can jump in if I'm misremembering but I think here we will actually allow you to there's a there's a funny contradiction that you get where if I offer you something non-zero and the price that you give me is zero then that trade is
actually dominated by giving you zero and getting zero that's right I see I think you are basically correct that it's an edge case and there are prediction markets like the sqcp or whatever it is um that you know the prices do hit zero one for Arrow to brew Securities yeah yeah I think it's not a big deal but it it did make the math nicer yeah yeah exactly it seems like that's just an edge condition that seems totally clean under that interpretation thanks awesome I have one more question for that um if I could ask um so um for this if you have
um many dimensions so let's say more than um free assets is this kind of um somehow stronger than uh specifying the exchange rate that you want because you you then specify the exchange rates of all assets that you want and right so whereas the scalar that you're offering essentially the trader is just just a scalar right so is it the case that I might go into a dominated trading in this sense so I I think are you asking about a liquidation where you can only uh say one asset that you want in exchange for your bundle so in a liquidation when um when my CFM has more than three assets then
essentially um specifying this year so me specifying a specific um bundle of assets that they want and the proportion of exchange rate they want for all assets um means that the shipment can only um can only give me a scaled version of that specific Vector that they specified right that's by by the Assumption um until then does this mean that um I might be led into doing a dominated trade in this in this specific case um so if you I mean I guess if you ask no I don't think so so for example if you offered one apple and said Pay me an
apples the market would have to give you one apple back it would have to be a net zero trade um so I don't I don't think this will ever like be me conflicting with no dominated trades but I may not have fully understood but yeah okay thanks yeah that's the best answer I think I can give um so demand responsiveness is an axiom that we've more or less borrowed from prediction markets and it means the price should go up as you demand more stuff so if you bought four apples for seven oranges and then you come back and buy four apples
um you should be paying eight oranges you shouldn't be paying them seven or fewer and that's really what's giving us concavity and if you look at this curve right so a gradient or tangent line is kind of the exchange rate at any point that you're at and you can see you know as you move in One Direction the gradient moves in that direction so um if I have as a market maker if I have fewer apples more oranges apples become more expensive or just become less expensive just continuity of some form an existence of marginal prices arise
from yeah it does um so concave functions are continuous in the interior of their domain which here is pretty much more or less the whole Space so continuity arises in a way that's not super obvious I think demand responsiveness is important there and liquidation is very important because it says liquidation kind of said there is a price for every constraint size yeah which gives you a function um what about the derivatives the marginal prices existing uh yeah not necessarily and then we're going to talk about that in prediction Market or yeah and so and so if you drop any of the four
like none of these are redundant I assume you showed yeah right so if you drop demand responsiveness you should be able to get a CFM that might not be concave um if you drop path Independence then you can do something totally different at one step in a previous step dropping no dominated trades might not change that much really because again it just says you have to either stay online or move up into the right um although with past Independence that might cause problems because you don't want to move back down so yeah actually I'm not sure but it might be worth kind of you know it might be nice to just be specific about which axioms force you
to have a CFM yeah which is forcing increase on this which is forcing concavity yeah so those drivers are clear yeah we can do a little bit of that in the paper um particularly for CFM but it's hard to nail down exactly what a CFM characterizes because it's actually such a really Broad that's you know any the output of any algorithm has to stay constant any algorithm of Q is actually just a really weird space so yeah we we have only a little bit toward what you're saying so I'm gonna say oh yes important so um the proposition I just quoted for you is kind of fixing one level set of fine
um if you want to extend multiple level sets um the result can extend but we can only show and we think it's only true that Phi would be quasi necessarily quasi-concave um this that's a technical version of concave that I think I'll just skip defining but I want to mention um it might not necessarily be true that it's concave as far as we can tell we might not it might be possible to satisfy all of these axioms at each level set but the level sets don't stitch together into a concave function levels only on the classic concave function and that's something that um we need we're clarifying for the next
verse graph the distinction between one level set and stitching together and then but not super important for the talk um yeah so I want to go to prediction markets next now that I've introduced the FMS um oh yeah so um there are other papers talking about axioms and cfms and the authors of those papers won't find a lot surprising here I think you know our axioms are a bit different technically what's different is um starting with that General automated Market in King framework and deriving cfmms as a consequence of vaccines most of these will look these papers will look more uh if I have a CFM what further that seems don't want to says satisfy
not super important but just wanted to mention okay prediction markets so I love prediction markets and I want to spend some time telling you about them um which is against the same literature not new stuff yet um okay so we're looking at prediction markets um for just a probability distribution over an event Okay so there's an event now with n outcomes and it's it's going to be nice that n is the same as the previous n assets so there are any things that could happen for example in competitors in a race one of them will win um so what you do is you create
Securities where security eye pays a dollar it's competitor on wins the race and it pays zero otherwise so your value for that security is presumably the probability that you think competitors and the market valuation for all the Securities should form a probability distribution over the fact so we're going to run an automated Market it's the same general framework that I mentioned earlier with n plus one assets where the last asset is cash or let's say US dollars and so this I'm describing how a lot of prediction markets are are set up so do you have the last Dash set or do they
just because you can trade all in right I could call the Grand bundle right yeah so we're going to use that trick okay but um but usually to find out what the cash outside yeah yeah it's you and it's it does make some difference so usually it's defined with um cash is very important because you charge for these Securities in terms of cash so you really need this the way people talk about it needs this new mirror right which is you know what is the price of security eye the prices in terms of US dollars whereas with with the tension with cfmms is that there's no numerator necessarily there's no special asset um but yeah we're going to use the trick you mentioned that's like the key
is going to be the key point um okay and so you just want to design this automated Market to elicit the Market's beliefs so you want to get these prices to reflect what the market believes about the probabilities of these outcomes and a priori that seems like a different design goal than just facilitating trade among these assets um but it's interesting that we're going to end up with something that looks like it was designed to facilitate trading based assets um Okay so prediction markets are based on um turning out to be convex cost functions and of course you know when we learned about cfmms we saw these concave
you know cfmm functions that we know about these convex cost functions and we just felt it couldn't be complete you know there had to be a technical connection not just an analogy so that's what we were looking for um the way it works is um I'll accept any uh proposed trade from the trader um and charge them in terms of the N assets so this could be a positive or negative factor I'm going to charge them according to this function C so Q is my current reserves of the just the N assets the N securities and I'm going to charge them the difference between C of Q Plus R after they've traded and C of q9 reserves before they traded
you have a question for both in the security Market sure I think of these functions defined on the non-negative board set or all of our uh yeah that's a good question so for cfmms non-negative or think here all of RN okay um that's I won't exactly hit that point but it will come back up too yeah so in prediction Market selling short is built in and so I can hold a negative amount of the assets and the trader can um sell short or buy assets and yeah so the the market can uh yeah can't hold negative numbers of the assets so C needs to be defined
everywhere um okay and when C is convex and satisfies a condition called one's invarian this is equivalent to something you may have heard of which is a proper scoring rule based Market prediction Market um okay I need to Define some stuff so one's invariant means that uh if you add any um multiple of the ones Vector all ones one one one then the function goes up by that same multiple additively excuse me so for example if I add four units of one one one one as my Vector r
C goes up by four plus four if I add seven units of the vector one one one C goes up by plus seven like a no Arbitrage yeah so the reason is um that this this bundle one of every asset its valuation is exactly one dollar because one of those n assets will pay off one the rest will pay off zero so evaluation is always a dollar so if I offer to trade it I should always be paying exactly one dollar for it yeah yeah um okay so I'm not going to Define proper scoring rules but I will mention them a few times so they're just functions that take in a prediction and
produce a score such that they're truthful people want to predict truthfully so Henson created prediction markets with these elicitation functions proper scoring rules so he basically said each person comes in and they predict truthfully to a proper scoring Rule and they get paid the difference in their score between their prediction and the next person's um what's kind of amazing is there's a one-to-one correspondence between Hanson's proper scoring rule prediction markets and these cost function markets for the difference between their prediction on the previous prediction right not the next prediction uh yeah that that was a mistake so um yeah so in the scoring rule Market
there's a previous prediction someone made you make the next one you paid your score minus their score um and the connection is via convex Duality which I'm going to show a picture of that I'm not going to explain technically so people seen it well now um but yeah it's it's very non-obvious I think that this is true but it is um yeah um the other point about this is you can you can use that fact just to prove that these cost function markets characterize truthful path independent prediction records so path Independence pretty much means
the set of the trading function the scoring rule is the same at every time set uh and so when you add that into the requirement that the prediction Market should be truthful this is all that's left you take a convex lens and variant cost function it actually should satisfy a couple other things we'll talk about and you use it in this way and that's the only thing you can do that's truthful and path and bearing and we're going to leverage or we're going to conceptually leverage that so if you want to do elicitation in some sense you have to do this that's my claim okay so I want to do some drawings
um not just words so this is a picture of how people like to draw cost functions um so here I'm isolating One Security out of the N possible ones and the horizontal axis is how much I've sold of that security reserves is actually to the left more reserves is to the left because I've sold less of it this is where the convention difference comes in so if we zoom in if my current reserves were q and then I sell a little bit to move to Q Prime the amount that the trader has to pay is this vertical purple bit here because we
moved from Q to Q Prime so they have to pay C of Q Prime minus C of Q so they have to pay this little vertical difference you can see that the tangent lines are giving the instantaneous price of buying one more unit of this asset right so it's an approximation to how much you have to pay okay so now I want to show a couple pictures that illustrate in prediction markets how Market making properties like properties of how the market Works follow from convex function and properties um and in doing that I'm going to again assert this connection to a scoring rule
so um or every scoring rule which I'm drawing is a convex function on the left um this generates the scoring rule its conjugate is the convex function that gives you the cost function and so you can design a market by designing either one of these two complex functions okay so and the key connection is that the slope in the scoring rule is going to give you the point on the axis of the cost function and the point is going to give you the slope so in this example at p is one half this is a probability between zero and one
the slope of the scoring rule is zero at Q equals zero the slope which is the price is one half so uh and this is the same kind of drawing that I just gave but showing you what happens in the scoring world world so the price moved from 0.5 to 0.51 when I made that trade and Q moved from you know 0 to 0.2 or whatever okay so now that we know this we can think about how design will influence properties of the market
and okay if um you miss a little bit of the next couple sides it's not a big deal we'll come back to cfms after that but um one has to do with the okay so we're not at existence of prices yet so what what happens if this convex function has a king in it so really what this means is it's not differentiable at this point there are multiple tangent lines there's no one derivative well in the conjugate a in the first function corresponds to a flat section in the conjugate what's a flat section mean what's happening in the market
there's a flat section in the cost price isn't increasing as you trade more the price is not responding to quantity yeah so if if you buy from here to here your price is given by the slope and the price is just not responding it's not the worst thing in the world but it's also not what we really expect we expect to get at least some response we would want to be approaching flat if you have lots of liquidity meaning that prices aren't going to change much as you sell a lot buy or sell lots and lots but you probably don't want to be exactly the front so it's probably nice if your scoring rule function is differentiable now let's do the opposite property so if your scoring rule has a flat
section that's not strictly convex for some reason it has the opposite effect there's a kink in the tops function and the Kink means press jumps yeah so the um sort of here there's no instantaneous price there's multiple sort of um but one way to think about it is the price is jumping so as I'm approaching it from the left and buying more and more the price is going to a half and then all of a sudden to buy the next amount I sort of need a a cash quantity because the price is now suddenly 0.6 so again something you probably don't
want so you probably want um your scoring will be strictly context not so strictly comebacks differentiable they're nice things anyway but they're not just mathematical convenience they're having impact on the market the structure of the market um another thing I want to mention is the slope um so as we go left in the scoring rule picture this is uh the negative of the entropy function which is the lmsr market if you've heard of it this slope is actually going to infinity or negative Infinity as p goes to zero as the so in the cost function world as the price or the slope
in the cost function well it goes to zero the quantity goes to negative Infinity that's a good thing on the right side as the amount sold goes positive Infinity the slope is going to one and that's also a good thing so the most you should ever pay for this now 71 um and as the amount sold goes to Infinity the price is going to go to one because people keep demanding it let me Zoom back out to show it to see that yeah so this slope is going to one so you can control this slope by controlling the domain of scoring Rule and Ross mentioned earlier if used something called The Briar Spore
which uses a quadratic these slopes actually don't go to minus infinity and infinity they actually go to whatever one or two at the boundaries and that means that this Market is going to actually reach a price of zero or one and after that the price will stay at one or it'll stay at zero so depending on if you want that behavior maybe you should choose a function that's a pseudo barrier which has slopes going to minus infinity okay one more liquidity so liquidity is I think of it as how fast that the price change as you sell more and more
um that's one interpretation anyway and the scoring rule world it's very easy to add liquidity you just multiply this function by say a hundred and now basically um a purchase of the same amount of money is going to change the price much less but what that does in the cost function world is a little non-obvious and it's called the perspective transform so it turns into 100 times C of Q over 100.
a way to see that something funny has to happen here if you just multiplied the cost function by 100 the slope would be like 100 instead of one so it's clear that you can't just scale up the cost function by 100 and expect it to work because now you have prices of a hundred and it turns out this is this perspective transform is the right thing this convex analysis just tells you the Dual of 100 times G is this one okay so we're going to come back to that at the end if I'm not already out of time doing good so that's the end of
Market design and convex analysis after this I'll talk about our actual results connecting the two all right let's see the results okay um yes again you know the results are what you're doing now is the right thing to be doing so I'm not trying to set you up for a big surprise but let's see them Okay so uh the first kind of equivalence um is there are reductions between the space of cost functions like the convex and ones and variant function C and cfms with uh concave and increasing potential function but such that the automated markets that the
first one implements and the second one implements are the same uh when I say they're the same this needs explanation because they're in different settings so what what do I mean that they're the same um and in particular prediction markets I assume that there's this numerator cache and that's how you price things um and assets prediction markets only work for well I've defined them for Aero degree of Securities these indicator function securities so I'm saying that you can use that to price any assets at all that's a little bit odd
but I'm going to explain this by just showing you the forward direction of the proof and that'll explain the sense in which uh prediction Market can be turned into a CFM and then I'll mention the reverse Direction do you have a kind of like a verbal interpretation of this is this basically saying these um Market markets made by these market makers are in effect organizing a process of prediction predicting the eventual value of all the different individuals um you know Assets in them or something is that the right intuition yeah so the way I think about the elicitation intuition is um if you're in CFM World Imagine that everyone has a
valuation for the Securities in their head yeah and imagine that there's I'm trying to elicit an aggregate Market valuation yep yeah so it is sort of it like everyone is trying to jointly discover the aggregate Market valuation yeah and and this is like a prediction problem in the sense that they're all trying to realize what that market value or like what the settle to Market valuation will be at the end of some time period in some sense yeah and then of course the big difference is that uh prediction Market at the end you find out that just one of these assets has value and the rest are worthless right and see it in the CFM you never sort of find out although
Maybe uh you know an event happens and you realize that this asset is worthless now so it's maybe not that different fun but yeah yeah I've always thought of the zero one thing at the end of the prediction Market as basically just being sort of being being less interesting right like a prediction Market doesn't actually require that there be a day on which the information is actually finally realized it just means that like in the limit at Infinity this thing converges to the probability that the thing actually would happen and so in that interpretation it feels to me like this is actually like very close and that like the price here is sort of the the market realized into probability of uh you know sort of yeah agreed agree yes and then with and
what this is saying is that the rules or how to adapt those prices yep are the same between these like the things that have been come up with some semi-independently I really useful yeah this is really extremely intuitive and and very cool like I could feel it changing the way I think about cfms in my head like this this is super cool thanks awesome yeah yeah I think elicitation is that we should think about everything so without that's what I want to push but maybe tomorrow after you think about it you'll change your mind so we'll see well the question is what's the probability that we're going to be thinking about them all in terms of elicitation in the limit you know like you know and years from now um we should we should all take bets on
that and update our bets based on this uh based on this talk anyhow sorry go ahead yeah good so I think that's all I need to say before I show you what do I mean like how does this so let's let's do that um actually uh samak already mentioned the trick the key trick so remember they're in a prediction Market I'm going to start with the prediction Market there's these n Securities and then cash so there's n plus one assets but it's an over determined system because this bundle of one of each of the securities is always equal in value to one unit of cash and everyone agrees on that like no matter what they think money is worth no matter what they think
the probabilities are they agree so it's over determined um so we would call the cashless prediction Market the one where you follow the rules of the prediction Market but you never use cash and anytime you're going to use cash you just use units of the all ones Vector of securities what we call the Grand bundle um so for any r that the trader wants to purchase which can include positive or negative components um and it's only an R to the end it's a bundle of the securities uh we'll say if you say R the trade that you're going to actually make is R minus Alpha times the ones Vector the grand
bundle where Alpha is the cost you would have paid in cash so so again just this trick of just simulate the prediction Market but every time you would have said cash just give people one of every security okay and in fact this is already a cfnm um and pieces of this you can find pieces of this in like 10 and panic 2007 which is a constant utility market makers um of course cfmms didn't quite exist if they did they might have made the full connection already but um yeah so
this is already a CFM um I'm still kind of surprised but if you just look at ones in variants do you you get it you approve it so let me say a little bit more what I mean um so the allowable Trader of the form uh R minus Alpha ones so I'm going to look at my position as a market maker after that legal trade ones in variance says that c of stuff minus Alpha ones is equal to C of stuff minus Alpha in this case Alpha is CF stuff
minus C of Q and so I just end up with C of Q so um you uh in your earlier slide you pointed out there's a connection with risk models yeah there's something very close where you have a set of acceptable portfolios and the risk of a portfolio is how much cash do I put into yeah so where does that line up here uh yeah I think I don't know that the the technical meat is the same like and Financial Risk measures are usually one variant because of this right and so we're using actually next I'm going to use it even more the constructions that they use the technical meet is the same
but maybe the modeling is not is not the same as that way yeah I don't know if this idea of cashlessness comes up there like this idea of moving to a world where cash is replaced by the grand bundle I don't know that that ever I mean it's possible it's not that weird an idea so it might come up there I think in that literature your input is like okay so your input would be there's n scenarios and maybe they have probabilities or whatever yeah and um your uh your input is how much money do I gain or lose in each scenario right right and um because they're exhausted and mutually exclusive if you gain exactly a dollar in every scenario that's got to be worth a dollar today right exactly but maybe they don't explicitly say that
okay I mean that's definitely why they use ones in the variants so I definitely say what you said yeah okay yeah um and Ross knows more about this than me but I don't know if there's anything more to say about why the claim that we're approving with this one line is related to what they're doing but yeah the next one's a bit more um so that's the sense in which this oh so it's a CFM it's a with a convex um potential function but if you want to get concave increasing you can just negate the function and negate the inside you'll end up with a cfmm with electronic potential function does that make sense so um
if you use c as a potential function you could also use minus c as a potential function that would give you the same level six oh the same two yeah and it's kind of good okay okay let me ask you another question I sort of feel like um having read through your paper earlier and just looking at the earlier literature if you the equivalent cost function to let's say a constant product Market is something with square roots and stuff right yeah so if you do that you're not going to get Phi is not going to be a product or a geometric mean or whatever right you should be able to produce uniswap in this way starting from
the correct the correct cost function okay um we've only done it backwards but it must work I could be wrong about that yeah the um if I think about Phi there's many different fines that capture the same Market yeah right um does c have that degree of flexibility also like there must be if it's if you go back and forth right are there many different cities which would give you the same prices for all trades and no sure so one important difference is um Phi has many level sets to behave differently and C is only equivalent to one of those level sets Okay um and we're going to talk about more about that later okay other than that though I think it's I think that's the
probably up to it yeah I think I have also one question here so I get I guess um the equivalence that they're saying um the scene the equivalence of the prediction Market will have some dependence on um which level curve of the statement we're referring to yes right yes and then if we have that then the five that's produced by this um this rule that you have in the last line here this will also depend on K right and so then if I want to take the level set curves of that exactly the same K to to obtain the reverse side of the equivalence right is
there some intention to why this should be the case and like why you should not be able to take other levels at curves or the for the same score I think so and I think I'm going to show you some pictures that that ex that gives some insight into that so can I ask you to ask me again uh after a few more pictures of course thank you all right let me just quickly say this other direction and then there's really just one more main result that I want to State before the end the other direction is given a Phi from a CFM it's concave and increasing and given a particular level set that you're on or a q naught initial Reserves we can create a cost function
using this kind of weird looking construction that the picture illustrates but is really not that important to the talk that comes from risk measures and this is a convex one and variant function and the set of Trades is equivalent up to cashlessness so anything that the original cfmm is offering as a valid trade the cost function is going to offer that as a valid trade plus any sort of conversions of ones vectors to cash okay okay let me try to speed through a couple comments and show that picture and then we can kind of have any extra time for Q a
um okay so should you use this to turn prediction markets into cfmlins no because of a picture I'm going to show we're going to fix the there's a problem and we're going to fix the problem you can use it to turn cfms into prediction markets as commented so the constant product Market if you work it out for two assets you get this expression okay but if I take negative of that and if I take minus C of minus Q I don't get the original thing right yeah I I think you must get something who's level set matches this particular is it different and it's going to be different in all the other levels that's actually yeah I think it relates to my question actually you need to have the same concept well isn't it isn't it the case that one is
one invariant and one is one homogeneous and so that you're just going to run into you're just not gonna be able to do that yeah yeah and that's exactly what we're pointing to so I'm not going to expand on your comment but yet um okay so let me just say that this expression actually appeared in 2007 in Shannon penix paper they weren't doing cfmms but they got this from if you have a lot of utility and you have a uniform Distribution on outcomes and you try to trade so as to keep that utility constant right just one half log plus one half log is the same as the square root of the product being constant and so that they actually already derived this okay so in some ways um up to the
exact axioms utility-based prediction markets are the same as uh cfms yeah well yeah and one homogeneity becomes interesting here because okay yeah but yeah the part we thought was coolest is to Scott's coming earlier this implies that uniswap has a scoring rule proper scoring rule associated with it which is pretty cool and any convex cfmm is going to have a proper scoring rule yeah that's so slick yeah yeah and and it's actually known it's very rare but it is a known scoring rule um so yeah uh let me just leave this here for a second show that picture and then conclude that at approximately time
um yeah okay let me explain this so cfmms don't quite elicit valuations the way that prediction markets elicit probability distributions because if I think ethereum is worth one dollar and Bitcoin 10 you think ethereum is worth a thousand in Bitcoin a thousand we can still trade at a ratio of ten to one and no one can tell those beliefs so you can't distinguish that but other than that you could really say that it's an elicitation problem for ratios of validations okay so this is the problem did our prediction Market equivalents construction produces these um these kinds of level sets which are
ones in varying but that's not what cfmns should look like they should look one whom oh they also do this which you really don't want to do it's going to the negatives but they should look right so the picture so the red the red level set is what you applied your construction to and then you're saying these blue ones are the sort of implied ones if you yeah okay yeah sorry so I started with a cost function which is lmsr yeah and I applied it and one particular level set it produces this red one yeah but if you look at all the level sets it produces then all the blue ones too so one level set looks reasonable but the collection does not and if you want to change liquidity levels you want to be able to do that
so as someone mentioned that the correct property is one homogeneity and basically you can fix our construction to be one homogeneous instead that's that's the main result of this the second main result one whom engineering means basically um that every level set is a scaled version of the other sort of scaled from the origin out so I'll say in the interest of time so the behavior out here is just a scaled version of the behavior down here that really means you have more liquidity so this is what you want your classroom your uh cfms to look like and we can even prove something like any concave one homogeneous increasing
Theory defining it implicitly yeah we kind of had to make this weird definition in order to convert any c into a but yeah I'm sorry I don't have time to properly explain why this is this works but okay so maybe one thing to note is that it happens to implicitly give you the perspective transform I don't know if you were gonna make that yeah but yeah yeah sorry so we talked earlier about how it's scoring rules use the way to scale it up the proper way is the perspective transform and that's that's what's Happening Here okay so let me stop there I guess that's
actually okay you can do this with lmsr it's interesting let me stop on this uh conclusion slide and let people go take questions from anyone who can stay thank you so I think if we can go back to this Slide the second construction that you had the second main result that you know yeah this one over here um so um this theorem as I see it means essentially that I can um essentially Define the private corresponds to the scoring rule I can just take the alpha s5q substitute into the season so this um this equation right
um but then um if I do that I want the five that's resulting from that um have also some uh dependence on this this alpha or the K rather that's implicit in the scoring rule C that corresponds to the scoring rule so essentially because C has a k um a k dependent Simplicity in it um then does this mean that the five will also have a k dependence on it that results from um from this procedure over here so now finally if you start with unit swap you get the cost function from it and then you apply this construction back
indeed you do get all of you know swab so that it doesn't have a dependence on K anymore because as you scale you'll get the other K values back is that is that the question yes um yeah yeah that that's what I was asking so so you're saying since the five that I get even though C has has an implicit K dependence the Phi that I get from solving this equation won't have a okay dependence right and and like it's basically because uniswap is one homogeneous and it suffices to just specify one of the level curves and then one homogeneity well
um uniquely fill in the others so that's basically why it you can recover it yeah thank you oh I said I I was just going to say there are a couple things of open directions I could mention if there's time but um other should take questions instead I think since we're in the Q and I personally have time so yeah tell us yeah okay curious um so uh extending connections that prediction markets already have to cfms probably could be cool one is on online no regret learning so it turns out that this famous multitative weights algorithm is basically equivalent to the lmsr
um prediction Market um where basically the time interval is shrinking to zero you're sort of adapting in real time to trades and in general these Follow the regularized Leader learning algorithms which are very natural things to try to use for Market making or Trading are equivalent to cost function prediction records so you should be able to trace that through and say that a CFM is using no regret learning to price things that'd be a cool result to actually have but I'm pretty hopeful um another thing prediction markets do are they work with assets with negative values all the time and they're very you can extend prediction markets as
I've presented them to deal with assets that people value as negative so like options that people agree have a negative value you can price those um and as Tim mentioned at the beginning we think of cfms in the positive like well okay these things are related like holding positive quantities of things that have positive value I wonder how much of that though is uh um imposed by the blockchain right because there's no credit and you know so on right as opposed to being fundamental to the mathematics of the yeah um like for example you could you could have uh you know if it was implemented like let's say at a bank and they're extending you credit they could allow you to hold negative positions or
whatever right yeah but um so yeah it's it seems like it shouldn't be a barrier but all the pictures we draw like clearly stay in the positive orphan no matter what and they all assume this sort of trade-off that's like if I have more apples I should have less oranges but if orange is not negative value this whole picture is wrong right so it might be easy to do but it's I think there's something proper to do um prediction markets we love combinatorial markets so um it becomes about sort of efficiently approximating what you would have done if you wrote down the whole Space that could be interesting um and when you do that this idea of
Arbitrage reduction becomes interesting so um the logistics for the combinatorial markets the idea there would be in prediction markets it's easy to have markets over these end things you have the scoring rules whatever if I want to write down a cfmm curve for n assets it's not clear sort of uh yeah I just I just thought of at least porting techniques from that it's not necessarily easy for prediction records either but it's something people did think about and write papers about yeah like the log Market scoring rule has this unique property that um orthogonal markets are kind of orthogonal like you can resolve some while keeping the rest going and you
don't have to recalculate stuff so maybe you should use lmsr instead of uniswap but um maybe fruitful so what do you mean by Arbitrage reduction in dislike yeah so when prediction Market people say Arbitrage they really mean a chance within the market itself to make trades over time that guarantee you to make money when CFM people talk about Arbitrage they're talking about they're correcting the price right between different markets like this Market has this price this Market has this price so in this case I mean the prediction Market one which is uh if I have a bunch of assets like some of
them are options on other ones or um their relationships that I know then the prices should reflect those relationships for example one's invariant yeah yeah so um if anything that's like over determined where um like for example uh I have um in my prediction Market I have a security that pays off if like a team with a red jersey wins well if you sum up the product the prices of all the teams with red jerseys that should equal the price of that security can you make that in as a hard constraint so that people just don't make money arbitraging those things can you actually Force the market to adjust to trade so that this is always a hard
constraint and kind of bake it into the pressing role I have one more question um so initially um can you go back to the slide where you had the the hungering the perspective transform um as the example yes this one um so I'd like to ask something here um essentially um how does the how does this perspective transform for um for the cost function prediction Market um relate to the ground bundle the One Security environment essentially for the um bacteria your function C must satisfy like is there some relation between these two are they completely unrelated um this uh
this fact the perspective transform fact which is if I scale the Primal convex function by 100 the Dual of that new scaled function is 100 times the old function of Q over 100. so that's a fact about convex conjugates and that's more General than um that's like all convex functions and they're conjugate that have conjugates um so it doesn't need one's invariance which is that fact yeah um so they're completely unrelated essentially um no no yeah the ones in variance is really just coming from the fact that the
scoring rule is defined on the probability simplex yeah um yeah but I was gonna slip in this this comment I forgot to mention that um it is interesting that I think someone made a comment maybe it was you Jason that um you know you get a scoring rule from unit swap but it like depends on K it's particularly nice when you look at the perspective transform because each level set of uniswap is literally the same scoring rule just scaled up so you don't even have a complex kind of transform when you look at it as a scoring rule yes that b so it's just the same exact scoring rule but scaled up by
a b which is especially nice oh that's cool that's that's very nice um but um but still that means that the file will still depend on the B right like that does not I guess guarantee that there won't be a dependence of the buy that's resolving from the procedure um on B right or is it B would be the um geometric mean say of the current Reserves and and there will be a dependence so maybe this will be helpful um if you start with this outermost blue curve and
you turn that in uh turn that into a scoring rule that scoring rule will have a higher B factor and it'll have more liquidity if you turn that back into a CFM what will happen is we'll first get this one curve and then we'll get the one homogeneous sort of extension of that curve which is this same station so whichever curve you start with you do end up with a different scoring rule because it's scaled but then you come back and you come back to that same level set but then one homogeneity make ensures that you get the same thing everywhere did that help Jason I hope so
yeah um although I do um I mean correct me if I'm wrong but I I do think that if I if I plug in there the C that depends on the B and then I solve in terms of the the alpha um then I think I think the health I'm going to get is going to be the the square root of q1 Q2 divided by B right so I say I think this is the this is the alpha that I'm going to get from solving this equation so I cannot really see how this is independent of the of the piece but we can take this offline if that's easier
yeah I don't think I know what you're asking and I think I ran into this when I was it also confused me but somehow yeah so you could think about it um actually Bo could you go to the level the one with the parallel level sets so like if you if if you choose a different one of these level sets and then you take the one homogeneous extension you will get a different function so part of the magic is that it turns out from our first construction the zero level set is always the right one so that if you take the one homogeneous extension you get back the same function but if you weren't careful about that you're right that you know if you choose
a different level set of the cost function then you'll get a different function and you might have some dependents and throughout this procedure if you're if you're taking the whole class of function then the whole classifying is going to have the correct correspondence but I think the curves one to one won't have the correct response I think this is this is what's going on here um but as you're saying if I take the whole class then by one homogenic that's that's going to be I'm fine essentially um but yeah I think that's um yeah I think that's very interesting and thank you for giving your your viewpoint thanks so much everyone um and thanks for Ralph and Manisha Secaucus
and yeah we'll see you next week