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.
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:
- Defines the market-design problem for compute markets with general constraints (adapted from Resonance)
- Gives a mathematical primer on some market design vocabulary
- 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 . These compute requests are to be executed by a set of nodes . 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 would correspond to transactions containing stateful precompiles that require specialized computation for execution (as discussed in previous Resonance posts). The nodes 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: that specifies what subset of nodes in are responsible for executing each request. For example, if we want to allocate a request to be executed by node , we’d consider an allocation where . If a compute request needs multiple nodes to execute (for example, if we want to redundantly compute on nodes and to get a better trust guarantee), then we’d consider an allocation where . We may also have a compute request that we can’t allocate because there aren’t any compatible nodes available. In that situation, we’d consider an allocation where .
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 , where is a set of allocations , and enforce that the market must select a valid allocation . We make no restrictions on .
In Ritual’s setting we can encode node capacity constraints and hardware/software support constraints by only allowing allocations to be in if, for each node , the bundle of transactions
allocated to under can be executed by . We can encode transaction hardware/software support constraints by only allowing allocations in if the nodes that is allocated to are capable of executing . More broadly, we can enforce that state conflicts do not occur, etc., by making the appropriate restrictions on .
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 that specifies how much each request should pay for service, and a node payment rule that specifies how much each node 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.

In this example, there are two requests and two nodes . The request requires both nodes for valid execution, but the request 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 , where allocates none of the requests, allocates only to both nodes, allocates only to node , and allocates only to node . These allocations are notated formally below, and shown graphically in the image above.
To clear this market, we need to select one of the allocations within our valid collection of allocations, and select prices for the requests to pay and rewards 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 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 , the user who submitted it is willing to pay up to their valuation for its execution. That is, if the price offered for executing 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 , each node has a cost which represents the lowest payment they’ll accept in exchange for service; if the reward offered 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).

To make this concrete, let’s revisit our earlier example. Now, each of the requests has a valuation: is willing to pay at most tokens for service, and is willing to pay at most tokens for service. Similarly, each node has a cost: nodes and will accept any offer that pays at least . Recall that as before, there are three non-null allocations that are valid in this example: .
Utilities
Let’s take a closer look at the preferences of our market participants. Users will accept an offer for service for a request if their payment is less than their valuation . 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 under an allocation and payment rule can be modeled as
Going back to our example, recall that was willing to pay at most tokens for service. Suppose we clear the market under the allocation and set tokens. Since is allocated under (as ), the utility that obtains is equal to
tokens. These tokens of value represent the economic surplus that received by participating in the market. Suppose we set under the same allocation . Since is not allocated under (as ), the utility that obtains is equal to tokens.
What about the utility for nodes? Returning to our simple model, a node will accept an offer to provide service if their reward exceeds their cost . 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 under an allocation and payment rule as
In our running example, suppose that we again select the allocation and set . Since is allocated under (as ), the utility that obtains is equal to
token. Suppose that we set again under the allocation . Since is not allocated under (), the utility obtains is equal to 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 ; 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 is given an offer for service such that , then that offer for service corresponds to an allocation such that . As such,
Similarly, if a node is offered a reward in exchange for service, then that offer corresponds to an allocation such that . Accordingly,
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 with payment rule if all participants have non-negative utility. If this holds true, then we call 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 . Let’s run through some example payment rules:
Under , we can see that the payment rule is not individually rational, since
It violates individual rationality a second time, since
All three payment rules , and are individually rational under . That is, the market would clear the allocation if the prices , , or 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 is formally defined as
Welfare measures the total value (in tokens) generated by an allocation 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 for each user whose request was allocated and have them take the offer, but we only need to pay out a minimum of for each node providing service, generating in net value. Another way to think about is that market participants, in aggregate, are willing to pay for trade to take place under the allocation .
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:
We can see that the allocation 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 , , and 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 as
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:
Notice how has a positive margin and is thus extractive— more money is taken from users than is paid out to nodes. Although tokens of value are generated by the allocation , the users and nodes only get to “keep” 3 of those tokens, since the market takes a margin of token under this payment rule.
Conversely, notice that the payment rule 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 token, which may not be sustainable in the long-run.
Payment rules and are both non-extractive and budget-balanced. In particular, 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
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
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 maximizes surplus if and only if maximizes welfare and has zero margin.
Intuition: Since the payment rule is budget-balanced, it can’t have a negative margin. Therefore, any with welfare-maximizing and 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 equal to the sum of the payments that the requests allocate. Therefore, any surplus-maximizing must have 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:
- Users submit requests and corresponding execution constraints. Nodes submit execution constraints. These (and additional system-wide constraints) are aggregated into a set of valid allocations.
- The market mechanism selects a valid allocation and a payment rule . Prices and allocation results are then served to users
- Users and nodes choose to either accept or reject the allocation results at the prices specified by the payment rule.

The meat of this problem is in the second step. Concretely, given a set of valid allocations , We would like to select an allocation rule and payment rule that satisfy two properties:
Surplus Maximization: The allocation and payment rule should maximize surplus, or the economic value that is distributed to the market participants.
Individual Rationality: The payment rule should be individually rational under 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 should be maximal in terms of the economic value it generates.
Zero Margin: The marketplace should neither be extractive, nor should it require subsidies for trade to occur. That is, the margin of the payment rule should be equal to zero.
Individual Rationality: The payment rule should be individually rational under 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 and payment rule 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 . Now we can try to see what the market-maker would charge to maximize profit. In allocation , request is allocated to both and . Since request is not allocated, the market-maker must set ’s payment , or else will reject the offer. To maximize the margin , the market-maker should charge as much as possible, and pay as little as possible to the nodes. Since has a valuation of , and won’t accept any offer that charges more than that, we should correspondingly set . Similarly, we should set and . This yields a total margin of . Notice that this is equal to the welfare of . If the market-maker were to choose or , the most that could be extracted in margin would be .
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 , the market-maker maximizes profit by charging each request equal to the request’s valuation (if allocated)
and paying each node its cost (if allocated)
The total profit the market-maker receives is equal to the welfare of the allocation.
Intuition: Supposing that the market-maker has committed to selecting some particular allocation , the market-maker can maximize their margin 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 if the request is allocated (i.e. ), or in the case that the request is not allocated. Similarly, the least that the market-maker can pay out to the nodes is if the node is allocated (i.e. ) or if the node is not allocated. This yields the payment rules and as claimed. We can now compute the total margin that the market-maker makes as
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 , a profit-maximizing market-maker can achieve profit equal to the welfare of the allocation 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 . 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 that is individually rational under a welfare-maximizing allocation , 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 and choose payments that would charge her valuation and pay nodes and their costs and respectively, to obtain a margin . 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 . 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 (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 that has negative margin , 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 . What payment rule 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 . Next, suppose that Bob’s margin > 0. Alice can’t win with any margin greater than Bob’s. Thus, Alice should choose an individually rational payment rule where is just a tad less than Bob’s margin 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 . 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 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 and setting all payments and all rewards . Indeed, that payment rule has margin 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 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 selected by the market mechanism has zero margin
✓ Individual Rationality: At all pure Nash equilibria, the market mechanism will select a payment rule that is individually rational under a welfare-maximizing allocation , or else users/nodes will not accept the offer and the market-maker will pay a small penalty .
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 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 to compare the margins of the two proposals (i.e. return if ). The problem with this (as we demonstrated above) is that this improvement test proved to be faulty: it returns even in cases when the proposal from market-maker yields lower surplus than that of , since it is possible for 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 ’s proposal and market-maker ’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 ’s proposal and keep ’s proposal, since market-maker could have just included the contents of ’s proposal in its own proposal.

This leaves us with only the second case, where market-maker ’s proposal conflicts with ’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 and made by market-maker and respectively. We’ll define and to be the requests and nodes that are allocated under .
We’ll similarly define
to be the requests and nodes that are allocated under . 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 and .
The next group consists of requests and nodes that were allocated under the allocation but not under . The third and final group consists of requests and nodes that were allocated under but not under .
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:
For convenience, we’re using the notation as shorthand for the surplus generated by market-maker ’s proposal. Similarly, we’re using and as shorthand for the request and node utilities.
If we were to write 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:
If were indeed a higher welfare allocation than , then that means that the non-conflicting market participants that are allocated under are willing to pay more in aggregate for allocation than those under . We’ll use this insight to make a new function!
Pareto Improvements for Conflicting Requests and Nodes
To convert that intuition into an function, we’ll take some inspiration from the welfare theorems of economics: if the non-conflicting market participants of are indeed willing to pay more in aggregate for allocation than those under , then there should be a way for market-maker to set the payments so that every conflicting **market participant strictly prefers the market outcome to the market outcome .
Concretely, we let be equal to if
and equal to otherwise. An interpretation of this condition is that market-maker 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 to that proposed under the “current best” market-maker 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 function.
Claim: Suppose that market-maker would like to propose an allocation and extract a margin . If the surplus of this outcome will exceed that of the current best, i.e. , then there exists a budget-balanced and individually rational payment rule for such that every conflicting market participant strictly prefers the market outcome over the outcome (i.e. ).
Intuition: Let’s walk through what this statement means and the intuition behind it using our running example.

Suppose that the current best proposal uses the allocation , with a payment rule that extracts no margin. For concreteness, let’s suppose that the rule charges from and pays out to . Next, suppose that market-maker would like to propose the allocation . There are no conflicting requests between and , but since allocates to both nodes, there is a conflicting node: . Let’s further suppose that market-maker would like to further extract a margin of . Does an individually rational and budget-balanced payment rule exist such that it extracts a margin of and the conflicting node prefers it strictly to the current best proposal? According to our claim, we should first compare
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 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 is being paid . The request is willing to pay up to . So to outcompete the current best proposal, we can set . The node has a cost , so the market-maker must pay out at least this much for the payment rule to be individually rational. Let’s set to satisfy this requirement. Finally, we must extract as a margin. It is possible to do this by setting , 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 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 proposing the allocation where is as defined in our running example (it maps request to the node ). What should market-maker do? One way that market-maker 2 could try to win while maximizing profit is to propose the same allocation 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 and node that were allocated under ), 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 ? Because has a higher welfare of 4 relative to the welfare 3 of , 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 ). This is because request is simply willing to pay more, even accounting for the added cost that must be paid to node . This follows from the claim we made earlier.
How should market-maker 1 respond to this? Since 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 . As it turns out, no matter what payment rule market-maker 2 sets, market-maker 1 will be able to win by proposing either or , 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 under the allocation . Because this payment rule is individually rational (market-maker 2 will have to pay a penalty if the match fails), we know that the total incoming payment is at most ’s valuation . Furthermore, since the payment is budget-balanced (since market-maker 2 will lose money if trade is subsidized), this means that . In particular, this means that market-maker 2 cannot pay both and at least , since . If market-maker 2 pays less than , then market-maker 1 can propose the allocation that matches to , and since is willing to pay up to , market-maker 1 can find an individually rational and budget balanced payment rule that offers better terms to the conflicting node . If instead market-maker 2 pays less than , then market-maker 1 can similarly propose the allocation that matches to and find corresponding payments that offer better terms. Furthermore, since market-maker 2 can’t even pay both and more than , market-maker 1 will be able to make a margin of at least on this proposal.
However, after market-maker 1 makes this proposal, market-maker 2 can again best-respond by selecting the allocation 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 and one of or .
Mechanism Properties
In net, this mechanism achieves the following properties (assuming there are at least 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 selected by the market mechanism may not have zero margin . For example, in our running example, under reasonable best-response dynamics, the margin would be at least .
✓ Individual Rationality: Under reasonable best-response dynamics, the market mechanism will select a payment rule that is individually rational under a welfare-maximizing allocation , or else users/nodes will not accept the offer and the market-maker will pay a small penalty .
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 ) 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 and extract a total margin . Similarly, market-maker 2 wishes to set an allocation and extract a total margin . 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 exceeds that of market-maker 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 with an extracted margin of yields less surplus than the allocation with an extracted margin of, let’s say, , it is still possible to set the new allocation to 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 now submits a tuple . This tuple consists of:
- A valid allocation
- A payment rule
- A maximum payment tolerance denoting the maximum allowable payment to be made by each request, satisfying for all .
- A minimum payment tolerance denoting the minimum allowable payment to be made to each node, satisfying for all .
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 wins, the mechanism is now allowed to select any such that:
- The net margin remains the same:
- The new proposals do not invalidate the tolerances: for all and for all .
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 that is able to offer better prices over the current best proposal to all conflicting market participants. There are two cases to consider.
Case 1: The allocation yields a higher surplus than the allocation .
In this case, we’d like the mechanism to replace the market-maker ’s proposal with market-maker ’s proposal as the current best proposal. As we showed earlier, if indeed does have higher surplus, then there existed a way to set the payment rules such that market-maker did indeed win.
Case 2: The allocation yields a lower surplus than the allocation , 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 replace proposal . The core issue lies in the fact that for any fixed payment rule used by market-maker , there may exist a payment rule for the lower-surplus proposal by market-maker that offers a better deal for all conflicting market participants. However, as we showed earlier, if 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 . This gives a hint at the solution to our problem: if we allow market-maker to make a counterproposal and change their payment rule, keeping their allocation fixed, we can maintain proposal as the current best if and only if it has greater surplus!
Defining the new function
To define our new test for improvement, we have to first consider the quantity
representing the total improvement in prices for conflicting market participants that proposal offers over proposal . We’ll then allow market-maker 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
representing the total additional amount that market-maker believes that the non-conflicting market participants would pay for allocation. We now set if proposal offers a strict improvement to all conflicting participants (i.e. and ), and if . Otherwise, we set .
If , then there exists a that is valid under the payment tolerances such that offers the same improvement to conflicting market participants as the challenging proposal . In this case, we can maintain as the current best, changing the payment rule to the new rule . On the other hand, if , then there does not exist any such that is valid under ’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 ’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 and be valid allocations. There exists a proposal with individually rational and budget-balanced payment tolerances such that for any proposal with any individually rational payment rule if and only if the proposal offers weakly higher surplus .
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 can sweeten the deal for conflicting market participants in response to a proposal 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 that offers strictly better prices against any challenging proposal , for any fixed challenging proposal , a payment rule for exists that at least matches the prices/payments of for the conflicting market participants. By allowing the payment rule of to change depending on the specific challenging proposal , the 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 that maximizes welfare, and a payment rule that has zero margin that is individually rational under .
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 , which could be avoided by submitting any individually rational proposal. Thus, if the 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 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 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 , 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 and be valid allocations. There exists a proposal with individually rational and budget-balanced payment tolerances such that for any proposal with any individually rational payment rule if and only if the proposal offers weakly higher surplus .
Proof. To prove this claim, we’ll need to analyze both directions. Suppose first that . In this case, we’ll constructively show the desired result by taking the payment tolerance to be equal to the valuation of the request for the allocation, and similarly taking the payment tolerance 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 for this proposal. That means that the total improvement
offered by proposal to conflicting market participants exceeds the total slack
Equivalently, this means that there does not exist a such that , , and where for all and for all . Equivalently, for all such , the difference
However, notice that we could have selected and for all non-conflicting market participants and . As we must keep the margin it follows that for any such choice of , conflicting participants pay at most the margin of the original payment rule less the surplus generated by the allocation for non-conflicting participants.
Notice also that under the proposal submitted by market-maker , the total amount paid by conflicting market participants is at most the margin of the payment rule less the surplus generated by the allocation for non-conflicting participants.
Where the inequality follows from the individual rationality of . Putting these two together, it follows that if , then
where to get to the second line, we add the quantity
to both sides. We’ve now reached a contradiction, since we assumed that . This completes the first direction, where we’ve shown that if proposal yields higher surplus than , then there exist individually rational payment tolerances such that . We now show the second direction: if there does not exist individually rational payment tolerances such that , then . To see that this direction holds, notice that there exists an individually rational payment rule that sets for all , for all , and sets
for all and
for all . For this payment rule, we have that
Notice further that for any valid given payment tolerances ,
It follows that as defined above is positive for any .
Equivalently, this means that , and no matter what individually rational 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.