The Best of Both Worlds:
Asymptotically Efficient Mechanisms with
a Guarantee on the Expected GainsFromTrade
Abstract
The seminal impossibility result of Myerson and Satterthwaite (1983) states that for bilateral trade, there is no mechanism that is individually rational (IR), incentive compatible (IC), weakly budget balanced, and efficient. This has led followup work on twosided trade settings to weaken the efficiency requirement and consider approximately efficient simple mechanisms, while still demanding the other properties. The current stateoftheart of such mechanisms for twosided markets can be categorized as giving one (but not both) of the following two types of approximation guarantees on the gains from trade: a constant exante guarantee, measured with respect to the secondbest efficiency benchmark, or an asymptotically optimal expost guarantee, measured with respect to the firstbest efficiency benchmark. Here the secondbest efficiency benchmark refers to the highest gains from trade attainable by any IR, IC and weakly budget balanced mechanism, while the firstbest efficiency benchmark refers to the maximum gains from trade (attainable by the VCG mechanism, which is not weakly budget balanced).
In this paper, we construct simple mechanisms for doubleauction and matching markets that simultaneously achieve both types of guarantees: these are expost IR, Bayesian IC, and expost weakly budget balanced mechanisms that 1) exante guarantee a constant fraction of the gains from trade of the secondbest, and 2) expost guarantee a realizationdependent fraction of the gains from trade of the firstbest, such that this realizationdependent fraction converges to (full efficiency) as the market grows large.
1 Introduction
In a twosided trade setting, some agents (sellers) are endowed with items, while other agents (buyers) are interested in purchasing items. Each seller has a cost for parting with her item, and each buyer has a value for obtaining an item. In such settings, a mechanism designer may wish to create a mechanism that ensures that the items end up belonging to the agents (whether buyers or sellers) that value them the most. An important property of such a mechanism is being budget balanced, that is, not running a deficit for the mechanism designer.
The seminal impossibility result of Myerson and Satterthwaite (1983) shows that for bilateraltrade, that is, for the setting where a single seller wishes to sell a single item to a single buyer, there is no mechanism that is individually rational (IR), incentive compatible (IC), weakly budget balanced (BB) and efficient (i.e., maximizes welfare).^{1}^{1}1In particular, note that the VCG mechanism, while being IR, dominantstrategy incentive compatible, and efficient, has a budget deficit. This impossibility result clearly extends from the special case of bilateral trade to any twosided trade setting.
In light of the above impossibility result, followup work in the twosided trade literature has looked at IR, IC, and BB mechanisms that are approximately efficient, rather than precisely efficient. Two definitions of approximate efficiency have emerged: on the one hand, approximately maximizing welfare^{2}^{2}2These papers consider the cost of a seller as a value for keeping the item rather than a cost for parting with the item, so the notrade welfare is the cost (or rather value) of the seller, while the posttrade welfare (if trade occurs) is the value of the buyer. (Blumrosen and Dobzinski, 2016; ColiniBaldeschi et al., 2016, 2017), and on the other hand, approximately maximizing the gains from trade (GFT), that is, the increase in total welfare due to the trade (McAfee, 1992; Babaioff et al., 2009; Blumrosen and Mizrahi, 2016; Dütting et al., 2017; Brustle et al., 2017). This paper discusses the latter, more challenging benchmark.^{3}^{3}3While maximizing the gains from trade coincides with maximizing welfare, obtaining a constant approximation to the optimal gains from trade is considerably more demanding than obtaining a constant approximation to the optimal welfare. Consider, for instance, a buyer who values an item by dollars and a seller whose value for keeping the item is dollars. The optimal welfare (of ), and the optimal gains from trade (of ), are both obtained by having the seller trade with the buyer. While not trading results in a welfare of (a fraction of the optimal welfare), it results in zero gains from trade. The current stateoftheart mechanisms in the literature can be categorized as giving one of two guarantees:

A constant exante guarantee, measured with respect to the “secondbest” efficiency benchmark, that is, the (possibly very complex) mechanism obtaining the highest expected GFT of any IR and IC mechanism that is weakly budget balanced, or

An asymptotically optimal expost guarantee, measured with respect to the “firstbest” efficiency benchmark, that is, the mechanism obtaining full efficiency (VCG).
In this paper, we aim to construct simple mechanisms that simultaneously achieve both guarantees. We study settings in which each seller is endowed with precisely one item, all items are identical, and each buyer is interested in buying one item. In the doubleauction setting, any seller can trade with any buyer, while in the more general matching setting, trade between some buyerseller pairs is disallowed. Before describing our results, we first survey the stateoftheart mechanisms giving each guarantee in more depth.
ExAnte Guarantees
Brustle, Cai, Wu, and Zhao (2017) (henceforth BCWZ) present a simple mechanism that is IR, IC, and weakly BB, and obtains, in expectation, at least half of the expected GFT of the (possibly very complex) secondbest efficiency benchmark. More specifically, they have proposed two mechanisms – a buyer offering and a seller offering mechanism – and have showed that the total GFT of these two mechanisms is at least the GFT of the secondbest mechanism, implying that a random one obtains at least half the GFT of the secondbest mechanism. For bilateral trade, in their seller offering mechanism, the seller simply posts a takeitorleaveit price to the buyer, which maximizes the seller’s utility in expectation, taking into account the seller’s cost for the item and the buyer’s value distribution. In their buyer offering mechanism, the buyer makes a similar takeitorleaveit purchase offer to the seller.
BCWZ also generalize their results beyond bilateraltrade settings, to more complex twosided trade scenarios including doubleauctions and matching settings. Their mechanism for these settings generalizes the selleroffering mechanism by maximizing the total Myerson virtual surplus of the sellers for the given buyers’ distributions, and similarly for the buyeroffering mechanism. While the mechanism that they present obtains at least half of the secondbest GFT in expectation, we observe that it does not give any expost efficiency guarantees, and moreover, even its expected GFT does not asymptotically converge to the GFT of the secondbest (let alone the firstbest) mechanism as the market grows large. This holds even for the very simple doubleauction market with sellers, each selling an identical item, and buyers, each interested in buying a single item, with the values (or costs) of the agents sampled i.i.d. from the uniform distribution over . Even when is large, the mechanism of BCWZ will only give in expectation a constant fraction (strictly smaller than ) of the secondbest GFT, and no more than that (see Example 3.1 in Section 3). In particular, even in a large market, the efficiency of their mechanism does not converge to full efficiency.
ExPost Guarantees
The Trade Reduction mechanism^{4}^{4}4McAfee’s original mechanism is slightly more involved. We use a simplified version that provides the same worstcase guarantees. of McAfee (1992), which is defined for the doubleauctions setting, does not suffer from the above drawback and is asymptotically efficient. The mechanism circumvents the impossibility result of Myerson and Satterthwaite (1983) for bilateral trade, by providing an expost efficiency guarantee only when more than one trade is possible in the doubleauction market. The mechanism works as follows: it first finds the efficient trade — denote the size (number of pairs) of this trade by . It then removes the least efficient trade (one buyerseller pair), and only allows for the remaining trades (the most efficient trades) to realize, charging the winning buyers the value of the removed buyer, and paying the winning sellers the cost of the removed seller. This creates an IR and expost incentive compatible (IC) mechanism. As the value of the removed buyer is at least the cost of the removed seller, each trade is weakly budgetbalanced. The mechanism obtains at least a fraction^{5}^{5}5Recall that is a function of the valuation profile. of the realized optimal (firstbest) GFT. In the doubleauction example above, as grows will also grow, and this fraction will tend to . Unfortunately, when this mechanism performs no trade and provides no guarantees at all. (Failing to provide an expost guarantee unconditionally is of course inevitable in light of the impossibility result of Myerson and Satterthwaite (1983).^{6}^{6}6Expost approximation to the GFT requires the mechanism to trade whenever there is positive gain, but the impossibility result implies that for some of these profiles trade will not occur.) We note that the Trade Reduction mechanism, while asymptotically efficient, fails to give any unconditional approximation to the GFT, even with respect to the GFT of the secondbest mechanism (as the mechanism of BCWZ does give).
The Best of Both Worlds
In this work we aim to design simple mechanisms that are IR, IC, and weakly BB, and simultaneously provide both types of efficiency guarantees discussed above. First, in the spirit of the guarantee of BCWZ, we aim to guarantee for the expected GFT to be at least a constant fraction of the expected GFT of the secondbest mechanism. Second, in the spirit of the guarantee of McAfee (1992), we aim to guarantee for the expost GFT to be at least a realizationdependent fraction of the realized optimal GFT (firstbest), such that this fraction tends to “as the market grows large” and the efficient trade size grows^{7}^{7}7The condition on the efficient trade size ensures that the growth in the market size does not, for example, come from adding agents that are “irrelevant,” such as buyers with value and sellers with very high costs, since in such a case it would not be possible to provide any guarantee that is better for large markets than for small ones (such as bilateral trade markets). to infinity.
1.1 Our Results
We present results both for the doubleauction setting and for the more involved matchingmarket setting, which extends the doubleauction setting by adding constraints on the pairs of agents who can trade with each other. Providing a result for this more involved scenario is considerably more challenging than for the doubleauction setting, and is the main result of this paper.
1.1.1 Double Auctions
We first consider the doubleauction setting in which each seller has a single item, all items are identical, and each buyer desires a single item. Each value (for obtaining an item) of each buyer, and each cost (for parting with her item) of each seller is drawn from a known agentspecific distribution, independently from all other values and costs. We first present our result for double auctions.
Theorem 1.1 (See Theorem 5.1).
For the doubleauction setting, there exists a simple mechanism that is expost IR, Bayesian IC and expost weakly budget balanced, and satisfies both of the following.

The expected GFT of this mechanism is at least of the expected GFT of the secondbest mechanism.

This mechanism guarantees at least of the realized optimal (firstbest) GFT, where is the size of the most efficient trade. Thus the mechanisms is asymptotically efficient (converges to full efficiency as the trade size grows large).
Note that the asymptotic efficiency that is obtained is with respect to the most demanding benchmark of the realized optimal GFT (the firstbest and not only the secondbest), providing the same guarantee as the one provided by the Trade Reduction mechanism of McAfee (1992). The concurrent exante guarantee is with respect to the secondbest, similarly to the result of BCWZ.
Before examining the problem thoroughly, one might be tempted to think that it is trivial to come up with such a mechanism for double auctions. Here is a natural naïve candidate for such a mechanism: first, the mechanism computes the efficient trade size . If , it runs McAfee’s Trade Reduction mechanism. Otherwise, it runs the mechanism of BCWZ. This naïve approach turns out to fail miserably as the allocation is not even monotone: it may well be the case that the two agents that trade when (i.e., those that trade according to the mechanism of BCWZ) are not the highestvalue buyer and the lowestcost seller, and so in certain scenarios an agent that is reduced in the case (by the Trade Reduction mechanism) may be able to reduce her bid to move to the case and trade (for more details see Section 3).
To present our mechanism, let us first very roughly review the behavior of the mechanism of BCWZ in the bilateraltrade case: in this special case, their mechanism flips a coin; with probability , the seller offers a takeitorleaveit price to the buyer (calculated so as to maximize the expected utility of the seller), and with probability , the buyer offers a takeitorleaveit price to the seller (calculated so as to maximize the expected utility of the buyer). In order to obtain the mechanism that we seek, we carefully make two main modifications to the naïve “compound” mechanism described above: first, in order to address the abovediscussed source of nonmonotonicity, instead of running the mechanism of BCWZ on the entire market, we run their bilateraltrade mechanism only on the (unique) pair in the efficient trade. To make the resulting mechanism truthful, we need to make an additional adjustment: in the selleroffering case (the adjustment to the buyeroffering case is analogous), we on the one hand force the seller to set a price that is at most the threshold bid that puts her in the efficient (firstbest) trade, and on the other hand notify her of the values of all buyers except the one that she is facing, and calculate the price that she offers to maximize her expected utility conditioned upon the fact that the buyer that she is facing has value larger than all of these values. Both adjustments, and in particular the first one, make the proof of the exante guarantee, as well as the proof that the mechanism is IC, quite subtle.
The main challenge in obtaining the approximation guarantee for the case where is to reconcile the fact that the pair that our mechanism attempts to trade on is determined by maximizing the realized GFT (firstbest) and might not be the same as the pair that would have traded according to the mechanism of BCWZ. The main hurdle to obtaining the approximation guarantee for this case is therefore that for some valuation profiles, an offer between the unique pair in the efficient trade will be rejected, resulting in no trade in our hybrid mechanism, while in the mechanism of BCWZ an offer will be made — and accepted — between a different pair. To overcome this, we have to carefully charge such losses in GFT to gains in GFT by other parts of our hybrid mechanism.
1.1.2 Matching Markets
As stated above, the mechanism of BCWZ does not converge to the efficient outcome in large doubleauction markets, and thus will clearly not do so in the more general matching market setting. Our goal is to present a mechanism for matching market that is IR, IC and expost weakly BB, but also provide exante guarantees for the GFT as well as expost guarantees that converges to full efficiency “as the market grows large”. While in the double auction setting, every buyer can trade with every seller, this is no longer the case in a matching market. Our notion of a large matching market aims to generalize the fact that in a large market there are many agents that are “equivalent” up to their values. The sense of agents being equivalent in a matching market is that they can trade with exactly the same set of agents. So, we can naturally partition agents to equivalence classes, with every two agents of the same class being interchangeable in any matching (up to their valuations). We consider matching markets with a fixed set of such classes, and think about a large market as a market in which the number of agents of each class is growing large, yet the number of different classes that any agent can trade with remains bounded by some constant .
Recall that the Trade Reduction mechanism of McAfee (1992) is defined for a doubleauction setting. We first present a generalization for matching markets of the Trade Reduction mechanism (Section 6.1) and prove that it is expost asymptotically efficient “as the market grows large” in the above sense. To our knowledge, this nontrivial generalization of the Trade Reduction mechanism, which may also be of separate interest, is novel. Similarly to the Trade Reduction mechanism of McAfee (1992) for doubleauction settings, this mechanism does not give any exante approximation guarantee.
As with the doubleauction case, we cannot directly combine our Trade Reduction mechanism for matching markets with the mechanism of BCWZ while maintaining truthfulness. Therefore, we present a novel mechanism (Section 6.2), which we call the Offering Mechanism for Matching Markets. Like the mechanism of BCWZ, this mechanism does not provide the expost guarantee we are after, but we manage to carefully define it in a way that allows us to combine it with the Trade Reduction mechanism for matching markets to obtain a truthful mechanism that provides both types of guarantees that we are after. The precise definition of the Offering Mechanism that allows for both the truthfulness and the efficiency guarantees of the hybrid mechanism has been quite elusive to pin down, and the proofs of truthfulness, and in particular of the exante guarantee, are considerably more subtle than in the doubleauction setting. To prove the exante guarantee of the Offering Mechanism, we compare it to the mechanism of BCWZ, showing that it attains at least half of the GFT of their mechanism, resulting in an exante guarantee of at least of the expected GFT of the second best mechanism. Proving the exante guarantee of the Offering Mechanism is the most technically challenging part of our analysis. To prove this guarantee, we show that it is possible to carefully “charge” every edge of the matching of BCWZ to edges of the firstbest matching that will be traded in our Offering Mechanism, proving that the expected GFT of our Offering Mechanism is at least half the expected GFT of the mechanism of BCWZ. The combination of the Offering Mechanism for matching markets with the Trade Reduction mechanism for matching markets creates the Hybrid Mechanism for Matching Markets (Section 6.3), giving us our main result.
Theorem 1.2 (See Theorem 6.5).
For the matching market setting, there exists a simple mechanism that is expost IR, Bayesian IC and expost weakly budget balanced, and satisfies both of the following.

The expected GFT of this mechanism is at least of the expected GFT of the secondbest mechanism.

When , this mechanism guarantees at least of the realized optimal (firstbest) GFT where denotes the maximum number of classes that any agent can trade with, and denotes the minimal positive number of trading agents of the same class in the welfare maximizing outcome. Thus the mechanism is asymptotically efficient in the sense that it converges to full efficiency as the number of trading agents in every class grows large, as long as is fixed.
We remark that while our mechanism exante guarantees a quantitatively smaller fraction of the secondbest GFT than the fraction guaranteed by the mechanism of BCWZ, our mechanism has two qualitative advantages over their mechanism: first, we additionally obtain an expost guarantee on the GFT that is asymptotically efficient; and moreover, while both mechanisms ensure that a truthful agent never regrets participating (expost IR), our mechanism is guaranteed to never lose money, while theirs gives this guarantee only in expectation and sometimes runs a deficit.
1.2 Additional Related Work
The Trade Reduction Mechanism of McAfee (1992) was generalized to different settings to provide similar asymptotic efficiency guarantees as well as expost guarantees as a function of the trade size with IR, IC mechanisms that are budget balanced. Babaioff and Walsh (2005) have presented Trade Reduction mechanisms for Supply Chain settings, while Babaioff et al. (2009) presented such a mechanism for a Spatially Distributed Market. In Section 6.1 we generalize the Trade Reduction mechanism to matching markets.
Recent papers (Blumrosen and Dobzinski, 2016; Blumrosen and Mizrahi, 2016) have focused on IR and Bayesian IC mechanisms that guarantee approximate efficiency while maintaining budget balance. Blumrosen and Dobzinski (2016) have presented a mechanism for bilateraltrade that is strongly budget balanced and obtains in expectation at least a constant fraction of the optimal welfare (the optimal welfare is the higher of the values of the two agents for the item). Blumrosen and Mizrahi (2016) have considered the more challenging goal of approximately maximizing the GFT, and have presented a mechanism that obtains in expectation at least of the firstbest GFT when the buyer’s valuation is drawn from a distribution satisfying the monotone hazard rate condition. Dütting et al. (2017) have studied the priorfree setting and have designed expost IC mechanisms that approximate the GFT and are budgetbalanced for twosided markets with constraints on each side separately, but leave open the design problem when there are crossmarket constraints, which we study in our paper. Recently, ColiniBaldeschi et al. (2016) have showed how to design an IR, expost IC and strongly BB mechanism for the double auction setting where there may be matroid feasibility constraint on the set of buyers who can trade simultaneously. Their mechanism achieves a constant fraction of the exante optimal social welfare, but provides no guarantee on the GFT. Moreover, their mechanism is not asymptotically efficient even when the market grows large. Finally, ColiniBaldeschi et al. (2017) have considered a twosided combinatorial auctions, where the market has multiple types of items for sale. Each seller might own multiple items and she has additive valuation over her items. Every buyer has XOS valuation over the items. They have showed that a variant of a sequential posted price mechanism can achieve a constant fraction of the optimal social welfare. Their mechanism neither provides any expost guarantees nor converges to efficiency in large market. Indeed, their mechanism may not trade a single pair of buyer and seller even when there are many tradeable pairs ^{8}^{8}8This could happen when every item’s expected contribution to the social welfare is not much bigger than its expected cost..
2 Preliminaries
2.1 Model and Definitions
Agents and Utilities
In a market for identical goods, there is a finite set of sellers with one good each, and a finite set of unitdemand buyers, with and . Each seller has a cost that she incurs if she sells her item, and each buyer has a value that she derives if she purchases an item. We assume that an agent who does not trade does not incur any cost or derive utility from this. Let be the vector of sellers’ costs and be the vector of buyers’ values. The costs and values are sampled from agentspecific (but not necessarily identical) nonnegative distributions for each buyer and for each seller , each independent of all other distributions. Agents have quasilinear utilities and are risk neutral.
Trading Constraints
In a matching market setting, an undirected bipartite graph with the sellers on one side and the buyers on the other constraints transactions. A set of trading agents is a set of buyers and of sellers that can be partitioned into pairs, each of one buyer and one seller that are neighbors in (this is equivalent to a matching of the set in ) — the set corresponds to each seller selling her item, and each buyer buying one of the items sold from one of its neighbors in . The size of trade of is defined to be .
Gains from Trade
The gains from trade (GFT) when the set (of trading agents) is trading is defined to be . Given a valuation profile , a set of trading agents is efficient if it maximizes the gains from trade from among all sets of trading agents.
Mechanisms
We consider directrevelation mechanisms in which each agent reports a type (value for buyers, cost for sellers), so the mechanism is a function from reported valuation profiles to a set of trading agents and to payments from each agent to the mechanism. A mechanism is Bayesian incentive compatible (BIC) if each agent, by being truthful, maximizes her expected utility (over the randomization of the mechanism and the types of the others, assuming that they are truthful^{9}^{9}9Our BIC mechanisms will actually satisfy a slightly stronger truthfulness property, being truthful for every realization of the coins of the mechanism, yet only in expectation over the types of the other agents..) A mechanism is expost IC if being truthful maximizes the agent’s utility for any actions (reports) of the others. A mechanism is (expost) IR if the utility for a truthful agent is nonnegative, independent of the strategies of others. A mechanism is interim IR if the expected utility for a truthful agent is nonnegative, when the expectation is over the randomization of the mechanism and the types of the other agents, when truthful. Clearly, if a mechanism is expost IR, then it is also interim IR. As all the mechanisms in this paper are expost IR and BIC (or even expost IC), then unless otherwise stated, we assume that the reports are equal to the true values/costs.
A mechanism is expost weakly budget balanced (BB) if for any valuation profile, the sum of payments to the mechanism is nonnegative. A mechanism is expost strongly budget balanced if for any valuation profile, the sum of total payments to the mechanism is zero. A truthful mechanism is exante weakly budget balanced if the expected sum of payments to the mechanism is nonnegative, where the expectation is over the types of all agents and the randomness of the mechanism. Clearly, if a mechanism is expost weakly budget balanced, then it is also exante weakly budget balanced. Following ColiniBaldeschi et al. (2017) we say that one of the above budget balance properties holds for direct trade if that budget balance property (weak or strong) holds for each of the trades separately.
Benchmarks
Given a valuation profile , let be the firstbest matching, or the maximumweight matching in , where ties between agents are broken by the “lexicographic order by IDs” formally defined in Definition 6 in Section D.2.^{10}^{10}10This tie breaking rule satisfies two properties we use extensively: 1) it does not depend on weights, and 2) it is subset consistent in the sense that when removing an edge from some matching and picking a matching on the remaining nodes , it will pick the matching of on these nodes. Slightly abusing notation, we use to also denote the set of agents in the matching . Let be the GFT of the “firstbest” , that is . Note that the VCG mechanism (which is not budget balanced) attains a GFT of on every valuation profile .
A mechanism is called secondbest if it maximizes the expected gains from trade among all BIC, interim IR and exante weakly budget balanced mechanisms.
Special Cases
The case where is the complete bipartite graph (i.e., any seller can trade with any buyer) is called the doubleauction setting. In the doubleauction setting, for every valuation profile we denote the size of the efficient set of trading agents by . The case where and the buyer and the seller are connected by an edge in (so this is also a special case of doubleauction) is called the bilateraltrade setting.
2.2 The Trade Reduction Mechanism
In the doubleauction setting, the Trade Reduction (TR) mechanism (McAfee, 1992) is a mechanism that finds the most efficient trade of only items,^{11}^{11}11If there is no trade in the TR mechanism, and no payments are made. and charges each agent his critical value for winning. That is, the highestvalue buyers trade and pay the bid of the reduced buyer (the highest buyer); they trade with the lowestcost sellers, each seller getting paid the cost of the reduced seller (the lowest seller).
Theorem 2.1 (McAfee, 1992).
In the doubleauction setting, the TR mechanism is expost IC, expost IR, and expost (direct trade) weakly budget balanced. For every valuation profile , the gains from trade of this mechanism are at least an fraction of .
Note that if , then no exante approximation to the GFT is achieved by the TR mechanism, while for , Theorem 2.1 guarantees at least half the efficient GFT for , expost.
2.3 The Random VirtualWelfare Maximizing Mechanism of
Brustle et al. (2017)
Brustle et al. (2017) present a mechanism for trading with downwardclosed constraints (which subsume matching constraints), which we will refer to throughout this paper as the Random VirtualWelfare Maximizing (RVWM) mechanism. We will first describe this mechanism, and then distill from this description the information that will be required for our analysis. The mechanism is described in terms of the ironed virtual value and virtual cost functions of the agents. For any buyer , the ironed virtual value function^{12}^{12}12When the CDF of is differentiable, then the (nonironed) virtual value of seller with value is defined as , where and are the CDF and PDF of the distribution from which buyer ’s value is drawn. If the virtual value function is not nondecreasing, then we perform an ironing procedure to make it monotone, resulting in the ironed virtual value function . We refer the reader, e.g., to Brustle et al. (2017) for more details. (Myerson, 1981) of buyer is denoted by and for the purposes of our analysis it is enough to observe that it is a nondecreasing function such that for every value we have . For any seller , the ironed virtual cost function^{13}^{13}13This function is defined symmetrically to Myerson’s ironed virtual value function. When the CDF of is differentiable, then the (nonironed) virtual cost of seller with cost is defined as , where and are the CDF and PDF of the distribution from which seller ’s cost is drawn. If the virtual cost function is not nondecreasing, then we perform an ironing procedure to make it monotone, resulting in the ironed virtual cost function . We refer the reader to Brustle et al. (2017) for more details. of seller is denoted by and for the purposes of our analysis it is enough to observe that it is a nondecreasing function such that for every cost we have .
This RVWM mechanism flips a coin to uniformly pick one of the following two mechanisms to run:

Generalized SellerOffering Mechanism (GSOM): Given valuation profile , let be the maximum weight matching^{14}^{14}14Follow the same breaking tie rules as the firstbest matching. of when the weight of every edge is . For every pair , trade buyer with seller . The allocation rule is monotone and every agent pays (or receives) her critical value to trade in the mechanism.

Generalized BuyerOffering Mechanism (GBOM): Given valuation profile , let be the maximum weight matching^{15}^{15}15Follow the same breaking tie rules as the firstbest matching. of when the weight for every edge is . For every pair , trade buyer with seller . The allocation rule is monotone and every agent pays (or receives) her critical value to trade in the mechanism.
The only additional properties of the ironed virtual value and cost functions that our analysis will require will be used through the following Observation.
Observation 2.2.
Let be a valuation profile. If trade occurs with some positive probability on a given edge in the RVWM mechanism, then trade would occur on the same edge with at least the same probability in the mechanism that runs one of the following, with probability each:

Seller offers a price to buyer that maximizes the utility of seller in expectation over the distribution from which buyer ’s valuation was drawn, and trade occurs if and only if this price is at most buyer ’s valuation .

Buyer offers a price to seller that maximizes the utility of buyer in expectation over the distribution from which seller ’s valuation was drawn, and trade occurs if and only if this price is at least seller ’s cost .
To see why Observation 2.2 follows from the above definition, note that if for a valuation profile there is trade with positive probability on an edge , then either GSOM or GBOM traded that edge. If GSOM traded that edge, then it means that . So, . Myerson (1981) shows that is a price that when offered, maximizes the expected utility of seller with cost from buyer (the ironed virtual value function encodes the valuation distribution of buyer ). So, since this price is at most , it would have been accepted in the selleroffering mechanism described in Observation 2.2. If GBOM traded this edge, then similarly an offer would have been accepted in the buyeroffering mechanism described in Observation 2.2.
BCWZ prove that the RVWM mechanism guarantees at least half of the GFT of the secondbest exante:
Theorem 2.3 (Brustle et al., 2017).
The RVWM mechanism for downwardclosed constraints of Brustle et al. (2017) is expost IC, expost IR, and exante weakly budget balanced, and in expectation gets a fraction of the gains from trade of the secondbest mechanism.
Note that while the exante guarantee on the GFT of the RVWM mechanism (Theorem 2.3) is with respect to the secondbest mechanism, the expost guarantee on the GFT of the TR mechanism (Theorem 2.1) is with respect to the more demanding benchmark of the (realized) firstbest gains from trade. Also note that while the RVWM mechanism is expost IC like the TR mechanism, it is only exante, rather than expost, weakly budget balanced. While our main result will be stated to guarantee that our mechanism is BIC and expost weakly budget balanced, we will note that our mechanism can also be made expost IC for the price of being only exante weakly budget balanced, thus matching these guarantees of the RVWM mechanism (while adding an asymptotically efficient expost guarantee on the GFT).
3 Shortcomings of the RVWM Mechanism and of
Naïve Modifications thereto
In this Section, we demonstrate the shortcomings of the RVWM mechanism that motivate our work, as well as the ineffectiveness of naïve modifications to this mechanism in overcoming these shortcomings. We first show that the RVWM mechanism of Brustle et al. (2017) is not asymptotically efficient, even exante, and then show that two naïve strategies to combine this mechanism with the Trade Reduction mechanism of McAfee (1992) are not monotone, even interim, and therefore there is no hope in coupling them with a payment rule so as to make them Bayesian IC.
3.1 Asymptotic Inefficiency of the RVWM Mechanism
We first observe that the the RVWM mechanism of Brustle et al. (2017) is not asymptotically efficient for double auctions, even exante and compared to the secondbest.
Example 3.1.
Consider a doubleauction market with seller and buyers, with agents’ values and costs sampled i.i.d. from the uniform distribution over . We claim that even when is large, the RVWM mechanism will only give in expectation a constant fraction (strictly smaller than ) of the expected GFT of the secondbest mechanism. In particular, even in a large market, and even in expectation, the efficiency of the RVWM mechanism with respect to the second best (and thus also with respect to the firstbest) does not converge to full efficiency.
Proof sketch.
We prove Example 3.1 in Appendix A, and here we give some intuition. When is large, it is easy to observe that in an efficient trade roughly the lowestcost sellers (essentially distributed uniformly in ) will sell their items to roughly the highestvalue buyers (essentially distributed uniformly in ), increasing the welfare by about in expectation in each trade, resulting in the firstbest having asymptotic expected GFT of about . The secondbest mechanism gets GFT that is in expectation at least the expected GFT of the Trade Reduction mechanism, so it has asymptotic expected GFT of about , asymptotically the same as the firstbest mechanism. On the other hand, when a buyer offers an optimized price facing a uniform distribution as in the RVWM mechanism, she offers only half of her value (and similarly, a seller offers a price that is halfway between her cost and ). This results in only roughly the lowestcost sellers (essentially distributed uniformly in ) selling their items to roughly the highestvalue buyers (essentially distributed uniformly in ), increasing the welfare by about in expectation in each trade, resulting with asymptotic expected GFT of about . ∎
3.2 Nonmonotonicity of Naïve Modifications to the
RVWM Mechanism
If one were not interested in incentive compatibility, then getting the “best of both worlds” would have been extremely simple: compute the outcome of both the RVWM and the TR mechanisms, and choose the outcome with higher realized GFT. As we now observe, this allocation rule is not monotone, even in an interim sense. Thus, there is no hope to couple this allocation rule with payments that will make it even Bayesian IC.
Example 3.2.
Consider a doubleauction setting with two buyers and two sellers. The value of buyer is drawn from , the value of buyer is drawn from , the cost of seller is fixed to be with probability , and the cost of seller is with probability and is with probability . For the allocation rule that chooses the outcome with higher realized GFT among the outcomes of RVWM and TR, buyer with valuation trades with higher probability (over the distributions of all other values and costs, and over the randomness of the mechanism) than buyer with valuation .
Proof sketch.
We prove Example 3.2 in Appendix A, and here show only that this mechanism is not expost (rather than interim) monotone. So, fix and (and ). So, , , , and .
Regardless of whether or , since and since , GBOM chooses neither buyer nor seller as traders. Furthermore, since and since , GSOM chooses neither buyer nor seller as traders, and so since , in GSOM buyer and seller trade. So, regardless of whether or , buyer trades in RVWM with probability .
If , then the firstbest matches all agents and so in TR buyer and seller trade (so buyer does not trade). So, in this case the GFT of TR is higher than the expected GFT (over the randomness of the mechanism) of RVWM, and so the TR outcome is chosen and buyer does not trade. Conversely, if , then the firstbest matches only buyer and seller (since ) and so there is no trade in TR and the RVWM outcome is chosen and buyer trades with probability . ∎
Another naïve way to combine the RVWM and TR mechanisms may be based on the value of : if (TR gives an expost guarantee), then choose the TR outcome, and otherwise choose the RVWM outcome. As we now observe, this allocation rule is not monotone either, even in an interim sense. Thus, there is also no hope to couple this allocation rule with payments that will make it even Bayesian IC.
Example 3.3.
Consider a doubleauction setting with two buyers and two sellers. The value of buyer is drawn from , the value of buyer is drawn from , the cost of seller is fixed to be with probability , and the cost of seller is with probability and is with probability . For the allocation rule that chooses the TR outcome if and the RVWM outcome otherwise, buyer with valuation trades with higher probability (over the distributions of all other values and costs, and over the randomness of the mechanism) than buyer with valuation .
Proof sketch.
We prove Example 3.3 in Appendix A, and here only note that the above proof that the mechanism from Example 3.2 is not expost monotone in fact also shows that the mechanism from Example 3.3 is not expost monotone, as these two mechanism coincide on the two valuation profiles used in the above proof of the lack of expost monotonicity. ∎
As can be seen from the analysis of both Examples 3.3 and 3.2 (even already from the proof of lack of expost monotonicity), a main source of the issues described in these Examples is that the RVWM mechanism may choose as traders agents who are not in the firstbest. Our approach in this paper will indeed offer an alternative to the RVWM mechanism that only chooses as traders agents who are in the firstbest, and despite this added restriction still gives a qualitatively similar exante guarantee to that of the RVWM mechanism. While in double auctions settings this alternative to RVWM can be considered modification of the RVWM mechanism (see Section 4), in matching settings this alternative is substantially different than the RVWM mechanism (see Section 6.2).
4 The SellerOffering, BuyerOffering, and
RandomizedOfferer Mechanisms
Before we turn to our main results, in this Section we present a slightly modified version of the bilateraltrade construction of Brustle et al. (2017), which we will use as a building block in the construction of our hybrid mechanisms, and prove several properties thereof.
Definition 1 (SO, BO, RO Mechanisms).
Fix and to be nonnegative distributions, and fix and s.t. . We define three mechanisms for trade between a seller with cost and a buyer with value .

The SellerOffering (SO) mechanism with offer constraint and target distribution is the mechanism in which a seller with cost offers to the buyer the lowest price among the prices that maximize the utility of the seller in expectation over , under the constraint . That is, the offered price is . The buyer accepts this price if it is no greater than the realized value of the buyer. If the buyer accepts this price, then trade occurs at this price; otherwise, no trade occurs.

The BuyerOffering (BO) mechanism with offer constraint and target distribution is the mechanism in which a buyer with value offers to the seller the highest price among the prices that maximize the utility of the buyer in expectation over , under the constraint . That is, the offered price is . The seller accepts this price if it is no less than the realized cost of the seller. If the seller accepts this price, then trade occurs at this price; otherwise, no trade occurs.

The (Bilateral) Randomized Offerer (RO) mechanism with SO parameters and and BO parameters and is the mechanism that flips a coin, with probability it runs the SO mechanism with offer constraint and target distribution , and otherwise it runs the BO mechanism with offer constraint and target distribution .
We slightly strengthen the special case of the incentive and budget guarantees of Theorem 2.3 for bilateral trade, and prove that they still hold even with offer constraints as in the RO mechanism.^{16}^{16}16We note that each of the SO and BO mechanisms is a deterministic and expost monotone mechanism, and so can be made expost IC (and expost IR) by charging the threshold winning prices. The resulting modified mechanisms, however, are not expost (even weakly) budget balanced, but only exante (strongly) budget balanced. We furthermore show that whenever trade occurs, the trading happens at a price that indeed lies between the seller’s and the buyer’s constraint.
Lemma 4.1.
Fix and to be nonnegative distributions and fix and s.t. . Consider the RO mechanism with SO parameters and and BO parameters and .

When valuations are drawn from , this mechanism is a BIC^{17}^{17}17Since the allocation rule of the RO mechanism is expost monotone, by charging threshold prices we could strengthen the incentivecompatibility property from BIC to expost IC (while maintaining expost IR), but then the weakbudgetbalance guarantee would only hold exante and not expost (similarly to the guarantee of Theorem 2.3). Moreover, once we settle for exante budget balance, we could get exante strong budget balance “for free” by equally dividing our exante expected profits (assuming truthful bidding) among the agents, (see, e.g., Brustle et al., 2017)., expost IR, and expost (direct trade) strongly budget balanced mechanism.

Whenever trade occurs in this mechanism, it holds that the price that the seller pays the buyer satisfies .
The proof of Lemma 4.1 is given in Appendix B. To conclude this section, we will prove two more properties of the RO mechanisms that will allow us to lowerbound its GFT guarantee: the first will allow us to compare its GFT to that of the firstbest, and the second will allow us to compare its GFT to that of the RVWM mechanism.
Lemma 4.2.
Fix and to be nonnegative distributions and fix . Fix to be a cost for the seller and fix to be a value for the buyer. Consider the RO mechanism with SO parameters and and BO parameters and .^{18}^{18}18For a distribution and a value , we use to denote this distribution conditioned upon the drawn value being at most , and use to denote this distribution conditioned upon the drawn value being at least .

If or , then the probability that trade occurs in this mechanism is at least .

If and , then the probability that trade occurs in this mechanism is at least as high as the probability that trade occurs in the RO mechanism with SO parameters and and BO parameters and .
The proof of Lemma 4.2 is given in Appendix B. In a nutshell, Item 1 holds since if, e.g., , then an offer by the buyer will always be accepted by the seller, and Item 2 holds since under the given assumptions, if trade occurs in the unconstrained and unconditioned RO mechanism, then the price offered there also satisfies all of the extra restrictions of the constrained and conditioned RO mechanism, and therefore the same price will be offered in that mechanism as well, resulting in trade there as well.
5 Double Auctions
In this Section, we present our results for the doubleauction setting, in which there are no constraints on which seller can trade with which buyer (i.e., the graph is the full bipartite graph). Namely, we will present our hybrid mechanism for double auctions, which is an expost IR, BIC, expost weakly budget balanced mechanism, which exante guarantees a constant fraction of the secondbest, and is expost asymptotically efficient.
5.1 A Hybrid Mechanism for Double Auctions
While the RVWM mechanism is not asymptotically efficient, the Trade Reduction (TR) mechanism of McAfee (1992) is asymptotically efficient as it guarantees, expost, an fraction of the efficient GFT, where is the size of the most efficient trade (Theorem 2.1).^{19}^{19}19If there is a trade with GFT of , then there are efficient trades with different sizes. In this case trading according to the largest size will give full efficiency. As this mechanism gives no exante guarantee (when ), we create a hybrid mechanism that runs the TR mechanism when and run the RO mechanism with some constraints and conditional distributions otherwise. These constraints and conditionings of the distributions are needed both for incentive compatibility and for the exante GFT guarantee. We now present this mechanism.
Definition 2 (Hybrid Mechanism for Double Auctions).
Our hybrid mechanism for double auctions is a direct revelation mechanism. Given the reports and (that are assumed to be truthful), we use to denote the buyer^{20}^{20}20Somewhat abusing notation, we use to refer both to this buyer and to his value, and similarly for other agents. with maximum value (when breaking ties lexicographically by IDs), i.e., for every , and use to denote the buyer with maximum value after removing buyer . Similarly, we use to denote the seller with minimal cost, and to denote the seller with the secondminimal cost.^{21}^{21}21Note that the maximal efficient set of trading agents is . The mechanism computes and runs as follows.

If ,^{22}^{22}22Recall that in this case, if there is any trade with positive gains, then the maximal efficient set of trading agents is . the mechanism computes the set of trading agents and payments by running the RO mechanism with SO parameters and and BO parameters and .^{23}^{23}23We note that in this case since , we have that and therefore indeed also and .

If , the mechanism computes the set of trading agents and payments by running the TR mechanism on and .
We will now sketch the intuition behind our choice, in the case where , of the constraints and the conditioned distributions and for which the offered prices are optimized. First, we would never want to allow to pay a price such that if had valuation then she would not be in the firstbest. This is since such a possibility would create an incentive for her to manipulate her bid if her valuation really were slightly higher than but still not high enough for her to be in the firstbest: in this case, raising her bid would place her in the firstbest, and she may end up paying , which would give her positive utility. So, we have to make sure that never offers, nor is ever offered, such a that is lower than . (In fact, the threshold bid of to be in the firstbest is , but by definition of the RO mechanism, she would never pay less than as this would result in negative GFT, so we only need to make sure that she never pays less than .) To make sure that never offers such a price , we constrain her to offer at least in the BO mechanism. To make sure that she is never offered such a price in the SO mechanism, we have optimize her offer under the assumption that the value of is drawn from , which is equivalent to disclosing to that she has no point in offering a price lower than since an offer of will always be accepted. To see why the mechanism is truthful once we have set (and ) this way, consider the following hypothetical scenario. Say that after calculating that , the mechanism notifies and that they are the lowestcost seller and highestcost bidder, and furthermore notifies each of them of the values (and costs) of all other agents except the one that they are facing. In this case, the posterior distribution of regarding is , so her best action is to optimize the price that she offers under this assumption, which is equivalent to optimizing the price that she offers for the distribution (but optimizing for the latter is easier to analyze, as it does not depend on the cost of ).
Theorem 5.1.
For the double auction setting the above simple hybrid mechanism for double auctions is expost individually rational, Bayesian incentive compatible^{24}^{24}24Once again, since the allocation rule of the hybrid mechanism is expost monotone, by charging threshold prices we could strengthen the incentivecompatibility property from BIC to expost IC (while maintaining expost IR), but then the weakbudgetbalance guarantee would only hold exante and not expost (similarly to the guarantee of Theorem 2.3). Moreover, once we settle for exante budget balance, we could get exante strong budget balance “for free” by equally dividing our exante expected profits (assuming truthful bidding) among the agents, (see, e.g., Brustle et al., 2017)., expost (direct trade) weakly budget balanced, and has both of the following efficiency guarantees:

It gets at least a fraction of the efficient gains from trade exante (secondbest).

It gets at least a fraction of the efficient gains from trade expost (firstbest). Note that the mechanism is asymptotically efficient: as the trade size goes to infinity, the fraction of the efficient gains from trade that it gets expost (firstbest) goes to .
5.2 Proof of Theorem 5.1
Proof of Theorem 5.1.
Recall that by Lemmas 4.1 and 2.1, both the TR and the RO mechanisms are each expost IR, BIC, and expost (direct trade) weakly budget balanced.
Expost IR
Expost IR holds since both the TR and the RO mechanisms are expost IR.
Bayesian IC
We will show that our hybrid mechanism is BIC for any buyer.^{25}^{25}25In fact, when our hybrid mechanism runs TR, then it is expost IC for every agent, and when a price is offered by an agent in the RO mechanism, then our hybrid mechanism is Bayesian IC for the agent making the offer, and expost IC for all other agents including the agent who receives the offer. A similar argument holds for truthfulness of the sellers.
We first claim that if a manipulation by a buyer does not change the choice of the mechanism that is run (TR or an instance of RO, where we consider each such instance to be a separate mechanism) by our hybrid mechanism, then it is nonbeneficial in expectation. For TR this follows since TR is expost IC. To show this for RO, we will show that that the region of the space of valuation/cost profiles where our hybrid mechanism for double auctions runs each instance of the RO mechanism can be partitioned into disjoint subsets where our hybrid mechanism is BIC on each such subset under the profile distribution conditioned upon being in that subset.
Fix a choice of the identity (but not the cost) of seller and the identity (but not the value) of bidder , and fix a profile of costs and valuations for all other sellers and buyers (so in particular the cost and value are fixed). We first claim that either our hybrid mechanism runs the same instance of RO on all possible profiles that agree with these fixed choices, or does not run any instance of RO on any of these profiles. Indeed, if (a conditioned fully determined by these fixed choices) then TR is run on all such profiles, and otherwise the RO mechanism with SO parameters and and BO parameters and (note that all of these parameters are fully determined by the above fixed choices and do not depend on the cost or the value ) is run on all such profiles.
We will next show that our hybrid mechanism is BIC on the subset of all profiles that agree with these fixed choices. Note that when conditioning the distribution of all profiles to those that agree with such fixed choices, the cost of the seller (conditioned to agree with these fixed choices) is distributed precisely according to and the value of the buyer (conditioned to agree with these fixed choices) is distributed precisely according to . By Lemma 4.1(1), we therefore have that our hybrid mechanism is BIC for the offering agent (and expost IC for any other agent) over all profiles that agree with these choices. We have therefore shown that if a manipulation by a buyer does not change the choice of the mechanism that is run by our hybrid mechanism, then it is nonbeneficial in expectation.
We now claim that a buyer who is in the efficient trading set cannot change the efficient trading set while remaining in this set. Indeed, to see that this is the case, suppose a buyer in the efficient trading misreports by adding (positive or negative) to his bid. The gains from trade from any trading set that includes this buyer therefore increase by (while the gains from trade of any other trading set remains the same); therefore, since we break ties in the same manner without and with the deviation, no other trading set that includes this buyer other than the true efficient trading set can “become” (as a result of the misreport) the new efficient trading set.
Since (1) agents outside the efficient trading set never win, (2) a buyer in the efficient trading set cannot change the efficient trading set while remaining in this set, (3) the choice of the mechanism to run is completely determined by the efficient trading set and by the values/costs of the agents outside the efficient trading set, and (4) a manipulation that does not change the choice of the mechanism to run is nonbeneficial in expectation, we conclude that there are no strategic opportunities (in expectation) for any buyer who is in the efficient trading set.
To complete the proof that our hybrid mechanism is BIC, it is therefore enough to show that there is no beneficial manipulation by a buyer who is not in the efficient trading set. We will in fact show that the mechanism is expost IC for such agents; we do so by considering several cases.

If , then a buyer who is not in the efficient trading set cannot cause a move to . Any manipulation by such a buyer is therefore nonbeneficial since the TR mechanism (which is run prior to, and following, the manipulation) is expost IC.

If , then we consider two possible manipulations by some buyer who is not in the efficient trading set (and is therefore not the true ):

First, consider a manipulation by that causes a move to and causes her to win. We claim that in this case, this buyer, who was previously not in the efficient trading set, must pay at least her true value whenever she wins. Indeed, by definition of TR and since truly , since this buyer wins following the manipulation (and so is not reduced by the TR mechanism), she pays at least the original , which is at least her true value. Therefore, she incurs nonpositive utility.

We next consider a manipulation by that maintains and causes her to win (with some positive probability). We will show that whenever this buyer wins, she incurs nonpositive utility. Since is maintained following the manipulation, we must have that raised her bid to be higher than the original , who is now in the role of . By Lemma 4.1(2), if the manipulating buyer wins, then she pays at least the new , i.e., the original , which is at least her true value, and so she incurs nonpositive utility.


Finally, consider the case and consider a manipulation by any buyer that causes her to win. Such a manipulation can only result in , so the manipulator, if she wins, trades with , and by definition of RO and since this mechanism is expost IR for this seller, this buyer pays at least . Since , we have that is larger than the true valuation of all buyers (including the manipulator), so the manipulator incurs negative utility whenever she wins.
Expost (direct trade) weak budget balance
Our hybrid mechanism is expost (direct trade) weakly budget balanced since the two mechanisms TR and RO are both expost (direct trade) weakly budget balanced (the one is in fact expost (direct trade) strongly budget balanced).
Expost efficiency guarantee
When , then the guarantee vacuously holds, while when , the guarantee follows from the same guarantee by the TR mechanism.
Exante efficiency guarantee
We will show that for each valuation profile , our hybrid mechanism achieves at least half of the gains from trade of the RVWM mechanism for the same valuation profile. Fix a valuation profile . We consider several cases.

Consider the case where . Note that this is precisely the case where . In this case, our hybrid mechanism runs the TR mechanism, which by Theorem 2.1 guarantees at least a fraction of the realized optimal gains from trade expost, and so at least a fraction of the gains from trade of the RVWM mechanism.

Consider the case where . Note that this is precisely the case where . In this case, it is efficient to have no trade for , and this is what both our hybrid mechanism and the RVWM mechanism do, so our hybrid mechanism has the same gains from trade as the RVWM mechanism.

Consider the case where , and in addition either or . In this case, since , we run the RO mechanism. By Lemma 4.2(1), in this case and trade with probability at least , so our hybrid mechanism achieves at least a fraction of the realized optimal gains from trade, and so at least a fraction of the gains from trade of the RVWM mechanism.

Finally, consider the case where . In this case, the only possible trading pair with positive gains is of with , so if the RVWM mechanism achieves positive gains from trade, then it trades this pair with positive probability. By Observation 2.2, in this case the GFT of the RVWM mechanism are therefore at least those of the RO mechanism with SO parameters (no constraint) and (unconditioned distribution) and BO parameters (no constraint) and (unconditioned distribution) on that edge. Since and , we have by Lemma 4.2(2) that the probability that trade occurs between and is at least as high in our hybrid mechanism (which runs the appropriate RO mechanism, constrained and conditioned) as it is in the unconstrained and unconditioned RO mechanism (that upperbounds RVWM in this case). Therefore, in this case our hybrid mechanism achieves at least the gains from trade of the RVWM mechanism.
Combining all of the above, we have that the expected gains from trade of our hybrid mechanism are at least a fraction of those of the RVWM mechanism, and so by Theorem 2.3 at least a fraction of the expected optimal gains from trade exante (secondbest). ∎
5.2.1 Why The Proof of the ExAnte Guarantee Gives a Factor of and Not
Having read the proof of the exante guarantee of Theorem 5.1, we note that at first glance, one may be tempted to consider the following naïve adaptation of this proof into a “proof” of an exante guarantee of (rather than ) of the secondbest:
In each case analyzed above, the hybrid mechanism attains either at least the GFT of the RVWM mechanism, or at least half of the GFT of the firstbest, which in turn is at least half of the GFT of the secondbest. Since the GFT of the RVWM mechanism is in turn also at least half of the GFT of the secondbest, we get that in either case our hybrid mechanism attains half of the GFT of the secondbest.
The problem with this “proof” is that it mixes exante and expost guarantees. While indeed the hybrid mechanism attains, on each profile , either at least the GFT of the RVWM mechanism or at least half of the GFT of the (firstbest and therefore of the) secondbest, it is wrong to assume that on each profile the GFT of the RVWM mechanism is at least half of the GFT of the secondbest, as we only know that the expected GFT of the RVWM mechanism, over all profiles, is at least half of the expected GFT, over all profiles, of the secondbest. In other words, it may hypothetically be that the RVWM mechanism performs poorly on the profiles on which our hybrid mechanism attains at least the GFT of the RVWM mechanism, and that the RVWM mechanism performs very well, surpassing half of the GFT of the secondbest, and even half of the GFT of the firstbest, on the profiles on which our hybrid mechanism attains at least half of the GFT of the firstbest (so on average, the RVWM mechanism would indeed attain its guarantee), and in such a case, the above “proof” obviously fails.
6 Main Results for Matching Markets
In this section we will generalize the results of Section 5 to matching markets. Recall that a matching market is given by an undirected bipartite graph with nodes on one side representing the sellers and nodes on the other side representing the buyers, with edges indicating possible trades. Recall that a profile assigns a value for each buyer and a cost for each seller .
6.1 A Trade Reduction Mechanism for Matching Markets
We first present a generalized Trade Reduction mechanism for matching markets. Like the Trade Reduction mechanism of McAfee (1992) for doubleauctions, the Trade Reduction Mechanism for matching markets that we define below picks a subset of the “firstbest” trade, and determines the payments based on the values and costs of the agents that it removed from the firstbest. The details are, however, more subtle than in the doubleauction setting.
Recall from Theorem 2.1 that for every valuation profile , the TR mechanism for double auctions attains GFT of at least a fraction of . We note that giving the same guarantee for matching markets, with remaining total the size of trade in the market, is not possible — just consider a matching market that consists of two connected components, each a double auction. So, to phrase our TR mechanism for matching markets, we will first have to define some notation that will eventually help us phrase its GFT guarantee (which will still generalize the of TR for double auctions, but in a slightly different way).
We say that the classes of buyer and are the same if for any seller it holds that if and only if . Similarly, we define classes for sellers.^{26}^{26}26Note that the classes that we define depend neither on the values of the buyers nor on the costs of the sellers (nor on the distributions from which these values/costs are drawn). That is, two agents are of the same class if in any case that one of them can trade with some agent , it also holds that the other agent can trade with agent . Thus, nodes in the graph can be partitioned into equivalent classes, where each equivalent class consists of all agents of some fixed class. Each such class either includes only buyers, or only sellers, but never both. Let denote the set of agents of class . For each class we denote by the number of agents of class that are matched in , that is . Additionally, we denote by the number of distinct classes such that there is an edge in between an agent of class and an agent of class .
Definition 3 (Trade Reduction Mechanism for Matching Markets).
Fix a matching market . The Trade Reduction mechanism for gets as input a profile and outputs an allocation and payments as follows.

Given profile , let be the “firstbest” matching. Any agent not in is marked as a loser and does not trade, paying 0.

For each class , recall that is the number of agent of class that are matched in and is the number of different classes that trade with agents of class in .

For each buyer class , the set of trading buyers will be the set of highestvalue buyers of class (breaking ties lexicographically by IDs).^{27}^{27}27Note that the number of trading buyers is nonnegative, as for every class it holds that . We say that buyers of class were reduced. Each buyer of class pays the highest value reported by any reduced buyer of class .

For each seller class , the set of trading sellers will be the set of lowestcost sellers of class (breaking ties lexicographically by IDs).^{28}^{28}28Note that the number of trading sellers is nonnegative, as for every class it holds that . We say that sellers of class were reduced. Each buyer of class is paid the lowest cost reported by any reduced seller of class .

We denote the set of agents that are trading under this mechanism by .
The following Theorem presents the properties of the Trade Reduction Mechanism for matching markets. In particular, it shows that the mechanism provides some expost GFT guarantees which is a function of the maximum weight matching . As with the TR mechanism for double auctions, this mechanism does not provide any exante guarantees, though, even with respect to the secondbest mechanism. In particular, with a single trade in , there will be no trade in this mechanism.
Theorem 6.1.
The Trade Reduction Mechanism for matching markets is expost IR, expost IC, expost (direct trade) weakly budget balanced, and for any the fraction of the gains from trade of that it attains is at least .^{29}^{29}29Note that and are all function of , so they are functions of the profile . This is similar to being a function of for Trade Reduction in double auctions.
We note that guarantee from Theorem 6.1 of the TR mechanism attaining a fractionof of at least coincides in the doubleauction setting with the guarantee of at least from Theorem 2.1, and naturally generalizes it. Another generalization for matching markets of the fraction that one may find natural, which also coincides with it in the doubleauction setting, is where for any buyers’ class and sellers’ class , we use to denote the number of buyers of class that are matched with sellers of class in . While this alternative generalization is conceptually interesting in its own right, we in fact show that for every valuation profile it holds that , and so a GFT guarantee of follows from the GFT guarantee of from Theorem 6.1:
Corollary 6.2.
For any , the fraction of the GFT of that the TR mechanism for matching markets attains is at least
The proofs of Corollaries 6.2 and 6.1 are given in Appendix C.
6.2 The Offering Mechanism for Matching Markets
Before defining our hybrid mechanism for matching markets, we first define an offering mechanism for matching markets, analogous to the specific instance of the RO mechanism (including the specific offer constraints and conditioned distributions) that our hybrid mechanism for double auctions runs whenever in that setting. In this mechanism, agents not in never trade, and agent in a pair either trades in that pair or does not trade at all. This mechanism is defined as follows.
Definition 4 (Offering Mechanism for Matching Markets).
The mechanism iterates over all edges , and for each such edge acts as follows.

Let be the minimal bid of buyer such that any higher bid causes to be in the firstbest in the market , i.e., the market without seller . We set if no such bid exists.

Let be the maximal bid (reported cost) of seller that causes to be in the firstbest in the market , i.e., the market without buyer . We set if no such bid exists.
Now, to decide whether trade occurs between and and at which price, run the RO mechanism on this edge with SO parameters and and BO parameters and .
We note that the above offer constraints and precisely generalize the offer constraints from our hybrid mechanism for double auctions from Section 5. Indeed, in a double auction, the minimal bid of buyer that causes her to be in the firstbest in the market without is , and when in the doubleauctions setting (this is the case where we run the RO mechanism) it must be that and so , which how we set the constraint in that mechanism. The choice of is similar. The careful definition of and above guarantees the two properties of these thresholds that our doubleauction constraints readily satisfied: first, both and are completely independent of and of , and second, as we will see in our analysis, coincides with the minimal winning bid of buyer in the original market whenever this constraint is binding. (And similarly for and seller .)
To show that the Offering Mechanism is welldefined, we have to make sure that the SO and BO parameters that we specify for the RO mechanism meet the conditions imposed in the definition of that mechanism. The following Lemma does precisely this.
Lemma 6.3.
For every , it holds that (1) , (2) , and (3) .
We next prove that the Offering Mechanism is truthful, budget balanced, and has an exante guarantee.
Theorem 6.4.
The Offering Mechanism is BIC, expost IR, expost (direct trade) strongly budget balanced, and exante guarantees at least a of the expected GFT of the secondbest mechanism.
The proofs of Theorems 6.4 and 6.3 is given in Appendix E. As noted in the introduction, proving the exante guarantee of the Offering Mechanism for matching markets is the most technically challenging part of our analysis. The main ideas behind this proof are surveyed in Section 7.
6.3 The Hybrid Mechanism for Matching Markets
We are now ready to define our hybrid mechanism for matching markets. It combines the TR mechanism and the Offering Mechanism in a proper way. We note that for double auctions, the mechanism defined below reduces precisely to our hybrid mechanism for double auctions from Section 5.
Definition 5 (Hybrid Mechanism for Matching Markets).
Let be the constraints graph. Our hybrid mechanism is a direct revelation mechanism. Given the the reports (which is assumed to be truthful), the mechanism computes and and runs as follows.

If , the mechanism computes the set of trading agents and payments by running the Trade Reduction Mechanism for matching markets defined above.

Otherwise, the mechanism computes the set of trading agents and payments by running the Offering Mechanism for matching markets defined above.
We are now ready to formally state the main result of this paper.
Theorem 6.5.
The Hybrid Mechanism for matching markets is expost IR, BIC^{30}^{30}30As in the doubleauction setting, since the allocation rule of the hybrid mechanism for matching markets is expost monotone, by charging threshold prices we could strengthen the incentivecompatibility property from BIC to expost IC (while maintaining expost IR), but then the weakbudgetbalance guarantee would only hold exante and not expost (similarly to the guarantee of Theorem 2.3). Moreover, once we settle for exante budget balance, we could get exante strong budget balance “for free” by equally dividing our exante expected profits (assuming truthful bidding) among the agents, (see, e.g., Brustle et al., 2017).. and expost (direct trade) weakly budget balanced, which satisfies both of the following.

The expected GFT of this mechanism are at least of those of the secondbest mechanism.

For any with , the fraction of the gains from trade of that this mechanism attains is at least .
The hybrid mechanism for matching markets inherits from the Trade Reduction mechanism for matching markets also the expost guarantee of Corollary 6.2:
Corollary 6.6.
Let . For any with , the fraction of the gains from trade of that the Hybrid Mechanism for matching markets attains is at least .
The proofs of Corollaries 6.6 and 6.5 are given in Appendix F.
7 Sketch of the Proof of ExAnte Guarantee of the
Offering Mechanism for Matching Markets
In this section, we sketch the proof of the exante guarantee of the Offering Mechanism, which has been stated in Theorem 6.4. The full proof is relegated to Appendix E. To prove that the Offering Mechanism exante guarantees at least a fraction of the gains from trade of the secondbest mechanism, we compare the Offering Mechanism to the RVWM mechanism of Brustle et al. (2017). Due to Theorem 2.3, it suffices to show the following lemma.
Lemma 7.1.
For any valuation profile , the gains from trade of the Offering Mechanism for matching markets is at least half of the gains from trade of the RVWM mechanism for that profile.
We first provide the intuition behind Lemma 7.1. Fix a valuation profile . Let be the maximumweight matching of when edge weight is for and be the maximumweight matching of when edge weight is for .^{31}^{31}31Recall that and are the ironed virtual value functions of buyer and seller , respectively. Recall that the RVWM mechanism runs the Generalized Seller Offering Mechanism (GSOM) with probability and in that case obtains the GFT of the matching , and it runs the Generalized Buyer Offering Mechanism (GBOM) with probability and in that case obtains the GFT of the matching . It suffices to show that the GFT of each of the two matchings and can be bounded by twice the GFT of the Offering Mechanism for the valuation profile . We will show how to bound the GFT of . A similar argument can bound the GFT of .
Consider the firstbest matching together with the matching . Each connected component of the union of the two matchings is either a maximal alternating path^{32}^{32}32A path is called an alternating path if the edges of the path alternate between the two matchings. A path is maximal if it is not a subpath of any other path. or an alternating cycle^{33}^{33}33An alternating cycle is an alternating path whose two endpoints coincide.. We will show that all alternating cycles consist of two edges between the same seller and buyer (see Figure 1 (a) ) due to our tiebreaking rules (proved in Corollary E.12) and that the GFT of the Offering Mechanism from that buyerseller pair is at least the GFT of the RVWM mechanism from that pair. For an alternating path, we will consider the cases of an even or an odd number of edges of the alternating path separately, and show that in either case, the GFT of our Offering Mechanism from the path is at least half of the GFT of the matching from that path. Given the fact that and are each a maximumweight matching w.r.t. the edge weights and respectively, we prove that any maximal alternating path that is not a cycle, starts with a buyer and an edge from . See Corollary E.14 for more details. Figure 1 illustrates the three different cases in our proof.
(a)  (b)  (c) 
The following lemma plays a central role in our proof of Lemma 7.1. It provides a sufficient condition for a buyerseller pair to trade in that mechanism.
Lemma 7.2.
Fix valuation profile . For every , if is in then buyer will trade with seller in the BO Mechanism, and if is in then buyer will trade with seller in the SO Mechanism. Thus, in either case and will trade with probability at least in the Offering Mechanism.
The next lemma shows that any seller who is not at the end of any alternating path, must still be in the firstbest matching if we remove the buyer that is matched to her.
Lemma 7.3.
Let be an acyclic maximal alternating path of . For every seller who is not at the end of the path, it holds that , where is the buyer such that .
Combining Lemmas 7.2 and 7.3, we show that all sellers in a maximal alternating path of even length will trade in the BO mechanism with the buyers that are matched to them in the firstbest matching.
Next, we consider maximal alternating paths with odd length and present another useful characterization. We assume w.l.o.g. that any maximal alternating path of starts with a buyer and an edge in (by Corollary E.14). Let be the GFT of all edges of that are contained in .
Lemma 7.4.
For , let , be a maximal alternating path of odd number of edges of with denoting buyers and denoting sellers, and with . It holds that

if then .

if then .
Proof of Lemma 7.1.
By Corollary E.12, any alternating cycle of and has only two (identical) undirected edges . If or , by Lemma 7.2 buyer will trade with seller in the Offering Mechanism with probability at least , which obtains at least half of the GFT that the RVWM mechanism obtains on when the profile is . Otherwise, since we have that , and since we have that . Since trade occurs with positive probability on in the RVWM mechanism, then similarly to the doubleauction case, by Observation 2.2 and Lemma 4.2(2), our Offering Mechanism achieves at least the gains from trade of the RVWM mechanism on this edge (and therefore, on any alternating cycle).
Consider any maximal alternating path of even number of edges. By Lemmas 7.3 and 7.2, every pair trades in the BO mechanism, so whenever the BO mechanism runs, the maximal GFT (firstbest) of the agents in the alternating path, which is at least the GFT of from these agents, is obtained. The Offering Mechanism runs the BO mechanism is probability , so in expectation it obtains at least the GFT of