Markets for Decentralized Computation

Naveen Durvasula 10 days ago

Decentralized computing systems like blockchains, oracles, and prover markets require incentives to be set appropriately in order for the system to operate at optimal efficiency. In these systems, there are users who have demand for compute requests (e.g. transactions, proofs, API requests, etc.), and there are nodes (e.g. validators, provers, oracles) who supply computation. Implicit in the design of a decentralized computing system is a protocol that (i) determines which user requests get service and which nodes provide service, and (ii) given that allocation of user requests to nodes, determines how much users pay for service, and how much nodes receive as payment for service.

Both decisions about the allocation of requests to nodes and pricing/payment must be made in the presence of many constraints, and these constraints make it very challenging to design systems that are optimally efficient. For example, only some allocations of user requests to nodes may be valid: nodes have compute limits and a given request may require a diverse collection of node resources. A request may even require the resources of multiple nodes (this is true e.g. in a blockchain, where transactions must be redundantly executed by many validators). An efficient allocation of requests to nodes not only satisfies all of those constraints, but also maximizes the economic value generated by the allocation by providing service to requests who are willing to pay the most and utilizing the nodes who can do the work at the lowest cost. And when it comes to pricing and payment, the protocol must choose payments that are low enough that users will accept them while providing rewards to nodes that are high enough that they’ll choose to provide service.

Designers of decentralized computing systems therefore have to manage a delicate balance between tractability and efficiency. If the system is very expressive and allows users and nodes to specify more complex constraints, then it may become intractable to find feasible allocations of requests to nodes that satisfy those constraints. The protocol also needs information about how much users are willing to pay and how much nodes pay in costs in order to find an efficient allocation and pricing/payment. Acquiring this information is difficult: direct elicitation in the form of bidding may fail or lead to distorted results due to the strategic behavior of users and nodes, preventing the protocol from efficiently utilizing its scarce resources. Furthermore, the hassle of bidding may in its own right deter users from using the system. For example, notice that even though most blockchains (e.g. Bitcoin, Ethereum, Solana) allocate resources at the protocol level by eliciting bids for transaction inclusion, most users prefer to use a wallet that bids on their behalf instead of placing bids themselves. Thus, in practice, empirical evidence would strongly suggest that an end-to-end protocol must make these allocation and pricing/payment decisions while offering a posted-price experience.

MetaMask's menu of posted prices for transaction priority fees.

MetaMask's menu of posted prices for transaction priority fees.

At Ritual, we’re trying to enable the inclusion of transactions that require specialized computation (e.g. AI inference). While our fee mechanism Resonance has some nice properties (e.g. strategic simplicity, surplus-maximization, etc.), it still requires that people place bids. In this post, we look into whether a mechanism can be developed that solves the same problem while offering a posted-price experience. Although we reference Resonance, this post aims to be self-contained/doesn’t require the reader to have read previous posts. This post further generalizes far beyond transaction fee mechanisms, and discusses mechanism design within the general context of incentivizing distributed computing.

The main contribution of this post is a novel mechanism that theoretically works for any decentralized computing system, and determines the most economically valuable allocation of user requests to node resources, offering corresponding non-extractive posted prices to users and nodes that both parties would accept. There is a key difference between this mechanism and existing market mechanisms for decentralized computation: it obtains information regarding user valuations and node costs by making use of sophisticated third-party market-makers instead of relying on elicitation. Whereas market-makers on CLOBs are primarily responsible for simply setting posted prices for a traded asset, this mechanism incentivizes them to also find economically valuable allocations of requests to nodes.

TL;DR/Post contributions:

  1. Defines the market-design problem for compute markets with general constraints (adapted from Resonance)
  2. Gives a mathematical primer on some market design vocabulary
  3. Presents a novel posted price mechanism that (i) picks the most economically valuable utilization of network compute resources given execution constraints (ii) selects pricing and node rewards that all parties will agree to, and (iii) selects pricing in a way that is not extractive, nor requires subsidies.

The sections labeled “Attempt 1” through “Attempt 3” can be skipped/skimmed for an abridged reading experience. These sections motivate the mechanism by walking through why simpler approaches wouldn’t work, beginning with a centralized market mechanism. Even if the market-makers have perfect information about demand and supply, incentivizing them to disclose this information is a highly nuanced problem.

Compute Markets with General Constraints

First, let’s outline the problem we’re trying to solve. In a compute market, users arrive with some compute requests TT. These compute requests are to be executed by a set of nodes NN. The goal of the market is to (i) figure out how to allocate compute requests to nodes (i.e. determine which nodes should execute which requests), and (ii) figure out payments: how much users should pay for receiving service and how much nodes should be paid for providing service. The catch is that there are complex constraints on how we’re allowed to allocate requests and nodes in (i).

In Ritual’s setting, the compute requests TT would correspond to transactions containing stateful precompiles that require specialized computation for execution (as discussed in previous Resonance posts). The nodes NN would correspond to specialized compute providers. There are several complex constraints in how we’re allowed to execute transactions on different nodes. For example, the nodes must have the hardware and software to support these transactions. Transactions that modify the same parts of the chain’s state also can’t be executed in parallel on different nodes, or else we’ll end up with an invalid state transition. In all, this makes Ritual’s block-building problem substantially more complicated than other L1s. In the Resonance posts, we called this market-design problem “The Heterogeneous Setting”.

Goal 1: Find an allocation.

Let’s dig a little deeper into the two goals of the market, focusing first on the allocation. In order to prove formal theorems about this market, we need some additional modeling. We define an allocation to be a map: α:T2N\alpha: T \to 2^N that specifies what subset of nodes in NN are responsible for executing each request. For example, if we want to allocate a request tt to be executed by node n1n_1, we’d consider an allocation α\alpha where α(t)={n1}\alpha(t) = \{n_1\}. If a compute request tt needs multiple nodes to execute (for example, if we want to redundantly compute tt on nodes n1n_1 and n2n_2 to get a better trust guarantee), then we’d consider an allocation α\alpha where α(t)={n1,n2}\alpha(t) = \{n_1, n_2\}. We may also have a compute request tt that we can’t allocate because there aren’t any compatible nodes available. In that situation, we’d consider an allocation α\alpha where α(t)=\alpha(t) = \emptyset.

Next, we need to model constraints on the allocation. Recall that in the setting we’re working in, we might have complex constraints beyond simple node compute capacity/gas constraints. We allow for general constraints VV, where VV is a set of allocations α:T2N\alpha: T \to 2^N, and enforce that the market must select a valid allocation αV\alpha \in V. We make no restrictions on VV.

In Ritual’s setting we can encode node capacity constraints and hardware/software support constraints by only allowing allocations α\alpha to be in VV if, for each node nNn \in N, the bundle of transactions

α1(n)={tTnα(t)} \alpha^{-1}(n) =\{t \in T \mid n \in \alpha(t)\}

allocated to nn under α\alpha can be executed by nn. We can encode transaction hardware/software support constraints by only allowing allocations α\alpha in VV if the nodes α(t)\alpha(t) that tt is allocated to are capable of executing tt. More broadly, we can enforce that state conflicts do not occur, etc., by making the appropriate restrictions on VV.

Goal 2: Determine pricing.

Next, let’s take a closer look at payments. The market needs to decide how much users should pay for service and how much nodes must receive for service. To formalize that, we define a request payment rule π:TR\pi: T \to \R that specifies how much each request tt should pay for service, and a node payment rule ϕ:NR\phi: N \to \R that specifies how much each node nn should receive for providing service.

A Compute Market Instance

Now that we have some mathematical scaffolding to work with, we can take a look at an example of a market instance.

graphic-02.png

In this example, there are two requests T={t1,t2}T = \{t_1, t_2\} and two nodes N={n1,n2}N = \{n_1, n_2\}. The request t1t_1 requires both nodes for valid execution, but the request t2t_2 may be executed on either one. A constraint exists that prevents any node from executing both requests. As a result, there are only four valid allocations V={α,α1,α2,α3}V = \{\alpha_\emptyset, \alpha_1, \alpha_2, \alpha_3\}, where α\alpha_\emptyset allocates none of the requests, α1\alpha_1 allocates only t1t_1 to both nodes, α2\alpha_2 allocates only t2t_2 to node n1n_1, and α3\alpha_3 allocates only t2t_2 to node n2n_2. These allocations are notated formally below, and shown graphically in the image above.

α(t):=α1(t):={{n1,n2}t=t1elseα2(t)={{n1}t=t2elseα3(t)={{n2}t=t2else\alpha_\emptyset(t) := \emptyset \qquad \alpha_1(t) := \begin{cases}\{n_1,n_2\} & t = t_1\\ \emptyset & \text{else}\end{cases} \qquad \alpha_2(t) = \begin{cases}\{n_1\} & t = t_2\\ \emptyset & \text{else}\end{cases} \qquad \alpha_3(t) = \begin{cases}\{n_2\} & t = t_2\\ \emptyset & \text{else}\end{cases}

To clear this market, we need to select one of the allocations αV\alpha \in V within our valid collection of allocations, and select prices π\pi for the requests to pay and rewards ϕ\phi for the nodes to receive. Furthermore, we’d like the experience for users submitting requests and nodes that are servicing requests to be a posted price experience— neither party should have to bid. But if all we cared about was meeting that desiderata, we might as well choose the allocation α\alpha_\emptyset and set all payments/rewards to zero. We’re missing a crucial second desiderata: that we’d like to select an economically efficient outcome. To make mathematical sense out of that, we need to introduce an economic model for market participants.

Market Participant Incentives

More concretely, we need to model the preferences of market participants. We adopt a simple model: for each compute request tTt \in T, the user who submitted it is willing to pay up to their valuation vt0v_t \ge 0 for its execution. That is, if the price π(t)vt\pi(t)\le v_t offered for executing tt is below or equal to the valuation for the request, then the user will choose to accept the offer (and will choose to reject the offer otherwise). Similarly, for each node nNn \in N, each node has a cost cn0c_n \ge 0 which represents the lowest payment they’ll accept in exchange for service; if the reward offered ϕ(n)cn\phi(n) \ge c_n is greater than or equal to the node’s cost, then the node will choose accept the offer and provide service (and will choose to reject the offer otherwise).

graphic-03.png

To make this concrete, let’s revisit our earlier example. Now, each of the requests has a valuation: t1t_1 is willing to pay at most 66 tokens for service, and t2t_2 is willing to pay at most 44 tokens for service. Similarly, each node has a cost: nodes n1n_1 and n2n_2 will accept any offer that pays at least 11. Recall that as before, there are three non-null allocations that are valid in this example: V={α,α1,α2,α3}V = \{\alpha_\emptyset, \alpha_1, \alpha_2, \alpha_3\}.

Utilities

Let’s take a closer look at the preferences of our market participants. Users will accept an offer for service for a request tt if their payment is less than their valuation π(t)vt\pi(t) \le v_t. But there’s more richness here: if given the choice between two offers for service where one is cheaper than the other, a user will prefer the cheaper option. We can write down the utilities of each market participant, which represents the amount of value in tokens that the participant gains (or loses) from their interaction with the market. The utility of a user submitting a request tt under an allocation α\alpha and payment rule (π,ϕ)(\pi, \phi) can be modeled as

ut(α,π):=1[α(t)]vtuser’s value for serviceπ(t)payment for serviceu_t(\alpha, \pi) := \underbrace{\boldsymbol 1[\alpha(t) \ne \emptyset] \cdot v_t}_{\text{user's value for service}} - \underbrace{\pi(t)}_{\text{payment for service}}

Going back to our example, recall that t2t_2 was willing to pay at most 44 tokens for service. Suppose we clear the market under the allocation α2\alpha_2 and set π(t2)=2\pi(t_2) = 2 tokens. Since t2t_2 is allocated under α2\alpha_2 (as α2(t2)={n1}\alpha_2(t_2) = \{n_1\} \ne \emptyset), the utility that t2t_2 obtains is equal to

ut2(α2,π):=1[α2(t2)]vt2π(t)=vt2π(t2)=42=2u_{t_2}(\alpha_2, \pi) := \boldsymbol 1[\alpha_2(t_2) \ne \emptyset] \cdot v_{t_2} - \pi(t) = v_{t_2} - \pi(t_2) = 4 - 2 = 2

tokens. These 22 tokens of value represent the economic surplus that t2t_2 received by participating in the market. Suppose we set π(t1)=0\pi(t_1) = 0 under the same allocation α2\alpha_2. Since t1t_1 is not allocated under α2\alpha_2 (as α2(t1)=\alpha_2(t_1) = \emptyset), the utility that t1t_1 obtains is equal to 00=00 - 0 = 0 tokens.

What about the utility for nodes? Returning to our simple model, a node nn will accept an offer to provide service if their reward exceeds their cost ϕ(n)cn\phi(n) \ge c_n. Further, if given the choice between two offers to provide service where one pays more than another, the node will prefer the option that pays more. As such, we model the utility of a node nn under an allocation α\alpha and payment rule (π,ϕ)(\pi, \phi) as

un(α,ϕ):=ϕ(n)node’s reward for providing service1[α1(n)]cnnode’s cost for providing serviceu_n(\alpha, \phi) := \underbrace{\phi(n)}_{\text{node's reward for providing service}} - \underbrace{\boldsymbol 1[\alpha^{-1}(n) \ne \emptyset] \cdot c_n}_{\text{node's cost for providing service}}

In our running example, suppose that we again select the allocation α2\alpha_2 and set ϕ(n1)=2\phi(n_1) = 2. Since n1n_1 is allocated under α2\alpha_2 (as α21(n1)={t2}\alpha_2^{-1}(n_1) = \{t_2\} \ne \emptyset), the utility that n1n_1 obtains is equal to

un1(α2,ϕ):=ϕ(n1)1[α21(n1)]cn1=ϕ(n1)cn1=21=1u_{n_1}(\alpha_2, \phi) := \phi(n_1) - \boldsymbol 1[\alpha_2^{-1}(n_1) \ne \emptyset] \cdot c_{n_1} = \phi(n_1) - c_{n_1} = 2 - 1 = 1

token. Suppose that we set ϕ(n2)=0\phi(n_2) = 0 again under the allocation α2\alpha_2. Since n2n_2 is not allocated under α2\alpha_2 (α21(n2)=\alpha_2^{-1}(n_2) = \emptyset), the utility n2n_2 obtains is equal to 00=00 - 0 = 0 tokens.

As an aside, our model for node costs without loss of generality extends to the case where nodes may face different costs for different workloads. This is because we can set arbitrary validity sets VV; to represent a node that faces different costs across different workloads, we can simply instantiate multiple nodes, where a valid allocation can only allocate to one of these instantiations. Each instantiation has a different cost, and a different collection of valid requests that it can service.

Individual Rationality

We can now relate these definitions for the market participants’ utilities to the simple model we described earlier. If a user submitting a request tt is given an offer for service such that π(t)vt\pi(t) \le v_t, then that offer for service corresponds to an allocation α\alpha such that α(t)\alpha(t) \ne \emptyset. As such,

ut(α,π)=1[α(t)]vtπ(t)=vtπ(t)0u_t(\alpha, \pi) = \boldsymbol 1[\alpha(t) \ne \emptyset] \cdot v_t - \pi(t) = v_t - \pi(t) \ge 0

Similarly, if a node is offered a reward ϕ(n)cn\phi(n) \ge c_n in exchange for service, then that offer corresponds to an allocation α\alpha such that α1(n)\alpha^{-1}(n) \ne \emptyset. Accordingly,

un(α,ϕ)=ϕ(n)1[α1(n)]cn=ϕ(n)cn0u_n(\alpha, \phi) = \phi(n) - \boldsymbol 1[\alpha^{-1}(n) \ne \emptyset] \cdot c_n = \phi(n) - c_n \ge 0

The converse of these statements is also true: if a user submitting a request obtains non-negative utility, then they must have received service at a price that is at most their valuation. If a node providing service obtains non-negative utility, then they must have been offered a reward that exceeds their cost. Market participants will accept an allocation α\alpha with payment rule (π,ϕ)(\pi, \phi) if all participants have non-negative utility. If this holds true, then we call (α,π,ϕ)(\alpha, \pi, \phi) individually rational. If the mechanism returns an allocation and pricing that is not individually rational, then participants will not choose to use the mechanism.

Returning to our running example, let’s suppose that we indeed have chosen the allocation α1\alpha_1. Let’s run through some example payment rules:

π1(t):={8t=t10t=t2ϕ1(n):={7.5n=n10.5n=n2\pi_1(t) := \begin{cases}8 & t = t_1\\ 0 & t = t_2\end{cases} \qquad \qquad \phi_1(n) := \begin{cases} 7.5 & n = n_1 \\ 0.5 & n = n_2 \end{cases}
π2(t):={5t=t10t=t2ϕ2(n):={2n=n12n=n2\pi_2(t) := \begin{cases}5 & t = t_1\\ 0 & t = t_2\end{cases} \qquad \qquad \phi_2(n) := \begin{cases} 2 & n = n_1 \\ 2 & n = n_2 \end{cases}
π3(t):={4t=t10t=t2ϕ3(n):={2n=n12n=n2\pi_3(t) := \begin{cases}4 & t = t_1\\ 0 & t = t_2\end{cases} \qquad \qquad \phi_3(n) := \begin{cases} 2 & n = n_1 \\ 2 & n = n_2 \end{cases}
π4(t):={3t=t10t=t2ϕ4(n):={2n=n12n=n2\pi_4(t) := \begin{cases}3 & t = t_1\\ 0 & t = t_2\end{cases} \qquad \qquad \phi_4(n) := \begin{cases} 2 & n = n_1 \\ 2 & n = n_2 \end{cases}

Under α1\alpha_1, we can see that the payment rule (π1,ϕ1)(\pi_1, \phi_1) is not individually rational, since

8=π1(t1)>1[α1(t1)]vt1=68 = \pi_1(t_1) > \boldsymbol 1[\alpha_1(t_1) \ne \emptyset] \cdot v_{t_1} = 6

It violates individual rationality a second time, since

12=ϕ1(n2)<1[α11(n2)]cn2=1\frac12 = \phi_1(n_2) < \boldsymbol 1[\alpha_1^{-1}(n_2)] \cdot c_{n_2} = 1

All three payment rules (π2,ϕ2)(\pi_2, \phi_2), (π3,ϕ3)(\pi_3, \phi_3) and (π4,ϕ4)(\pi_4, \phi_4) are individually rational under α1\alpha_1. That is, the market would clear the allocation α1\alpha_1 if the prices (π2,ϕ2)(\pi_2, \phi_2), (π3,ϕ3)(\pi_3, \phi_3), or (π4,ϕ4)(\pi_4, \phi_4) were offered to users and nodes.

Aggregate Utility

The previous definitions aimed to characterize the preferences of individual market participants. Ideally, we would like to be able to say something about our market mechanism providing good aggregate outcomes for all of the market participants. Just like how we defined a utility function for each individual, let’s think about how we might define an analogue of a utility function for the entire market. We’ll use these aggregate definitions to develop a principled way for accomplishing our two goals of choosing an allocation and determining payments.

Welfare

Recall that in our model for each individual’s utility, there were two terms that were added (or subtracted) together. One term indicated how much value the market participant got from the allocation — in the case of requests this was their valuation (maximum willingness to pay) and in the case of nodes this was their cost (minimum reward to provide service). The other term offset the individual’s utility based on the payment rule, reducing the individual’s utility by a payment (in the case of a request) or increasing the individual’s utility by a reward (in the case of a node).

Let’s focus on the first term that depends only on the allocation. We call the aggregate analogue of this term welfare. Welfare W:VR\mathcal W: V \to \mathbb R is formally defined as

W(α):=tTvt1[α(t)]total value accrued to usersnNcn1[α1(n)]total cost borne by nodes\mathcal{W}(\alpha) := \underbrace{\sum_{t \in T} v_t \cdot \boldsymbol 1[\alpha(t) \ne \emptyset]}_{\text{total value accrued to users}} - \underbrace{\sum_{n \in N} c_n \cdot \boldsymbol 1[\alpha^{-1}(n) \ne \emptyset]}_{\text{total cost borne by nodes}}

Welfare measures the total value (in tokens) generated by an allocation α\alpha by adding up the valuations of all allocated requests and subtracting the costs of all allocated nodes; we may charge users in aggregate up to vtv_t for each user whose request was allocated and have them take the offer, but we only need to pay out a minimum of cnc_n for each node providing service, generating W(α)\mathcal W(\alpha) in net value. Another way to think about W(α)\mathcal W(\alpha) is that market participants, in aggregate, are willing to pay W(α)\mathcal W(\alpha) for trade to take place under the allocation α\alpha.

We can compare allocations on the basis of the welfare they generate for market participants. As a concrete example, below we compute the welfare for each of the allocations in our running example:

W(α)=00=0W(α1)=vt1cn1cn2=4W(α2)=vt2cn1=3W(α3)=vt2cn2=3\begin{align*} \mathcal W(\alpha_\emptyset) &= 0 - 0 = 0\\ \mathcal W(\alpha_1) &= v_{t_1} - c_{n_1} - c_{n_2} = 4\\ \mathcal W(\alpha_2)&= v_{t_2}-c_{n_1}=3\\ \mathcal W(\alpha_3)&=v_{t_2}-c_{n_2}=3 \end{align*}

We can see that the allocation α1\alpha_1 is the most economically valuable out of the valid allocations, so we’d ideally like the market mechanism to select it. That takes care of our first goal we had for our market mechanism of finding an allocation, but how should we set payments?

Margin

Clearly, we would like our payment rules to be individually rational under the allocation that we select, otherwise market participants will choose not to participate in the market mechanism. But even though they’re all individually rational, are the payment rules (π2,ϕ2)(\pi_2, \phi_2), (π3,ϕ3)(\pi_3, \phi_3), and (π4,ϕ4)(\pi_4, \phi_4) that we defined earlier all equally good?

To devise a more principled method for setting payments, let’s now try to think of an aggregate form of the other term in an individual’s utility that keeps track of the offset due to request’s payment or node’s reward. We can define the margin of a payment rule (π,ϕ)(\pi, \phi) as

M(π,ϕ):=tTπ(t)total payments collected from usersnNϕ(n)total rewards paid to nodes\mathcal M(\pi, \phi) := \underbrace{\sum_{t \in T} \pi(t)}_{\text{total payments collected from users}} -\underbrace{ \sum_{n \in N} \phi(n)}_{\text{total rewards paid to nodes}}

The margin keeps track of how much more (or less) was collected from users by the marketplace in fees relative to what was paid out to nodes as rewards. Ideally, we’d like to select a payment rule that neither extracts money from users nor requires a subsidy from the market in order for trade to take place.

Let’s compute the margins of each of the payment rules:

M(π1,ϕ1)=87.5.5=0M(π2,ϕ2)=522=1M(π3,ϕ3)=422=0M(π4,ϕ4)=322=1\begin{align*} \mathcal M(\pi_1, \phi_1) &= 8 - 7.5 - .5 = 0\\ \mathcal M(\pi_2, \phi_2) &= 5 - 2 - 2 = 1 \\ \mathcal M(\pi_3, \phi_3) &= 4 - 2 - 2 = 0\\ \mathcal M(\pi_4, \phi_4) &= 3 - 2 - 2 = -1 \end{align*}

Notice how (π2,ϕ2)(\pi_2, \phi_2) has a positive margin and is thus extractive— more money is taken from users than is paid out to nodes. Although W(α1)=4\mathcal W(\alpha_1) = 4 tokens of value are generated by the allocation α1\alpha_1, the users and nodes only get to “keep” 3 of those tokens, since the market takes a margin of 11 token under this payment rule.

Conversely, notice that the payment rule (π4,ϕ4)(\pi_4, \phi_4) has a negative margin and is thus not budget-balanced— more money is paid out to nodes than is taken from users. As a result, the marketplace is subsidizing trade by 11 token, which may not be sustainable in the long-run.

Payment rules (π1,ϕ1)(\pi_1, \phi_1) and (π3,ϕ3)(\pi_3, \phi_3) are both non-extractive and budget-balanced. In particular, (π3,ϕ3)(\pi_3, \phi_3) is the only payment rule of these four that is individually-rational, non-extractive, and budget-balanced.

Surplus

Now let’s put everything together to get the full form of aggregate utility, which we’ll call surplus. We defined welfare and margin to be aggregate forms of the two terms that make up each individual’s utility. Let’s make that intuition precise. Formally, the surplus

S(α,π,ϕ):=W(α)total value generated by the allocationM(π,ϕ)total margin collected by the marketplace\mathcal S(\alpha, \pi, \phi) := \underbrace{\mathcal W(\alpha)}_{\text{total value generated by the allocation}} - \underbrace{\mathcal M(\pi, \phi)}_{\text{total margin collected by the marketplace}}

is given by the welfare minus the margin. This looks very similar to the utility function we wrote down for each individual: the first term represents the total economic value generated from trade, and the second term offsets that by any payments that are made in aggregate to the marketplace. Expanding, we can also rewrite the surplus as

S(α,π,ϕ)=W(α)M(π,ϕ)=tTvt1[α(t)]nNcn1[α1(n)]welfaretTπ(t)nNϕ(n)margin=tT(vt1[α(t)]π(t))+nN(ϕ(n)cn1[α1(n)])=tTut(α,π)+nNun(α,ϕ)\begin{align*}\mathcal S(\alpha, \pi, \phi) &= \mathcal W(\alpha) - \mathcal M(\pi, \phi) \\ &= \underbrace{\sum_{t \in T} v_t \cdot \boldsymbol 1[\alpha(t) \ne \emptyset] - \sum_{n \in N}c_n \cdot \boldsymbol 1[\alpha^{-1}(n) \ne \emptyset]}_{\text{welfare}} - \underbrace{\sum_{t \in T} \pi(t) - \sum_{n \in N} \phi(n)}_{\text{margin}} \\ &= \sum_{t \in T}\left(v_t \cdot \boldsymbol 1[\alpha(t) \ne \emptyset] - \pi(t)\right) + \sum_{n \in N} \left(\phi(n) - c_n \cdot \boldsymbol 1[\alpha^{-1}(n) \ne \emptyset]\right)\\ &= \sum_{t \in T}u_t(\alpha, \pi) + \sum_{n \in N}u_n(\alpha, \phi) \end{align*}

In other words, the surplus is exactly equal to the sum of all market participants’ utilities, and therefore denotes the total willingness to pay the market has for the option provided by the market.

We would ideally like to accomplish our two goals of finding an allocation and determining payments/rewards in a way that is individually rational and maximizes surplus.

Claim: An allocation and budget-balanced payment rule (α,π,ϕ)(\alpha, \pi, \phi) maximizes surplus if and only if α\alpha maximizes welfare and (π,ϕ)(\pi, \phi) has zero margin.

Intuition: Since the payment rule is budget-balanced, it can’t have a negative margin. Therefore, any (α,π,ϕ)(\alpha, \pi, \phi) with α\alpha welfare-maximizing and (π,ϕ)(\pi, \phi) with zero margin must be surplus-maximizing. Furthermore, for any allocation, there’s a way to make a zero margin payment rule, by simply setting node rewards ϕ(n)=tα1(n)π(t)\phi(n) = \sum_{t \in \alpha^{-1}(n)}\pi(t) equal to the sum of the payments that the requests allocate. Therefore, any surplus-maximizing (α,π,ϕ)(\alpha, \pi, \phi) must have α\alpha as welfare maximizing, else we could increase surplus by choosing a higher welfare allocation and selecting a zero-margin payment rule.

Designing a Posted-Price Market Mechanism

Now that we have all of those primitives under our belt, we can return to the original problem: designing a posted-price mechanism for a compute market with general constraints. The end-to-end flow that we’re shooting for is as follows:

  1. Users submit requests and corresponding execution constraints. Nodes submit execution constraints. These (and additional system-wide constraints) are aggregated into a set VV of valid allocations.
  2. The market mechanism selects a valid allocation αV\alpha \in V and a payment rule (π,ϕ)(\pi, \phi). Prices and allocation results are then served to users
  3. Users and nodes choose to either accept or reject the allocation results at the prices specified by the payment rule.

graphic-04.png

The meat of this problem is in the second step. Concretely, given a set of valid allocations VV, We would like to select an allocation rule α\alpha and payment rule (π,ϕ)(\pi, \phi) that satisfy two properties:

Surplus Maximization: The allocation and payment rule (α,π,ϕ)(\alpha, \pi, \phi) should maximize surplus, or the economic value that is distributed to the market participants.

Individual Rationality: The payment rule (π,ϕ)(\pi, \phi) should be individually rational under α\alpha so that in step 3, all parties agree to the allocation and payments selected by the mechanism, and the market clears.

Using the intuition we developed in the previous section, we may equivalently require that the the below three conditions are met; it’ll sometimes be useful to refer back to this in our subsequent analysis:

Welfare Maximization: The allocation α\alpha should be maximal in terms of the economic value W(α)\mathcal W(\alpha) it generates.

Zero Margin: The marketplace should neither be extractive, nor should it require subsidies for trade to occur. That is, the margin M(π,ϕ)\mathcal M(\pi, \phi) of the payment rule should be equal to zero.

Individual Rationality: The payment rule (π,ϕ)(\pi, \phi) should be individually rational under α\alpha so that in step 3, all parties agree to the allocation and payments selected by the mechanism, and the market clears.

Crucially in this flow, users and nodes do not ever submit bids or otherwise signal their valuations or costs. So how can we compute a good allocation α\alpha and payment rule (π,ϕ)(\pi, \phi) without any information?

Attempt 1: Centralized Routing

With truly no information about valuations and costs, it’s clearly impossible to find the most economically valuable allocation and set prices appropriately. To resolve this, we introduce an informed market-maker (referred to as a broker in previous posts) whose job it is to set a good allocation and payment rule. In what follows, we’ll assume that the market-maker is a profit-maximizing entity with perfect information. The idea behind assuming perfect information is (i) simplicity of analysis, and (ii) to understand what happens in the limit case when the market-maker becomes highly sophisticated (e.g. as has occurred in established centralized matching markets like Uber).

A straight-forward approach for clearing the market that is used by many centralized online marketplaces looks something like the below mechanism:

Let’s go back to our running example to see how this market mechanism would work. Which allocation would the market-maker select? We’ll begin by supposing that the market-maker selected allocation α1\alpha_1. Now we can try to see what the market-maker would charge to maximize profit. In allocation α1\alpha_1, request t1t_1 is allocated to both n1n_1 and n2n_2. Since request t2t_2 is not allocated, the market-maker must set t2t_2’s payment π(t2)=0\pi(t_2) = 0, or else t2t_2 will reject the offer. To maximize the margin M(π,ϕ)\mathcal M(\pi, \phi), the market-maker should charge t1t_1 as much as possible, and pay as little as possible to the nodes. Since t1t_1 has a valuation of 66, and won’t accept any offer that charges more than that, we should correspondingly set π(t1)=vt1=6\pi(t_1) = v_{t_1} = 6. Similarly, we should set ϕ(n1)=cn1=1\phi(n_1) = c_{n_1} = 1 and ϕ(n2)=cn2=1\phi(n_2) = c_{n_2} = 1. This yields a total margin of M(π,ϕ)=611=4\mathcal M(\pi, \phi) = 6 - 1 - 1 = 4. Notice that this is equal to the welfare of α1\alpha_1. If the market-maker were to choose α2\alpha_2 or α3\alpha_3, the most that could be extracted in margin would be W(α2)=W(α3)=3\mathcal W(\alpha_2) = \mathcal W(\alpha_3) = 3.

Theoretical Analysis

Let’s try to generalize what happened in the previous example. Recall that we’ve assumed that the market-maker is profit-maximizing and has perfect information. We can deduce the properties of the final allocation and payment rule using the following key claim:

Claim: Fixing a specific valid allocation α\alpha, the market-maker maximizes profit by charging each request equal to the request’s valuation (if allocated)

π(t)=1[α(t)]vt,\pi(t) = 1[\alpha(t) \ne \emptyset] \cdot v_t,

and paying each node its cost (if allocated)

ϕ(n)=1[α1(n)]cn\phi(n) = 1[\alpha^{-1}(n) \ne \emptyset] \cdot c_n

The total profit the market-maker receives M(π,ϕ)=W(α)\mathcal M(\pi, \phi) = \mathcal W(\alpha) is equal to the welfare of the allocation.

Intuition: Supposing that the market-maker has committed to selecting some particular allocation αV\alpha \in V, the market-maker can maximize their margin M(π,ϕ)\mathcal M(\pi, \phi) by charging users as much as possible and paying nodes as little as possible. The market-maker can’t charge an arbitrarily large amount of money, or else the users and nodes won’t accept the offer. The most the market-maker can charge while having users accept the offer is vtv_t if the request is allocated (i.e. α(t)\alpha(t) \ne \emptyset), or 00 in the case that the request is not allocated. Similarly, the least that the market-maker can pay out to the nodes is cnc_n if the node is allocated (i.e. α1(n)\alpha^{-1}(n) \ne \emptyset) or 00 if the node is not allocated. This yields the payment rules π(t)=1[α(t)]vt\pi(t) = 1[\alpha(t) \ne \emptyset] \cdot v_t and ϕ(n)=1[α1(n)]cn\phi(n) = 1[\alpha^{-1}(n) \ne \emptyset] \cdot c_n as claimed. We can now compute the total margin that the market-maker makes as

M(π,ϕ)=tTπ(t)nNϕ(n)=tα(t)vtnα1(n)cn=W(α)\mathcal M(\pi, \phi) = \sum_{t \in T}\pi(t) - \sum_{n \in N} \phi(n) = \sum_{t \mid \alpha(t) \ne \emptyset} v_t - \sum_{n \mid \alpha^{-1}(n) \ne \emptyset} c_n = \mathcal W(\alpha)

Mechanism Properties

We can now go through each of our desired properties:

  • Welfare Maximization: A profit-maximizing market-maker will select a welfare-maximizing allocation. For any fixed allocation α\alpha, a profit-maximizing market-maker can achieve profit equal to the welfare of the allocation W(α)\mathcal W(\alpha) and no greater (as described in the claim), otherwise users/nodes will not accept the offer. Therefore, to maximize profit, the market-maker should choose the allocation that maximizes welfare.

  • Zero Margin: As illustrated in the claim, a profit-maximizing market-maker will select payment rules such that the margin is equal to welfare M(π,ϕ)=W(α)\mathcal M(\pi, \phi) = \mathcal W(\alpha). That is, rather than having zero margin, the mechanism is maximally extractive, all of the gains from trade are taken by the market-maker.

  • Individual Rationality: A profit-maximizing market-maker will select a payment rule (π,ϕ)(\pi, \phi) that is individually rational under a welfare-maximizing allocation α\alpha, or else users/nodes will not accept the offer and the market-maker will make no profit.

Attempt 2: Competing Market-Makers

To get a better market mechanism, we need to fix the fact that the central market-maker extracted all of the gains from trade. A natural way to do this is to introduce competition. Instead of having just one market-maker, what if we introduce additional market-makers to compete? Let’s modify the mechanism to allow multiple market-makers to submit proposals. Now we need some way of having the market mechanism decide which proposal to accept. The simple solution to drive margins to zero would be to select the proposal with the lowest margin:

Now let’s try to reason about how this mechanism behaves, returning to our running example. We saw that if there was just one market-maker, then the mechanism would select the allocation α1\alpha_1 and choose payments (π,ϕ)(\pi, \phi) that would charge t1t_1 her valuation vt=6v_t = 6 and pay nodes n1n_1 and n2n_2 their costs cn1c_{n_1} and cn2c_{n_2} respectively, to obtain a margin M(π,ϕ)=4\mathcal M(\pi, \phi) = 4. What happens when we add a second market-maker?

Competing with a fixed allocation

First, let’s suppose that both market-makers (let’s call them Alice and Bob) are forced to choose the allocation α1\alpha_1. We’ll reason about the final payment rule that will be selected by the mechanism. Given that we’ve already assumed that Alice and Bob have chosen the allocation α1\alpha_1 (and that this is common knowledge), Alice and Bob’s choices are restricted to selecting a payment rule. Neither Alice nor Bob would choose a payment rule (π,ϕ)(\pi, \phi) that has negative margin M(π,ϕ)<0\mathcal M(\pi, \phi) < 0, or else they’ll lose money in the case that they win.

Now let’s think about things from Alice’s perspective. Let’s suppose that Bob has chosen a payment rule (π,ϕ)(\pi', \phi'). What payment rule (π,ϕ)(\pi, \phi) should Alice choose as a best response? Alice wouldn’t want to violate the individual rationality constraints or else if she wins, then she’ll have to pay a penalty of γ\gamma. Next, suppose that Bob’s margin M(π,ϕ)\mathcal M(\pi', \phi') > 0. Alice can’t win with any margin greater than Bob’s. Thus, Alice should choose an individually rational payment rule (π,ϕ)(\pi, \phi) where M(π,ϕ)\mathcal M(\pi, \phi) is just a tad less than Bob’s margin M(π,ϕ)\mathcal M(\pi', \phi') so that her submission will beat Bob’s and she can extract the largest possible margin.

But from Bob’s perspective, things look the same! He also wants to undercut Alice’s margin by just a tad so that he wins and can extract the largest possible margin. As a result, the only joint strategies of Alice and Bob where neither wants to change their strategy (i.e. pure Nash equilibria) are those in which one of the two has selected an individually rational proposal with zero margin. So does that mean we’ve solved the problem?

Competing without a fixed allocation

Unfortunately, not quite. Our whole analysis hinged on Alice and Bob being forced to select α1\alpha_1. But how would we force them to do this? Remember, in our model, the market-makers are assumed to have perfect information about the valuations and costs of the requests and nodes. However, the market mechanism itself does not have any such information. There’s no way for the mechanism to know that α1\alpha_1 was the most economically valuable allocation. In the centralized case, this didn’t matter, since the market-maker was incentivized to choose the most economically valuable allocation so that she could extract as much as possible. With competing market-makers, however, nothing stops Bob from choosing the null allocation α\alpha_\emptyset and setting all payments π(t)=0\pi'(t) = 0 and all rewards ϕ(n)=0\phi'(n) = 0. Indeed, that payment rule has margin M(π,ϕ)=0\mathcal M(\pi', \phi') = 0 and would therefore outcompete any proposal that Alice makes (assuming ties are arbitrarily broken in favor of Bob).

Mechanism Properties

In net, this mechanism achieves the following properties (assuming there are at least 22 market-makers):

  • Welfare Maximization: There are pure Nash equilibria for the market-makers where the final selected allocation has arbitrarily poor welfare relative to the welfare-maximal allocation.

  • Zero Margin: At all pure Nash equilibria the payment rule (π,ϕ)(\pi, \phi) selected by the market mechanism has zero margin M(π,ϕ)=0\mathcal M(\pi, \phi) = 0

  • Individual Rationality: At all pure Nash equilibria, the market mechanism will select a payment rule (π,ϕ)(\pi, \phi) that is individually rational under a welfare-maximizing allocation α\alpha, or else users/nodes will not accept the offer and the market-maker will pay a small penalty γ\gamma.

A General Template

We tried to fix the extractive properties of the centralized mechanism by introducing competition (and succeeded) but it potentially costs us all gains from trade. So where did we go wrong? To understand that, let’s contextualize the previous mechanism in terms of a more general sequential template:

This general type of mechanism iterates through the market-makers’ proposals and keeps in memory a “current best” proposal. For each proposal, it checks whether the proposal is an improvement over the current best, as determined by the IMPROVEMENT\textbf{IMPROVEMENT} function. If the proposal is indeed an improvement, then it replaces the “current best”.

The minimum margin mechanism can be written as a sequential improvement mechanism by setting IMPROVEMENT(b,i)\textbf{IMPROVEMENT}(b, i) to compare the margins of the two proposals (i.e. return TRUE\text{TRUE} if M(πi,ϕi)<M(πb,ϕb)\mathcal{M}(\pi_i, \phi_i) < \mathcal{M}(\pi_b, \phi_b)). The problem with this (as we demonstrated above) is that this improvement test proved to be faulty: it returns TRUE\text{TRUE} even in cases when the proposal from market-maker ii yields lower surplus than that of bb, since it is possible for ii to be lowering the margin for an allocation that is less economically valuable (i.e. has lower welfare).

In what follows, we’ll try to come up with a better mechanism within this template by designing a better test for improvement.

Attempt 3: Sequential Pareto Improvements for Conflicts

When we’re assessing the next market-maker’s proposal, there are two cases to consider. First, it’s possible that there are no conflicting requests or nodes between the current best bb’s proposal and market-maker ii’s proposal. In this case, there’s nothing wrong with running both proposals concurrently (and indeed one would do this if this mechanism were to be implemented in practice). For simplicity of analysis, we’re going to instead ignore market-maker ii’s proposal and keep bb’s proposal, since market-maker ii could have just included the contents of bb’s proposal in its own proposal.

graphic-07.png

This leaves us with only the second case, where market-maker ii’s proposal conflicts with bb’s proposal. Which proposal should win? At a high-level, in this attempt we’re going to see what happens if we let the conflicting market participants decide which proposal wins.

Conflicting Requests and Nodes

To understand what’s going on here, let’s think about things a bit more formally. Let’s consider the two different proposals (αi,πi,ϕi)(\alpha_i, \pi_i, \phi_i) and (αb,πb,ϕb)(\alpha_b, \pi_b, \phi_b) made by market-maker ii and bb respectively. We’ll define TiT_i and NiN_i to be the requests and nodes that are allocated under αi\alpha_i.

Ti:={tTαi(t)}Ni:={nNαi1(n)}T_i := \{t \in T \mid \alpha_i(t) \ne \emptyset\} \qquad \qquad N_i := \{n \in N \mid \alpha_i^{-1}(n) \ne \emptyset\}

We’ll similarly define

Tb:={tTαb(t)}Nb:={nNαb1(n)}T_b:= \{t \in T \mid \alpha_b(t) \ne \emptyset\} \qquad \qquad N_b := \{n \in N \mid \alpha_b^{-1}(n) \ne \emptyset\}

to be the requests and nodes that are allocated under αb\alpha_b. To compare the different market outcomes, it’s helpful to consider three different groups of market participants:

The first group consists of “conflicting” market participants: these are requests and nodes that were allocated under both αi\alpha_i and αb\alpha_b.

CT:=TiTbCN:=NiNbC_T := T_i \cap T_b \qquad \qquad C_N := N_i \cap N_b

The next group consists of requests TiCTT_i \setminus C_T and nodes NiCNN_i \setminus C_N that were allocated under the allocation αi\alpha_i but not under αb\alpha_b. The third and final group consists of requests TbCTT_b \setminus C_T and nodes NbCNN_b \setminus C_N that were allocated under αb\alpha_b but not under αi\alpha_i.

We can decompose the surplus generated by the two proposals in terms of the contribution that’s given by the conflicting requests and nodes and the contribution that’s given by the non-conflicting requests and nodes:

S(i)=tCTut(i)+nCNun(i)surplus of conflicting market participants+tTiCTut(i)+nNiCNun(i)surplus of non-conflicting participants\mathcal S(i) = \underbrace{\sum_{t \in C_T} u_t(i) + \sum_{n \in C_N} u_n(i)}_{\text{surplus of conflicting market participants}} + \underbrace{\sum_{t \in T_i \setminus C_T}u_t(i) + \sum_{n \in N_i \setminus C_N} u_n(i)}_{\text{surplus of non-conflicting participants}}

For convenience, we’re using the notation S(i):=S(αi,πi,ϕi)\mathcal S(i) := \mathcal S(\alpha_i, \pi_i, \phi_i) as shorthand for the surplus generated by market-maker ii’s proposal. Similarly, we’re using ut(i):=ut(αi,πi)u_t(i) := u_t(\alpha_i, \pi_i) and un(i):=un(αi,ϕi)u_n(i) := u_n(\alpha_i, \phi_i) as shorthand for the request and node utilities.

If we were to write S(b)\mathcal S(b) in the same way, we can see that the difference in surplus between the two proposals depends only on the relative surplus of the non-conflicting participants:

S(i)S(b)=(TiCTut(i)+NiCNun(i))(TbCTut(b)NbCNun(b))\mathcal S(i) - \mathcal S(b) = \left(\sum_{T_i \setminus C_T} u_t(i) + \sum_{N_i \setminus C_N} u_n(i)\right) - \left(\sum_{T_b \setminus C_T} u_t(b) - \sum_{N_b \setminus C_N} u_n(b)\right)

If αi\alpha_i were indeed a higher welfare allocation than αb\alpha_b, then that means that the non-conflicting market participants that are allocated under αi\alpha_i are willing to pay more in aggregate for allocation than those under αb\alpha_b. We’ll use this insight to make a new IMPROVEMENT\textbf{IMPROVEMENT} function!

Pareto Improvements for Conflicting Requests and Nodes

To convert that intuition into an IMPROVEMENT\textbf{IMPROVEMENT} function, we’ll take some inspiration from the welfare theorems of economics: if the non-conflicting market participants of αi\alpha_i are indeed willing to pay more in aggregate for allocation than those under αb\alpha_b, then there should be a way for market-maker ii to set the payments (πi,ϕi)(\pi_i, \phi_i) so that every conflicting **market participant strictly prefers the market outcome (αi,πi,ϕi)(\alpha_i, \pi_i, \phi_i) to the market outcome (αb,πb,ϕb)(\alpha_b, \pi_b, \phi_b).

Concretely, we let IMPROVEMENT(b,i)\textbf{IMPROVEMENT}(b,i) be equal to 11 if

min{πb(t)πi(t)tCT}>0andmin{ϕi(n)ϕb(n)nCN}>0\min\{\pi_b(t) - \pi_i(t) \mid t \in C_T\} > 0 \qquad \text{and} \qquad \min\{\phi_i(n) - \phi_b(n) \mid n \in C_N\} > 0

and equal to 00 otherwise. An interpretation of this condition is that market-maker ii offers a cheaper price for every conflicting request and a greater reward for every conflicting node. If this is true, then we know that every conflicting market participant prefers the market outcome proposed by market-maker ii to that proposed under the “current best” market-maker bb regardless of their valuations and costs (which remain unknown to the market mechanism).

Since a formal proof would make this blog post even more dense than it already is, we now show informally by an example that if a market-maker intends to offer an outcome with higher surplus than the current best market-maker, then there exists a way to set payments such that it satisfies this IMPROVEMENT\textbf{IMPROVEMENT} function.

Claim: Suppose that market-maker ii would like to propose an allocation αi\alpha_i and extract a margin mm. If the surplus of this outcome will exceed that of the current best, i.e. W(αi)m>S(αb,πb,ϕb)\mathcal W(\alpha_i) - m > \mathcal S(\alpha_b, \pi_b, \phi_b), then there exists a budget-balanced and individually rational payment rule (πi,ϕi)(\pi_i, \phi_i) for αi\alpha_i such that every conflicting market participant strictly prefers the market outcome (αi,πi,ϕi)(\alpha_i, \pi_i, \phi_i) over the outcome (αb,πb,ϕb)(\alpha_b, \pi_b, \phi_b) (i.e. IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b,i) = 1).

Intuition: Let’s walk through what this statement means and the intuition behind it using our running example.

graphic-03.png

Suppose that the current best proposal uses the allocation αb:=α2\alpha_b := \alpha_2, with a payment rule (πb,ϕb)(\pi_b, \phi_b) that extracts no margin. For concreteness, let’s suppose that the rule charges πb(t2)=4\pi_b(t_2) = 4 from t2t_2 and pays out ϕb(n1)=4\phi_b(n_1) = 4 to n1n_1. Next, suppose that market-maker ii would like to propose the allocation αi:=α1\alpha_i := \alpha_1. There are no conflicting requests between αi\alpha_i and αb\alpha_b, but since αi\alpha_i allocates to both nodes, there is a conflicting node: n1n_1. Let’s further suppose that market-maker ii would like to further extract a margin of 12\frac12. Does an individually rational and budget-balanced payment rule (πi,ϕi)(\pi_i, \phi_i) exist such that it extracts a margin of 12\frac12 and the conflicting node n1n_1 prefers it strictly to the current best proposal? According to our claim, we should first compare

W(α1)12surplus that MM i aims to achieve=412=312>3=S(α2,π2,ϕ2)surplus attained by MM b’s proposal\underbrace{\mathcal W(\alpha_1) - \frac12}_{\text{surplus that MM $i$ aims to achieve}} = 4 - \frac12 = 3\frac12 > 3 = \underbrace{\mathcal S(\alpha_2, \pi_2, \phi_2)}_{\text{surplus attained by MM $b$'s proposal}}

As the surplus that the second market-maker aims to achieve is higher than the surplus attained by the first market-maker, our claim states that there should exist a payment rule that the second market-maker can apply that would attain that surplus, and have the conflicting node n1n_1 strictly prefer the proposal to the one made by the first market-maker.

Let’s try to find such a payment rule. Under the current best proposal, node n1n_1 is being paid ϕb(n1)=4\phi_b(n_1) = 4. The request t1t_1 is willing to pay up to vt1=6v_{t_1} = 6. So to outcompete the current best proposal, we can set ϕ1(n1)=412\phi_1(n_1) = 4\frac12. The node n2n_2 has a cost cn2=1c_{n_2} = 1, so the market-maker ii must pay out at least this much for the payment rule to be individually rational. Let’s set ϕi(n2)=1\phi_i(n_2) = 1 to satisfy this requirement. Finally, we must extract 12\frac12 as a margin. It is possible to do this by setting πi(t1)=6\pi_i(t_1) = 6, noting that this payment is also individually rational. Thus, we were able to find the payment rule as guaranteed by the claim. We could have done this no matter what payment rule was set by the current best market-maker.

This intuition leads us to the following mechanism:

This is exactly the Sequential Improvements mechanism with the IMPROVEMENT\textbf{IMPROVEMENT} function described above.

Informal Analysis

We’ll try to informally understand how the mechanism behaves by running through what an iterated sequences of best responses might look like on our running example. Let’s start by supposing that there are two market-makers, and that the ordering chosen by the market mechanism has market-maker 11 proposing the allocation (α2,π1,ϕ1)(\alpha_2, \pi_1, \phi_1) where α2\alpha_2 is as defined in our running example (it maps request t2t_2 to the node n1n_1). What should market-maker 22 do? One way that market-maker 2 could try to win while maximizing profit is to propose the same allocation α2\alpha_2 that market-maker 1 proposed, but tighten all of the prices to slightly reduce the margin. As this proposal provides better prices for all conflicting requests and nodes (i.e. the same request t2t_2 and node n1n_1 that were allocated under α2\alpha_2), it would replace market-maker 1’s proposal as the current best. Now, market-maker 2 will win with a payoff that is just a hair less than what market-maker 1 would have received if he were to win instead.

But is that the best that market-maker 2 can do? What if market-maker 2 instead proposed the allocation α1\alpha_1? Because α1\alpha_1 has a higher welfare of 4 relative to the welfare 3 of α2\alpha_2, market-maker 2 can actually get a bigger cut by proposing this allocation while still offering better terms to every conflicting market participant (in this case, node n1n_1). This is because request t1t_1 is simply willing to pay more, even accounting for the added cost that must be paid to node n2n_2. This follows from the claim we made earlier.

How should market-maker 1 respond to this? Since α1\alpha_1 is the allocation with the highest welfare, we should expect that market-maker 1 would simply repropose the same allocation with a tightened margin. Market-maker 2 would then do the same thing, until the iteration leads to the margin being driven to zero. If that were to take place, we’d end up with the highest welfare allocation being chosen with zero extracted margin, leading to the outcome we desired…right?

Unstable Best-Response Dynamics

Unfortunately, our market mechanism doesn’t quite lead to the desirable outcome. Let’s go back to when we considered market-maker 1’s best response after market-maker 2 proposed α1\alpha_1. As it turns out, no matter what payment rule market-maker 2 sets, market-maker 1 will be able to win by proposing either α1\alpha_1 or α3\alpha_3, despite the fact that both of these allocations actually yield less welfare. Let’s take a look at why this happens:

Suppose that market-maker 2 begins by proposing the payment rule (π2,ϕ2)(\pi_2, \phi_2) under the allocation α2\alpha_2. Because this payment rule is individually rational (market-maker 2 will have to pay a penalty γ\gamma if the match fails), we know that the total incoming payment π2(t1)\pi_2(t_1) is at most t1t_1’s valuation vt1=6v_{t_1} = 6. Furthermore, since the payment is budget-balanced (since market-maker 2 will lose money if trade is subsidized), this means that ϕ2(n1)+ϕ2(n2)6\phi_2(n_1) + \phi_2(n_2) \le 6. In particular, this means that market-maker 2 cannot pay both n1n_1 and n2n_2 at least 44, since 4+4=84 + 4 = 8. If market-maker 2 pays n1n_1 less than 44, then market-maker 1 can propose the allocation α2\alpha_2 that matches t2t_2 to n1n_1, and since t2t_2 is willing to pay up to vt2=4v_{t_2} = 4, market-maker 1 can find an individually rational and budget balanced payment rule that offers better terms to the conflicting node n1n_1. If instead market-maker 2 pays n2n_2 less than 44, then market-maker 1 can similarly propose the allocation α3\alpha_3 that matches t2t_2 to n2n_2 and find corresponding payments that offer n2n_2 better terms. Furthermore, since market-maker 2 can’t even pay both n1n_1 and n1n_1 more than 33, market-maker 1 will be able to make a margin of at least 11 on this proposal.

However, after market-maker 1 makes this proposal, market-maker 2 can again best-respond by selecting the allocation α1\alpha_1 again, but with different payments (this follows from the same argument we made earlier). In net, the sequence of allocations under iterated best responses will keep bouncing back and forth between the welfare-maximizing allocation α1\alpha_1 and one of α2\alpha_2 or α3\alpha_3.

Mechanism Properties

In net, this mechanism achieves the following properties (assuming there are at least 22 market-makers):

  • Welfare Maximization: Some market instances have no pure Nash equilibria for the market-makers, thus the final allocation may not be welfare-maximizing.

  • Zero Margin: Again, as there may not be pure Nash equilibria, the payment rule (π,ϕ)(\pi, \phi) selected by the market mechanism may not have zero margin M(π,ϕ)>0\mathcal M(\pi, \phi) > 0. For example, in our running example, under reasonable best-response dynamics, the margin would be at least 11.

  • Individual Rationality: Under reasonable best-response dynamics, the market mechanism will select a payment rule (π,ϕ)(\pi, \phi) that is individually rational under a welfare-maximizing allocation α\alpha, or else users/nodes will not accept the offer and the market-maker will pay a small penalty γ\gamma.

Attempt 4: Sequential Pareto Improvements with Tolerances

We were close with the last mechanism. If we are able to somehow fix the unstable best-response problem, then we can indeed have all three properties. In our final attempt, we show how this can be done by introducing tolerances.

At a high level, the core problem comes from the fact that our earlier claim is not an “if and only if” statement. We walked through how if one market-maker intends to make a proposal with higher surplus than another market-maker, then there indeed exists a payment rule they can set along with the allocation that will replace the former market-maker’s proposal. The problem is that the other direction may not hold: as we saw in our running example, it can be possible to replace a former market-maker’s proposal (i.e. have IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b,i) = 1) even if the new proposal yields lower surplus. As a result, we may find ourselves with an unstable outcome. In order to fix this, we need to modify our replacement rule to something that does function as an “if and only if”. In particular, we need to be more conservative with our replacement rule, as we were allowing proposals with higher surplus to be replaced.

Constructing a Perfect Test for Improvement

Suppose that there are two market-makers, and market-maker 1 wishes to set an allocation α1\alpha_1 and extract a total margin m1m_1. Similarly, market-maker 2 wishes to set an allocation α2\alpha_2 and extract a total margin m2m_2. Assuming both market-makers propose individually rational payments, can we perfectly determine which market outcome will yield greater surplus? Our previous claim yielded a one-sided test. If market maker 1’s surplus W(α1)m1\mathcal W(\alpha_1) - m_1 exceeds that of market-maker 2, W(α2)m2\mathcal W(\alpha_2) - m_2, then there exists a way for market-maker 1 to set payments such that every conflicting request and node is offered better terms under market-maker 1’s proposal than market-maker 2’s proposal. However, the converse of that statement was not true. As illustrated in the example above, even though the allocation α2\alpha_2 with an extracted margin of 11 yields less surplus than the allocation α1\alpha_1 with an extracted margin of, let’s say, 12\frac12, it is still possible to set the new allocation to α2\alpha_2 while offering better terms to the conflicting node.

Introducing Tolerances

To resolve this issue, we’re going to allow the market-makers to estimate what the surplus of their proposal is. We can’t simply have the market-makers provide non-binding estimates, however, or else they will claim that their allocation provides arbitrarily high surplus. Instead, we’re going to carefully incorporate ideas from our previous attempt to put market-makers on the hook for their estimates. Each market-maker ii now submits a tuple (αi,πi,ϕi,πi,ϕi)(\alpha_i, \pi_i, \phi_i, \overline {\pi_i}, \underline {\phi_i}). This tuple consists of:

  • A valid allocation αiV\alpha_i \in V
  • A payment rule (πi,ϕi)(\pi_i, \phi_i)
  • A maximum payment tolerance πi:TR\overline{\pi_i}: T \to \R denoting the maximum allowable payment to be made by each request, satisfying πi(t)πi(t)\overline{\pi_i}(t) \ge \pi_i(t) for all tTt \in T.
  • A minimum payment tolerance ϕi:NR\underline{\phi_i}: N \to \R denoting the minimum allowable payment to be made to each node, satisfying ϕi(n)ϕi(n)\underline{\phi_i}(n) \ge \phi_i(n) for all nNn \in N.

These maximum and minimum payment rules allow the mechanism to “sweeten the deal” for conflicting market participants in the face of a challenging proposal from a different market-maker. That is, if market-maker ii wins, the mechanism is now allowed to select any (πi,ϕi)(\pi'_i, \phi'_i) such that:

  • The net margin remains the same: Tπi(t)Nϕn(n)=Tπi(t)Nϕi(n)\sum_{T} \pi'_i(t) - \sum_N \phi'_n(n) = \sum_T \pi_i(t) - \sum_N \phi_i(n)
  • The new proposals do not invalidate the tolerances: πi(t)πi(t)\pi'_i(t) \le \overline \pi_i(t) for all tTt \in T and ϕi(n)ϕi(n)\phi'_i(n) \ge \underline {\phi_i}(n) for all nNn \in N.

With the addition of payment tolerances, we can prevent a higher surplus proposal from being replaced by a lower surplus one. Building on our previous mechanism, we consider a proposal (αi,πi,ϕi,πi,ϕi)(\alpha_i, \pi_i, \phi_i, \overline{\pi}_i, \underline{\phi}_i) that is able to offer better prices over the current best proposal (αb,πb,ϕb,πb,ϕb)(\alpha_b, \pi_b, \phi_b, \overline{\pi}_b, \underline{\phi}_b) to all conflicting market participants. There are two cases to consider.

Case 1: The allocation αi\alpha_i yields a higher surplus than the allocation αb\alpha_b.

In this case, we’d like the mechanism to replace the market-maker bb’s proposal with market-maker ii’s proposal as the current best proposal. As we showed earlier, if αi\alpha_i indeed does have higher surplus, then there existed a way to set the payment rules such that market-maker ii did indeed win.

Case 2: The allocation αi\alpha_i yields a lower surplus than the allocation αb\alpha_b, but still offers better prices to all conflicting market participants.

This is the bad case we encountered in our analysis of the previous mechanism. In this case, we don’t want to have proposal ii replace proposal bb. The core issue lies in the fact that for any fixed payment rule used by market-maker bb, there may exist a payment rule for the lower-surplus proposal by market-maker ii that offers a better deal for all conflicting market participants. However, as we showed earlier, if αb\alpha_b indeed has higher surplus, there exists a payment rule that offers a better deal for all conflicting market participants relative to that proposed by market-maker ii. This gives a hint at the solution to our problem: if we allow market-maker bb to make a counterproposal and change their payment rule, keeping their allocation fixed, we can maintain proposal bb as the current best if and only if it has greater surplus!

Defining the new IMPROVEMENT\textbf{IMPROVEMENT} function

To define our new test for improvement, we have to first consider the quantity

Δ:=tCTπb(t)πi(t)improvement to conflicting requests+nCNϕi(n)ϕb(n)improvement to conflicting nodes\Delta := \underbrace{\sum_{t \in C_T}\pi_b(t) - \pi_i(t)}_{\text{improvement to conflicting requests}} + \underbrace{\sum_{n \in C_N}\phi_i(n) - \phi_b(n)}_{\text{improvement to conflicting nodes}}

representing the total improvement in prices for conflicting market participants that proposal ii offers over proposal bb. We’ll then allow market-maker bb to hold on to her position as the current-best proposal if she’s willing to sweeten the deal for the conflicting market participants. The payment tolerances induce a slack

:=tTCTπb(t)πb(t)slack for non-conflicting requests+nNCNϕb(n)ϕb(n)slack for non-conflicting nodes\nabla := \underbrace{\sum_{t \in T \setminus C_T} \overline{\pi_b}(t) - \pi_b(t)}_{\text{slack for non-conflicting requests}} + \underbrace{\sum_{n \in N \setminus C_N} \phi_b(n) - \underline{\phi_b}(n)}_{\text{slack for non-conflicting nodes}}

representing the total additional amount that market-maker bb believes that the non-conflicting market participants would pay for allocation. We now set IMPROVEMENT(b,i)=0\textbf{IMPROVEMENT}(b, i) = 0 if proposal ii offers a strict improvement to all conflicting participants (i.e. min{πb(t)πi(t)tCT}>0\min\{\pi_b(t) - \pi_i(t) \mid t \in C_T\} > 0 and min{ϕi(n)ϕb(n)nCN}>0\min\{\phi_i(n) - \phi_b(n) \mid n \in C_N\} > 0), and if <Δ\nabla < \Delta. Otherwise, we set IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b, i) = 1.

If Δ\nabla \ge \Delta, then there exists a (πb,ϕb)(\pi'_b, \phi'_b) that is valid under the payment tolerances (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}) such that (πb,ϕb)(\pi'_b, \phi'_b) offers the same improvement to conflicting market participants as the challenging proposal ii. In this case, we can maintain bb as the current best, changing the payment rule to the new rule (πb,ϕb)(\pi'_b, \phi'_b). On the other hand, if <Δ\nabla < \Delta, then there does not exist any such (πb,ϕb)(\pi'_b, \phi'_b) that is valid under bb’s payment tolerances that offers the same improvement to conflicting market participants. In this case, we can replace the current-best proposal with market-maker ii’s proposal.

Below is the full mechanism:

Mechanism Analysis and Properties

The analysis of this mechanism hinges on a central claim, which is shown formally in the technical appendix at the end of this post.

Claim: Let αi\alpha_i and αb\alpha_b be valid allocations. There exists a proposal (αb,πb,ϕb,πb,ϕb)(\alpha_b, \pi_b, \phi_b, \overline {\pi_b}, \underline {\phi_b}) with individually rational and budget-balanced payment tolerances (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}) such that IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b, i) = 1 for any proposal (αi,πi,ϕi,πi,ϕi)(\alpha_i, \pi_i, \phi_i, \overline {\pi_i}, \underline {\phi_i}) with any individually rational payment rule if and only if the proposal bb offers weakly higher surplus S(αb,πb,ϕb)S(αi,πi,ϕi)\mathcal S(\alpha_b, \pi_b, \phi_b) \ge \mathcal S(\alpha_i, \pi_i, \phi_i).

Intuition: This claim demonstrates that with the addition of tolerances, we now have a perfect test for improvement. At a high level, we’ve corrected the unstable game dynamics by checking whether the current best proposal bb can sweeten the deal for conflicting market participants in response to a proposal ii that offers strictly better prices/payments for each of those market participants. Even though there may not be a fixed payment rule for a higher surplus proposal bb that offers strictly better prices against any challenging proposal ii, for any fixed challenging proposal ii, a payment rule for bb exists that at least matches the prices/payments of ii for the conflicting market participants. By allowing the payment rule of bb to change depending on the specific challenging proposal ii, the IMPROVEMENT\textbf{IMPROVEMENT} function is able to yield a two-sided guarantee.

Claim: If there are at least 2 market-makers, at any pure Nash equilibrium for the market-makers, the mechanism will return a valid allocation α\alpha that maximizes welfare, and a payment rule (π,ϕ)(\pi, \phi) that has zero margin (π,ϕ)=0\mathcal (\pi, \phi) = 0 that is individually rational under α\alpha.

Proof. At any pure Nash equilibrium, the payment rule returned by the mechanism must be individually rational, or else the market-maker who submitted it will face a penalty of γ\gamma, which could be avoided by submitting any individually rational proposal. Thus, if the (α,π,ϕ)(\alpha, \pi, \phi) returned by the mechanism does not maximize surplus, then by the previous claim, a market-maker who did not win could have submitted a proposal (α,π,ϕ,π,ϕ)(\alpha, \pi, \phi, \overline{\pi}, \underline{\phi}) with strictly higher surplus and positive margin such that this proposal is outputted by the mechanism in the end (holding the proposals of all other market-makers fixed). Since this yields positive utility for this non-winning market-maker, whereas the market-maker previously received zero utility at equilibrium (as she did not win), it follows that the market-maker’s equilibrium strategy was not a best response (again holding the strategies of all other market-makers fixed). It follows that allocation and payment rule returned by the mechanism was not returned at a pure Nash equilibrium, and we have found a contradiction.

Since maximizing surplus is equivalent to maximizing welfare and extracting zero margin, we have that this mechanism miraculously satisfies all three properties, even without explicit knowledge of the valuations and costs!

  • Welfare Maximization
  • Zero Margin
  • Individual Rationality

Extensions

Specialization

In the mechanism above, non-conflicting proposals are discarded. However, in practice, there is no issue with simply appending non-conflicting proposals to the “current best” proposal. Under this variation of the mechanism, the current-best proposal is given by the union of non-conflicting proposals, and the payment tolerances are given by corresponding union of the payment tolerances. If a proposal then conflicts with this union of proposals, then the above IMPROVEMENT\textbf{IMPROVEMENT} function is considered with respect to all proposals within the union that conflict with the incoming proposal. This variation of the mechanism would allow market-makers to specialize in certain types of compute requests, as opposed to being forced to match all of the compute requests.

Removing the Payment Rule from the Proposal

I suspect that the above mechanism can be simplified to allow market-makers to include just the allocation, payment tolerances, and desired margin — i.e. have proposals of the form (α,π,ϕ,m)(\alpha, \overline{\pi}, \underline{\phi}, m), instead of also including an initial payment rule. While the final equilibrium behavior would be the same, this would simplify the user experience for market-makers.

Technical Appendix

Claim: Let αi\alpha_i and αb\alpha_b be valid allocations. There exists a proposal (αb,πb,ϕb,πb,ϕb)(\alpha_b, \pi_b, \phi_b, \overline {\pi_b}, \underline {\phi_b}) with individually rational and budget-balanced payment tolerances (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}) such that IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b, i) = 1 for any proposal (αi,πi,ϕi,πi,ϕi)(\alpha_i, \pi_i, \phi_i, \overline {\pi_i}, \underline {\phi_i}) with any individually rational payment rule if and only if the proposal bb offers weakly higher surplus S(αb,πb,ϕb)S(αi,πi,ϕi)\mathcal S(\alpha_b, \pi_b, \phi_b) \ge \mathcal S(\alpha_i, \pi_i, \phi_i).

Proof. To prove this claim, we’ll need to analyze both directions. Suppose first that S(αb,πb,ϕb)S(αi,πi,ϕi)\mathcal S(\alpha_b, \pi_b, \phi_b) \ge \mathcal S(\alpha_i, \pi_i, \phi_i). In this case, we’ll constructively show the desired result by taking the payment tolerance πb(t):=vt1[αb(t)]\overline \pi_b(t) := v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] to be equal to the valuation of the request for the allocation, and similarly taking the payment tolerance ϕb(t):=cn1[αb1(n)]\underline{\phi_b}(t) := c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset] to be the node’s cost for the allocation. Observe that these payment tolerances are individually rational and budget-balanced. Suppose for contradiction now that IMPROVEMENT(b,i)=0\mathbf{IMPROVEMENT}(b, i) = 0 for this proposal. That means that the total improvement

Δ:=tCTπb(t)πi(t)+nCNϕi(n)ϕb(n)\Delta := \sum_{t \in C_T}\pi_b(t) - \pi_i(t) + \sum_{n \in C_N}\phi_i(n) - \phi_b(n)

offered by proposal ii to conflicting market participants exceeds the total slack

:=tTCTπb(t)πb(t)+nNCNϕb(n)ϕb(n)\nabla :=\sum_{t \in T \setminus C_T} \overline{\pi_b}(t) - \pi_b(t) + \sum_{n \in N \setminus C_N} \phi_b(n) - \underline{\phi_b}(n)

Equivalently, this means that there does not exist a (πb,ϕb)(\pi'_b, \phi'_b) such that πb(t)πb(t)\pi'_b(t) \le \overline{\pi_b}(t), ϕb(n)ϕb(n)\phi'_b(n) \ge \underline{\phi_b}(n), and M(πb,ϕb)=M(πb,ϕb)\mathcal M(\pi'_b, \phi'_b) = \mathcal M(\pi_b, \phi_b) where πb(t)πi(t)\pi'_b(t) \le \pi_i(t) for all tCTt \in C_T and ϕb(n)ϕi(n)\phi'_b(n) \ge \phi_i(n) for all nCNn \in C_N. Equivalently, for all such (πb,ϕb)(\pi'_b, \phi'_b) , the difference

Δ:=(tCTπb(t)nCNϕb(n))amount paid by conflicting market participants under b(tCTπi(t)nCNϕi(n))amount paid by conflicting market participants under i>0\Delta' := \underbrace{\left(\sum_{t \in C_T} \pi_b'(t) - \sum_{n \in C_N} \phi_b'(n)\right)}_{\text{amount paid by conflicting market participants under } b'} - \underbrace{\left(\sum_{t \in C_T} \pi_i(t) - \sum_{n \in C_N} \phi_i(n)\right)}_{\text{amount paid by conflicting market participants under } i} > 0

However, notice that we could have selected πb(t)=πb(t)=vt1[αb(t)]\pi'_b(t) = \overline{\pi}_b(t) = v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] and ϕb(n)=ϕb(n)=cn1[αb1(n)]\phi'_b(n) = \underline{\phi'_b}(n) = c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset] for all non-conflicting market participants tTCTt \in T \setminus C_T and nNCNn \in N \setminus C_N. As we must keep the margin M(πb,ϕb)=M(πb,ϕb)\mathcal M(\pi'_b, \phi'_b) = \mathcal M(\pi_b, \phi_b) it follows that for any such choice of (πb,ϕb)(\pi'_b, \phi'_b), conflicting participants pay at most the margin of the original payment rule (πb,ϕb)(\pi_b, \phi_b) less the surplus generated by the allocation αb\alpha_b for non-conflicting participants.

tCTπb(t)nCNϕb(n)=tCTπb(t)nCNϕb(n)(tTCTπb(t)πb(t)+nNCNϕb(n)ϕb(n))=tTπb(t)nNϕb(n)(tTCTπb(t)nNCNϕb(n))=M(πb,ϕb)(tTCTvt1[αb(t)]nNCNcn1[αb1(n)])\begin{align*} \sum_{t \in C_T} \pi_b'(t) - \sum_{n \in C_N} \phi_b'(n) &= \sum_{t \in C_T} \pi_b(t) - \sum_{n \in C_N} \phi_b(n) - \left(\sum_{t \in T \setminus C_T} \pi'_b(t) - \pi_b(t) + \sum_{n \in N \setminus C_N} \phi_b(n) - \phi'_b(n)\right)\\ &= \sum_{t \in T} \pi_b(t) - \sum_{n \in N}\phi_b(n) - \left(\sum_{t \in T \setminus C_T} \pi'_b(t) - \sum_{n \in N \setminus C_N} \phi'_b(n)\right)\\ &= \mathcal M(\pi_b, \phi_b) - \left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset]\right)\end{align*}

Notice also that under the proposal submitted by market-maker ii, the total amount paid by conflicting market participants is at most the margin of the payment rule (πi,ϕi)(\pi_i, \phi_i) less the surplus generated by the allocation αi\alpha_i for non-conflicting participants.

tCTπi(t)nCNϕi(n)=tCTπi(t)nCNϕi(n)(tTCTπi(t)nNCNϕi(n))=M(πi,ϕi)(tTCTπi(t)nNCNϕi(n))M(πi,ϕi)(tTCTvt1[αi(t)]nNCNcn1[αi1(n)])\begin{align*} \sum_{t \in C_T} \pi_i(t) - \sum_{n \in C_N} \phi_i(n) &= \sum_{t \in C_T} \pi_i(t) - \sum_{n \in C_N} \phi_i(n) - \left(\sum_{t \in T \setminus C_T} \pi_i(t)- \sum{n \in N \setminus C_N} \phi_i(n)\right)\\ &= \mathcal M(\pi_i, \phi_i) - \left(\sum_{t \in T \setminus C_T} \pi_i(t)- \sum_{n \in N \setminus C_N} \phi_i(n)\right) \\ &\ge \mathcal M(\pi_i, \phi_i) -\left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_i(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_i^{-1}(n) \ne \emptyset]\right)\end{align*}

Where the inequality follows from the individual rationality of (πi,ϕi)(\pi_i, \phi_i). Putting these two together, it follows that if Δ0\Delta' \ge 0, then

M(πb,ϕb)(tTCTvt1[αb(t)]nNCNcn1[αb1(n)])M(πi,ϕi)(tTCTvt1[αi(t)]nNCNcn1[αi1(n)])    S(αb,πb,ϕb)>S(αi,πi,ϕi)    S(αb,πb,ϕb)<S(αi,πi,ϕi)\begin{align*} &\mathcal M(\pi_b, \phi_b) - \left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset]\right) \ge \mathcal M(\pi_i, \phi_i) -\left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_i(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_i^{-1}(n) \ne \emptyset]\right)\\ &\iff -\mathcal S(\alpha_b, \pi_b, \phi_b) > - \mathcal S(\alpha_i, \pi_i, \phi_i)\\ &\iff \mathcal S(\alpha_b, \pi_b, \phi_b) < \mathcal S(\alpha_i, \pi_i, \phi_i) \end{align*}

where to get to the second line, we add the quantity

tCTvt1[αb(t)]nCNcn1[αb1(n)]=tCTvt1[αi(t)]nCNcn1[αi1(n)]\sum_{t \in C_T} v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] - \sum_{n \in C_N} c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset] = \sum_{t \in C_T} v_t \cdot \mathbf{1}[\alpha_i(t) \ne \emptyset] - \sum_{n \in C_N} c_n \cdot \mathbf{1}[\alpha_i^{-1}(n) \ne \emptyset]

to both sides. We’ve now reached a contradiction, since we assumed that S(αb,πb,ϕb)S(αi,πi,ϕi)\mathcal S(\alpha_b, \pi_b, \phi_b) \ge \mathcal S(\alpha_i, \pi_i, \phi_i). This completes the first direction, where we’ve shown that if proposal bb yields higher surplus than ii, then there exist individually rational payment tolerances (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}) such that IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b, i) = 1. We now show the second direction: if there does not exist individually rational payment tolerances (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}) such that IMPROVEMENT(b,i)=1\textbf{IMPROVEMENT}(b, i) = 1, then S(αb,πb,ϕb)<S(αi,πi,ϕi)\mathcal S(\alpha_b, \pi_b, \phi_b) < \mathcal S(\alpha_i, \pi_i, \phi_i). To see that this direction holds, notice that there exists an individually rational payment rule that sets πi(t):=vt1[αi(t)]\pi_i(t) := v_t \cdot \mathbf{1}[\alpha_i(t) \ne \emptyset] for all tTCTt \in T \setminus C_T, ϕi(n):=cn1[αi1(n)]\phi_i(n) := c_n \cdot \mathbf{1}[\alpha_i^{-1}(n) \ne \emptyset] for all nNCNn \in N \setminus C_N, and sets

πi(t):=πb(t)1CT+CN[M(πi,ϕi)(tTCTπi(t)nNCNϕi(n))]\pi_i(t) := \pi_b(t) - \frac{1}{|C_T| + |C_N|}\left[\mathcal M(\pi_i, \phi_i) -\left(\sum_{t \in T \setminus C_T} \pi_i(t) - \sum_{n \in N \setminus C_N} \phi_i(n)\right)\right]

for all tCTt \in C_T and

ϕi(n):=ϕb(t)+1CT+CN[M(πi,ϕi)(tTCTπi(t)nNCNϕi(n))]\phi_i(n) := \phi_b(t) + \frac{1}{|C_T| + |C_N|}\left[\mathcal M(\pi_i, \phi_i) -\left(\sum_{t \in T \setminus C_T} \pi_i(t) - \sum_{n \in N \setminus C_N} \phi_i(n)\right)\right]

for all nCNn \in C_N. For this payment rule, we have that

tCTπi(t)nCNϕi(n)=M(πi,ϕi)(tTCTvt1[αi(t)]nNCNcn1[αi1(n)])\sum_{t \in C_T} \pi_i(t) - \sum_{n \in C_N} \phi_i(n) = \mathcal M(\pi_i, \phi_i) -\left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_i(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_i^{-1}(n) \ne \emptyset]\right)

Notice further that for any valid (πb,ϕb)(\pi'_b, \phi'_b) given payment tolerances (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}),

tCTπb(t)nCNϕb(n)=tCTπb(t)nCNϕb(n)(tTCTπb(t)πb(t)+nNCNϕb(n)ϕb(n))(tTCTπb(t)πb(t)+nNCNϕb(n)ϕb(n))=tTπb(t)nNϕb(n)(tTCTπb(t)nNCNϕb(n))M(πb,ϕb)(tTCTvt1[αb(t)]nNCNcn1[αb1(n)])\begin{align*} \sum_{t \in C_T} \pi_b'(t) - \sum_{n \in C_N} \phi_b'(n) &= \sum_{t \in C_T} \pi_b(t) - \sum_{n \in C_N} \phi_b(n) - \left(\sum_{t \in T \setminus C_T} \pi'b(t) - \pi_b(t) + \sum_{n \in N \setminus C_N} \phi_b(n) - \phi'_b(n)\right)\\ &\ge \left(\sum_{t \in T \setminus C_T} \overline{\pi_b}(t) - \pi_b(t) + \sum_{n \in N \setminus C_N} \phi_b(n) - \underline{\phi_b}(n)\right)\\ &= \sum_{t \in T} \pi_b(t) - \sum_{n \in N}\phi_b(n) - \left(\sum_{t \in T \setminus C_T} \overline{\pi_b}(t) - \sum_{n \in N \setminus C_N} \underline{\phi_b}(n)\right)\\ &\ge \mathcal M(\pi_b, \phi_b) - \left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset]\right)\end{align*}

It follows that Δ\Delta' as defined above is positive for any (πb,ϕb)(\pi'_b, \phi'_b).

Δ=(tCTπb(t)nCNϕb(n))(tCTπi(t)nCNϕi(n))M(πb,ϕb)(tTCTvt1[αb(t)]nNCNcn1[αb1(n)])[M(πi,ϕi)(tTCTvt1[αi(t)]nNCNcn1[αi1(n)])]=(S(αb,πb,ϕb)S(αi,πi,ϕi))>0\begin{align*} \Delta' &= \left(\sum_{t \in C_T} \pi_b'(t) - \sum_{n \in C_N} \phi_b'(n)\right) - \left(\sum_{t \in C_T} \pi_i(t) - \sum_{n \in C_N} \phi_i(n)\right) \\&\ge \mathcal M(\pi_b, \phi_b) - \left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_b(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_b^{-1}(n) \ne \emptyset]\right) - \left[\mathcal M(\pi_i, \phi_i) -\left(\sum_{t \in T \setminus C_T} v_t \cdot \mathbf{1}[\alpha_i(t) \ne \emptyset] - \sum_{n \in N \setminus C_N} c_n \cdot \mathbf{1}[\alpha_i^{-1}(n) \ne \emptyset]\right)\right]\\&= -\left(\mathcal S(\alpha_b, \pi_b, \phi_b) - \mathcal S(\alpha_i, \pi_i, \phi_i)\right)\\&> 0\end{align*}

Equivalently, this means that <Δ\nabla < \Delta, and IMPROVEMENT(b,i)=0\textbf{IMPROVEMENT}(b, i) = 0 no matter what individually rational (πb,ϕb)(\overline{\pi_b}, \underline{\phi_b}) was chosen, as desired.


Citation

To cite this blog post, please use the following reference.

@misc{markets-decentralized-computation,
  title={Markets for Decentralized Computation},
  author={Naveen Durvasula},
  year={2025},
  howpublished=\url{https://ritual.net/blog/decentralized-computation}
}

Disclaimer

This post is for general information purposes only. It does not constitute investment advice or a recommendation, offer or solicitation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision. It should not be relied upon for accounting, legal or tax advice or investment recommendations. The information in this post should not be construed as a promise or guarantee in connection with the release or development of any future products, services or digital assets. This post reflects the current opinions of the authors and is not made on behalf of Ritual or its affiliates and does not necessarily reflect the opinions of Ritual, its affiliates or individuals associated with Ritual. All information in this post is provided without any representation or warranty of any kind. The opinions reflected herein are subject to change without being updated.