# Fair combinatorial auction for trade intents: how to design mechanisms without a num... | Devcon SEA

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2025-10-09
- Duration: 26:39
- Topics: Science & Technology
- Watch: https://streameth.org/watch/yt-Y0ix2IuIJGk
- YouTube: https://www.youtube.com/watch?v=Y0ix2IuIJGk

## Description

When designing mechanisms on the blockchain, there may be no single asset that can be used to reallocate the benefits of participating in the mechanism among its participants. Hence, the designer cannot separately address achieving an objective and sharing the resulting gains, as the objective affects how/whether these gains can be shared. This raises fairness concerns. We discuss the relevance of this issue for trade intent auctions and propose a novel mechanism: the fair combinatorial auction.

Speaker(s): Andrea Canidio
Skill level: Intermediate
Track: Cryptoeconomics
Keywords: Mechanism design, Intents, research

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum, https://warpcast.com/devcon
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon SEA was held in Bangkok, Thailand on Nov 12 - Nov 15, 2024.
Devcon is organized and presented by the Ethereum Foundation. To find out more, please visit https://ethereum.foundation/

## Transcript

[Music] hello everyone all right so uh yeah today I'd like to discuss with you a new uh auction design that uh we plan to implement at C protocol um and a little bit of uh kind of the thinking process behind it so how did we get to this specific auction design uh which has to do with the fact that you know uh blockchain is an environment where there may not be a numer and of course I explain what it is uh in a second all right so many talks uh that has to do with defi um start by saying okay look we have all this mechanism from traditional Finance but they don't necessarily quite apply to our environment because say you know in the context of blockchain transaction can be reordered uh and therefore we have M uh I'm going to follow similar template but I'm not going to focus so much on The Usual Suspects uh and instead focus on a different element which is the absence of a numer a first of all what is a numer a a numer a is an asset that in your Market or in your mechanism your environment you can assume that everybody likes and is happy to receive and can be used to Share value between people okay now of chain there is usually a numer in the environments you consider if we want to look at Financial Market well typically all stocks are traded against the national currency so the national currency is the num rare uh a possible ex ex exception could be Forex Market um where people exchange National currencies but when you look carefully that's not quite an exception in my opinion because first of all there are very few assets exchanged and then uh essentially the vast majority of these trades is anyway settled against the US dollar so it's even in that environment there is of theoretically there's no numer rare anybody may be demanding different asset and exchanging any to any currency for any currency really most of the volume goes through the dollar anyway now on chain things are very different uh there may be specific concept environments where you can assume that there is a numer rare but I think in generally this is not you know it may not be the case um because we have Anonymous participants that could live anywhere in the world in when you look at financial markets on chain people may want to swap any asset for any other asset and there are like thousands I don't know if there is a number out there I know that uh uh cow swap in its history has traded more than 11,000 different tokens so there are at least that many different tokens on chain at the moment and probably even more uh which makes it very different than any uh kind of the Forex Mar for market for example Al because here what matter is not the number of tokens is the number of token pairs so that kind of blows up the complexity of the problem so why does this matter because uh the numer a and the absence of the numer a uh determines how easy it is for people to share the benefit of collaborations okay this is something that we know from a branch of Game Theory called Cooperative Game Theory which is the branch of game theory that has nothing to do with auction in fact uh but it turns out that it also matters when you're designing certain type of autions such as trade intent auctions now what is a trade intent a Trad intent is uh essentially an order uh in which a user specifies a sell token and a buy token and might specify also a limit price or a slipage tolerance and then it delegates to another uh agent a solver uh the exact execution of that order and this is done in the context of an auction where solvers are going to propose prices for each order for the different orders um and let's say know this the details are important but for the moment let's just say that the solver that proposes the best price wins the auction and then has the right to complete this order and actually execute it on chain okay now this is an environment where uh you know you can have separate auction for different trading tend okay an order come in you run an auction another order comes in you run an auction and this is how protocol like 1in fusion and Unis swop X work however there are typically additional efficiencies when order are executed together this could be in the form of Coincidence of ones maybe people can trade directly with each other without really having to access an external Market it could be in the form of gas savings uh Coincidence of on can also arise is intermediate hop of Trades anyway generally you can squeeze out additional efficiencies by executing trades together but of course it the problem becomes in which assets those tradition those efficiencies materialize maybe it's extra e because it's gas gas savings maybe it's something else but then not everybody may actually want the asset uh in which those uh efficiencies are actually generated and the question becomes then you know is it how do you share those extra efficiency if it's in an asset that not everybody is demanding okay and then yeah then the question becomes while do you want to execute the two order togethers even if there are efficiency because you cannot really share them and if you do then what is a fair share of this extra efficiency these are the type of question that motivated our research paper that I wrote with a colleague cow swap called uh Felix H where we build a theoretical mathematical model of this uh type of auctions we use this model to compare the two most common auction formats which is batch auction and separate individual auctions and then we use uh the model to then St propose and study a new auction format would be called the the fair combinatorial auction which if you want I'll get in the detail later but it's a kind of a merge between a batch auction and uh kind of indiv having separate individual trade auctions and you know this is a bit like cooking the say you're putting two things together whether it you generate something with nice property or not kind of depends on how you do it and it turns out that you know if you do it in a specific way um this Fair combinator auction can actually provide strong fairness guarantees so you have a notion of fairness that has to do with how the efficiency from batching are shared uh and that the auction can guarantee if you do it some other ways you have absolutely no benefit of doing this now for today's discussion I'll just give you a high level discussion of the two most commonly used auction formats for Trad intense and I will discuss then the fair combinatorial auction in the case where it does provide fairness guarantees okay but knowing that if you change the design you should know that maybe it does not provide any fairness guarantee anymore and the QR code here is the link to the paper if you want to kind of dig into the mathematical details and the additional results there all right and by the way to reiterate this is something that we are planning to implement at cow protocol so we you this will be live at some point uh in the next few months all right so let me start with how things are done currently coud protocol C protocol run a batch auction that works in the following way and apologies for the bit primitive kind of Graphics here so there are user that come in and submit orders these orders are added to an order book and uh at time intervals which correspond to the closing of a batch uh we the the auction starts and solvers can bid on groups of orders or even individual orders that are uh on the order book okay solvers may be somewhat specialized in certain type of order so they don't need to be on the exact same order and however they are they can submit a single solution uh and which here can be a collection of orders with prices for those orders now they then send the propos prices for the orders that they want to execute and then uh the auctioner uh ranks this propos Al by the total value return to user we have a concept called Surplus but for today this is you know you just can think of it as just really the total value of the asset return to users this requires some price feeds of course because you know one order may want to buy Doge the other order may want to buy something else and Sol is might propose different execution if you want to be able to compare them sometimes you need to have a price me a price that allows you to rank those solution okay and okay there is one winner and this one winner goes and execute the solution on chain and the other solers okay they are losers they don't get anything right this is the batch auction there are a number of additional rules for example uniform clearing prices you know if you have the same token pairs in the batch then the the the same so all Traders trading on the same token pair on the same batch must have the same price but for today's discussion this is not too important okay so yeah so this is a summary of what I just said now compare this with what other people are doing um uh the other people essentially running uh trade by trade Dutch auction the fact that this a Dutch auction is not too important but this is really just separate auctions for each trade that comes in okay and just to give you some numbers if uh these markets handles about more than $5 billion of value each month uh I think bit three of them is like cap C protocol so goes through the batch aution mechanism and the remaining part is split with this the other two so the remaining part is executed using this individual Dutch auctions all right what are the pro and cons of each mechanism now obviously B auctions are better at exploiting whatever complementarities and additional efficiencies there are when you get to execute multiple traits together Coincidence of what gas saving so on and so forth precisely because a solver has the view of the entire order book and can actually in the solving logic start thinking oh look if I take this order and this order and disorder maybe I can make a ring trade example this is not possible to do if you have separate auctions now uh but on the other hand if you have separate auction there is a there is a benefit there because you can allocate different order to different solvers even order that are received at the same time so say that you have a type of order for which one solver is very good another type of order for which another solver is very good you can you can specialize you can give one order to one guy the other order to the other guy but in a batch auction you always have one solver winning potentially multiple trades so it's harder to exploit this benefit from solver specialization now batch auction this is we show in the paper and it was know maybe you need the mathematical model for that but one result is that the batch auction is better at generating competition with between solvers because again if you have somewhat specialized solvers and run this individual auctions on each on one auction of per trade then really just the solvers that are good at that trade will compete okay you have a subset of the solver in each auction essentially where the batch auction forces everybody to compete with everybody else so there is a higher competition between solver and more value return to the user in General on batch auctions and on the negative side like in batch auction can be unfair if you're not careful let's put it this way because in the vanilla bat auction you are just ranking solution based on this total value and you're kind of oblivious to the feather perhaps you know yeah this total value is very high but one guy is getting a pretty shitty deal and another guy instead is getting a great deal and maybe that's not something that you want okay you aggregate everything and you are not you don't see it now the way this is currently uh handled at cow protocol is through a thing that we called ebbo essentially we have a uh um a routing algorithm uh that checks after the fact uh whether the execution of each order was better than our own routing algorithm and if it is not uh we call up the solver we tell him off and we ask him to reimburse the user for this kind of ebbo violation and the hope is that then they will be more careful in how they actually split the benefit of of of this so how they allocate uh value between the user this is time consuming uh it is a vector of centralization we'd like to be more decentralized and also from a more like game theoretic mechanis design perspective it uses information available to us so it's our uh uh routing algorithm but the experts here are the solvers so we are building this reference for fairness from our information but we are not the most informed party here the solvers are the experts so we'd like to instead build a mechanism that elicits this reference for fairness from the solver themselves yeah and therefore you know each mechanism has its Pro and cons uh and therefore this really begs the question can we really think of a third type of mechanism where a you might have in equilibrium either batching or specialization so it leaves open the possibility of having batching or specialization depending on what is the most efficient thing to do in that context uh it generate competition between solvers and has a notion of fairness so you can Define fairness and say okay the outcome here is fair and this is the new this is exactly the fair the the fair combinatorial option it works in the following way uh first it's a combinatorial aution so it allows multiple bids per solver so solver here can submit a single solver can submit say a bid for order one which is how many tokens I'm willing to return if I only win win order one a a bid for order two a bid for order three but also a batch bit say okay but if you give me the three orders together I can generate so many token for the first guy so many token for the second guy so so many token for the third guy so this is a multiple bits per solver and then the important step here is a filtering of batched bids where what you do is the following you first consider only bids on individual orders okay and then you ask yourself well suppose I have uh really separate auctions one for each orders and those are the bids for in that auctions and say that the auction is in first price how many tokens this guy would have received okay this is then the reference for fairness okay because you say well you know if I was really to just have a first price auction on order one with the bids that I got order one would have receed that and you use this and repeat for every order and you use this reference to filter out batch bids whenever uh the batch bids propose an execution that is worth for at least one Trader relative to this fairness benchmark right and then what then at the end you have some surviving batch bits batch bits that were not filtered out and you have a bunch of individual trade bids and you want to recompose a solution with multiple bids uh in a way that maximizes an objective for example total value that you return to the users if this was fast let me bring back the great graphics I had earlier here I have two solvers um and importantly they are allowed to submit multiple bids in this example solver one has uh uh so each solver here has three individual bids okay uh solver one sends one individual bid on on the green order uh and individual bid on the yellow order and one on the red order this says I'm willing to return to the green Order X many token if I only win that order similarly solver two sends some individual bids and then in the example each solver sends one batched bids which contains a collection of orders okay and typically the amount returned in the batch bids uh for the same order might be different than the amount return in case the solver wins only that order then you construct your reference outcome as I said if the auction is first price essentially you always want to just take the maximum of the individual bids okay that's the reference outcome you use the reference outcome to do the filtering so you say okay in this batched bids is any of those bid uh H value lower than what the guy would receive if I was to consider this outcome instead and in this example let's say that the first be the batch B from the first solver survived this filtering so it's fair quote unquote relative to this reference while the batch bid of the second solver does not uh perhaps I don't know in the yellow order what solver two proposes here here is worse than what the order yellow order will receive if you just looked at the individual bids so it's filtered out and then finally you have this is the composition of the winner the you have the comp the the the the solver one's batch bid together with solver two individual bid on the purple order okay that's how you reaggregate everything in the end now there are this is a new type of auction so you really need to study okay and it sounds maybe good in practice but then you really need to be careful in what is the uh the Strategic consideration that uh solvers are going to make when bidding in this auction and therefore what is the equilibrium that you expect to emerge now in terms of strategic consideration there are two important things first if you compare bidding on these individual uh trades here to Simply Having separate auction per trade period here there is a higher incentive to bids in the individual trades bids because you anticipate that the way you bid on the individual trade will be used to determine the reference for fairness and might end up kicking up your opponent batched bid as unfair so typically you want a bit higher in this individual bid than you will do in the standard like simultaneous auctions at the same time you might be lower here in the bat bid like lower value um than in a standard batch auction precisely because if you expect the other guys batch bat to be kicked out as unfair then you don't need to be that high because you think there's going to be less competition the composition of these two effects generates an equilibrium that uh in which you have fairness guarantees meaning that in equilibrium each Soul So Sol has always return strictly more to the Traders than in if you had done a a standard uh kind of simultaneous first price auction this separate auction so it's always better for every everybody than having the individual options you may get batching or specialization depending on the relative benefit it could be that different solver wins different order or one solver wins a collection of order depending on which is more efficient and it is however true that there is if the equilibrium is batching the winning solver might return less to the Traders than in the batch auction so in a sense the takeaway is that this auction format generates fairness guarantees but this is sometimes at the expense of the total value return to the user which you think about it makes sense because here if you just wanted to maximize total value you should just do a batch auction here instead you are introducing a second element fairness and of course the second element means that sometimes you're trading off a bit like on the total value you are generating so to summarize and conclude uh trading tent auction are cool and they the future like this is a short time to say that they really at the center of many of the discussion we are having in this few days there a center of discussion about me there are a center of discussion about liquidity fragmentation uh now there is this extension to cross chain that is slowly materializing so it's also the center of the discussion about uh kind of chain abstraction and all that so the really kind of very important element I think in in in Defi and blockchain in general usually there are efficiencies from batching but of course then how do you share this efficiency it's not obvious that are fairness is a is a concern and uh here is a proposed solution the fair combin Al auction which hopefully should be live in a few months thank you thanks that was a very meaty talk and we have equally meaty questions um in the current version of cowap why do solvers make bids on subsets of pending orders and not on all in one batch at once is it possible for a solver to make multiple bids right now so I mean uh uh I don't know if it's technically possible but it doesn't really make a lot of sense right now because anyway there going to be a single solution chosen so if a solver comes up with multiple possibility it should just return the one possibility that generates the highest value because that's how the auction will R rank all the solutions okay um the next question is uh is this model scalable you have true raised to n possible batches each time can solvers manage the Lo EXC excellent question so there is a general question about Comal aution of this thing called winner determination problem so the computational complexity of the problem can expand a lot now this is why I said uh uh here the important part is the from the auctioner is the filtering part okay so you want to remove some of B some bids from the auction based on this fairness arguments um which on the one end should make the the the determining the winner easier okay because you have fewer bits to work with in the recomposition stage um and it's also somewhat orthogonal in exactly how you want to do it you can use some horis to determine you know the collection of bids that wins uh which might not be the exact Optimum but it's easy to calculate and this is similarly with the with the with the solvers of course there is a theoretical Optimum that uh you know make require a lot of time to calculate uh and in the same way as Auctioneer will use some shortcuts to you know make everything manageable H solver should should come up with some Shortcut as well uh your auction doesn't seem incentive compatible so the first price is not a good measure of fairness fids could also bid non monono I I disagree so I can assure you this is not uh Na research that is a 30 page paper with all the proofs um so unless this is scientific compatible in some nonobvious way but in terms of uh deriving the optimal bids the best responses in the equilibrium I can assure you everything is is there and and Sh can solvers pretend to be users and game the batch er er uh so this is an excellent question that doesn't quite apply to the theoretic to the discussion I had uh it's true that uh it applies to another aspect of a cow swap um batch option which is that now there are solvers receive rewards from the protocol because of these rewards it it could be the case uh there are attack Vector such as the one discussed here but in a sense I didn't discuss rewards so let may not bring up uh this thing now does it make sense to decentralize the auctions behind cow are you working in this direction so it makes sense and we are working in this direction how will you order different solver Solutions in one batch so actually yes so you could have um it's a tricky problem um because obviously the first solution gets an Advantage when executed in a sense um yeah so the problem is that a solver sub Sol observes the state on chain and then submit a solution then you know next block it goes and execute uh the solution but then other thing happens before the solution is executed that might actually change the state of the blockchain for example the liquidity available in am uh and make the solution proposed not executable anymore or more costly than expected blah blah blah so in a sense there are zillions of things that might happen from the moment where you think of your solution and when the moment you execute it which means that you need to be kind of conservative okay when you propose a solution and now you need to be a little bit more conservative because among the zillions things that may happen when you before you submit your solution there is a zum plus one which is another solver also submitting his solution so yes it introduces some additional risk for a solver in an environment that is already fairly risky and so yeah just general advice is to solve it be conservative anticipate that things might change from the moment where you choose your solution and the moment where you execute Your solution is there a public record for historical ebbo H ebbo prices or ebbo violations uh ebo prices I don't think so ebbo violation is an excellent question uh these are onchain transfer done by solver just to a user a bit out of a context of a of a of a batch so this is for sure recoverable somehow but I don't know if there is a like easy to access uh repository or like data that one could be but um so we are out of time uh but there are at least like four more questions that I can see um it is lunch break now so um you can easily go and talk to Andrea as well um but it was a really meaty talk and we all appreciated and uh thanks all right thank you very much [Music] so we'll be back in uh 1 hour at 2:30 so another three talks this is the me room for anyone
