Restaking multiplies the power of resources. It was originally derived from the concept of staking in blockchain networks, where users lock up digital currency to secure the network. Restaking extends the utility of these committed resources beyond their primary function. It enables participants to leverage assets already locked to one platform to simultaneously support and secure additional, distinct networks or services.
At Bagel, we’re taking this concept beyond cryptocurrencies to physical computing resources like Graphical Processing Units (GPUs). Through our research, we developed a novel application of restaking principles to computational resources, GPU Restaking. Traditionally, computing resources on peer-to-peer networks are dedicated to one task, such as mining and validating blockchain networks or performing AI workloads. GPU Restaking allows these same physical compute resources to be utilized across multiple platforms concurrently. Especially for machine learning use cases.
Filecoin Foundation and Bagel partnered to launch GPU restaking on the Filecoin miner network. Exclusively available on Bagel’s AI development platform.
As the builders of the neutral collaboration layer for Artificial Intelligence, we're open sourcing our novel GPU Restaking work as a public good. Let's "delve" into how this affects the computational resource marketplace dynamics.
And if you're in a rush, we have a TLDR at the end.
Computational Resource Marketplaces
Traditional Cloud
Traditionally, organizations turn to cloud providers instead of maintaining their own compute infrastructure. Tech giants like Microsoft, Google, Amazon, and CoreWeave dominate this market. A situation that comes with significant disadvantages.
For example, companies prioritize profit over optimal buyer-seller matches. Market dominance results in price-fixing and monopolies. Multi-cloud setups often use inconsistent security tools across providers, potentially compromising overall security and privacy.
This fact highlights the need for peer-to-peer alternatives that balance efficiency, fair pricing, and robust security.
Non Monetized Peer-to-peer
Computer scientists have long studied peer-to-peer marketplaces for computational resources. These systems enable the use of idle computing power.
BOINC (Berkeley Open Infrastructure for Network Computing) stands out as an example. This open-source middleware powers volunteer computing networks and allows individuals to contribute their spare processing capacity to scientific projects.
As of 2024, BOINC's combined computing power averages 16.489 PetaFLOPS daily. This places it among the world's top 100 computer systems.
Although the coordination of the compute happens in a centralized fashion, BOINC's innovation lies in its ability to harness otherwise wasted computational resources.
Monetized Peer-to-peer
While BOINC operates on a volunteer basis, digital marketplaces for compute power monetization are emerging. These platforms enable users to sell idle processing capacity. Unlike BOINC, participants receive compensation for their contributions. These digital systems facilitate transactions of computational resources like GPUs.
Digital asset marketplaces have gained popularity in recent years. For example, the digital asset marketplace OpenSea reaching over $39 billion in total sales. These platforms allow users to create and trade various types of digital assets from artwork to virtual real estate.
But, computational resource marketplaces face unique obstacles. These differ from platforms trading purely digital assets (Carter 2023), (Buyya et al. 2001).
Resource standardization and quality control present significant hurdles. Unlike inherently digital and easily verifiable assets, computational power can vary greatly in terms of performance, reliability, and security.
Task distribution across diverse devices adds technical complexity (Jain et al. 2017). This requires advanced scheduling algorithms. Robust security measures must protect both resource providers and users.
Economic challenges arise in accurately pricing computational resources. Factors like availability, and specific features complicate valuation efforts; see page 4 of (Wu et al. 2019) for other types of challenges.
Yet, compute marketplaces hold transformative potential. They promise to democratize high-performance computing access.
Compute Aggregation
An increasingly popular design for a decentralized marketplace of computational resources relies on aggregating decentralized cloud providers into a unified marketplace. This approach offers buyers diverse options across various tech stacks.
While aggregating cloud providers is common, even in traditional cloud setups (Paulsson et al. 2020, Chapter 4), it presents notable challenges.
The developers of the aggregation marketplace, not users, decide which providers to include.
This contradicts the fundamental principle of peer-to-peer marketplaces: free transactions between buyers and sellers. In principle, the seller and buyer should be the ones deciding what kind of computational resource is offered and purchased in the marketplace.
We propose an improvement.
GPU Restaking
GPU Restaking enables providers to offer computational resources on multiple platforms simultaneously. This approach allows sellers to earn from existing commitments while generating additional revenue streams. Similarly to crypto-economic restaking, providers lock-in their computational resources on one platform, then “restake” them on another.
The process shifts control to market participants, enabling direct negotiation. Computational resources serve multiple platforms concurrently, maximizing utilization and efficiency. This model aligns with core principles of peer-to-peer systems.
GPU Restaking facilitates unrestricted compute power trade, creating a transparent marketplace for digital resources. It represents a fundamental reimagining of resource distribution methods.
By leveraging existing stakes, providers optimize asset usage. This technique enhances market liquidity and resource availability. The shift could significantly impact future computational ecosystems.
How it works
In GPU Restaking, sellers have the freedom to offer any computational resources they have, whether from cloud providers, decentralized platforms, or personal computers. These resources are resold on the “restaked” platform like Bagel’s.
First, sellers register as providers on services like Filecoin network. They list their resources there. Then, they register on our platform as resource providers, reselling the same resources via the original provider.
The figure above illustrates the general process for GPU Restaking.
Consider Alice, a resource provider, and Bob, a developer (buyer) on Bagel’s AI development platform. Here’s how GPU Restaking flows:
Alice registers computational resources on an external platform.
Alice registers her address and external provider on Bagel's platform.
Bob pays for the computation on Bagel's platform.
Bagel's platform pays for the computation.
If Alice provides the computation, the external platform pays her.
Additionally, Bagel's platform gives Alice extra rewards.
If Alice offers resources from an external provider, she earns from that provider plus earnings from Bagel's platform. This demonstrates the power of GPU Restaking, empowering sellers to decide what resources to sell and getting rewarded.
Order Model for GPU Restaking
In this model of a marketplace transaction, when Alice wants to buy some computational resource she makes an order. An order in this case is a statement of the computational resource Alice wants to purchase. Therefore, she needs to specify the type, amount, price range willing to pay, usage time, and any other information she needs in order to carry out her desired work.
If Bob wants to restake some computational resource on Bagel's platform, he will also need to tell the platform his unique identifier from the service provider that he is offering at the marketplace. That way Alice, when she decides to buy the resource, she can choose the one provided by Bob, and the platform can later reward Bob accordingly. The figure below shows the steps of how Alice can place an order and how Bob gets rewarded for restaking his resources.
A general request for computational resources from Alice proceeds as follows.
Alice creates a request by publishing a statement in the marketplace specifying the desired computational resources.
Bob sees Alice’s request.
Bob creates an order in an external provider through Bagel's platform, based on Alice’s request.
The external provider returns the bids for the order it received and publishes them in the marketplace.
The marketplace sends the list of available resources to Alice.
From the list received, Alice selects the offered resource and makes the payment to the marketplace.
The marketplace receives the selection from Alice and signals the provider accordingly, thus, opening a communication channel between Alice and the provider.
After Alice finishes using the purchased computational resource, she signals the marketplace that her work is done.
The marketplace then closes the communication and pays the provider.
Finally, Bob receives the payment from the provider and the rewards from the marketplace.
An escrow account is necessary in the marketplace and the service provider to keep the lease open for Alice.
One issue with this model is that when Alice chooses a provider, another user of Bagel’s platform or in the original provider, can buy the resource before Alice. This issue can be solved using a fair exchange protocol between Alice and the marketplace; see page 251 of Nardini et al. (2020) for a similar proposal.
An Offer Model for GPU Restaking
For this model of a marketplace transaction, we have Bob first placing offers of his available computational resources. In this case, Bob announces his offerings to the marketplace. Any buyer can see the list of offers that Bob has and any other offer in the marketplace.
To make this model feasible, Bob will need to open escrow accounts on the original provider and restaked provider in the marketplace. In this model, Bagel's platform leases the computational resource to Alice that Bob has provided to the marketplace. The figure below shows the steps of how Bob can make an offer and how Alice gets to buy it.
A general offer of computational resources from Bob proceeds as follows.
Bob creates an offer by locking funds in an escrow account in the marketplace.
The marketplace creates a communication channel with the service provider indicated by Bob.
Alice can query the marketplace and receive a list of available computational resources.
From the list Alice receives, she chooses a resource and she can start using it.
After Alice finishes using the computational resource that she bought, she signals the marketplace that her work is done.
The marketplace then closes the communication and pays the provider.
Finally, Bob receives the payment from the provider and rewards from the marketplace.
This model will allow a faster service for users requesting for computational resources through Bagel's platform, since users can see a list of available resources and choose their favorite immediately after they make a query.
Verifying Ownership of Computational Resources
When a seller is restaking GPU through Bagel's platform, he will need to provide guarantees that he is the actual owner of the resource being offered. If a seller cannot prove that he owns the resource that is going to be offered through the marketplace, then that opens the door for other users just claiming rewards for assets they do not own.
The exact mechanism of ownership depends on the type of service provider the seller is using for GPU Restaking on Bagel's platform. Here we present a simple example using Filecoin.
In Filecoin there are two addresses that can be used to uniquely identify a resource, namely the storage provider ID and actor ID addresses; see the Boost docs for details and Filecoin addresses. One simple way to guarantee that a seller owns those addresses is to hash their concatenation and sign the hash with his Filecoin private key. Then, the seller submits his storage provider ID and actor ID, along with the signature, to the Bagel marketplace. Then the marketplace can verify the signature using the seller’s wallet public key from Filecoin.
This process guarantees that the seller offering storage is indeed the owner of those resources in the original provider. Whenever necessary, other information can be added to the signature for added security, like timestamps, deal IDs, etc.
A similar mechanism can be used for other compute providers.
Game Theory Foundation
We have seen how GPU Restaking works and the advantages on user experience in Bagel's platform.
Here we want to give a more rigorous argument in favor of GPU Restaking from a economic game theory perspective. To that end, we show how GPU Restaking can be understood as a cooperative game and how restaking computational resources maximizes payoffs of all parties involved.
Proof of Optimal Coalitions
Cooperative game theory, as described by Nisan et al. (2007), examines how groups of players, called coalitions, collaborate for mutual benefit. A cooperative game consists of a finite set of players N and a characteristic function v that maps subsets of players to real-number payoffs. The function v assigns zero to the empty set.
In this framework, any subset of N is a coalition, with N itself being the grand coalition. The distribution of the grand coalition's value v(N) among players is represented by a payoff vector x = (x1, ..., xn). Shapley (1951) introduced a method for fair payoff distribution, known as the Shapley value.
Thesis: Grand Coalition Maximizes Value and Individual Payoffs
Our goal is to prove two key points:
That the grand coalition maximizes total value.
It maximizes individual payoffs optimally (Pareto optimal).
Part 1: GPU Restaking grand coalition maximizes total value
To prove that the grand coalition maximizes total value, we must show that the game is superadditive. Superadditivity means that for any disjoint coalitions S and T, v(S ∪ T) ≥ v(S) + v(T).
For the case of GPU Restaking, S = Peer-to-peer network like Filecoin, T = AI developers on Bagel’s platform.
We can prove superadditivity through induction. We start with a base case considering one miner, one developer, and the Bagel marketplace. Then, assuming it holds true for n players, we prove it for n+1 players. This inductive approach allows us to conclude that superadditivity holds true for all coalition sizes.
The implication of superadditivity is that significantly supports the formation of the grand coalition of GPU Restaking as the value maximizing strategy.
Part 2: GPU Restaking grand coalition maximizes individual payoffs
To demonstrate that the grand coalition maximizes individual payoffs, we need to prove two things:
2.1. That the Shapley value maximizes individual payoffs.
2.2. That the grand coalition generates more value than partitions.
We start by proving cohesiveness, as defined in Peleg & Sudhölter (2007). A game is cohesive if the value of the grand coalition is at least as large as the sum of the values of any partition of the player set.
We can establish cohesiveness: v(N) ≥ Σ v(Pi) for any partition {Pi} of N
Example: Total value when all GPUs are restaked exceeds sum of values from separate computational resource marketplaces.
Next, we consider the core of the game, another concept detailed in Peleg & Sudhölter (2007). The core contains allocations of the grand coalition's value that no subcoalition can improve upon.
Core concept applied to GPU Restaking: Payoff vector x is in core if:
Σxi = v(N) (efficiency)
Σxi≥S ≥ v(S) for all coalitions S (coalitional rationality)
We compute Shapley values for base case - one resource provider, one developer, Bagel, proving core membership. We then show that the resulting payoff vector satisfies both efficiency and coalitional rationality.
This mathematical framework provides a solid foundation for understanding the economic benefits of GPU Restaking. It demonstrates that full participation not only maximizes overall value but also ensures that each participant receives the best possible individual outcome.
TLDR
GPU Restaking optimizes resource utilization in decentralized networks. This novel technology developed by Bagel enables concurrent use of assets across multiple platforms. Bagel partnered with Filecoin Foundation to launch this technology on the Filecoin network. Developers building AI applications on Bagel's platform have exclusive access to this innovation.
Traditional cloud providers dominate the computational resource market. This concentration leads to potential monopolies and security vulnerabilities. Peer-to-peer alternatives aim to balance efficiency, pricing, and security. GPU Restaking allows providers to offer resources on multiple platforms simultaneously.
The process involves a series of steps for sellers and buyers. Sellers register resources on external platforms and Bagel. Buyers pay on Bagel for computation. Sellers receive rewards from both the external provider and Bagel.
Two marketplace models emerge: Order Model and Offer Model. Both utilize escrow accounts and communication channels. Verification of resource ownership prevents fraud and ensures system integrity.
GPU Restaking represents a significant shift in resource distribution. It enhances market liquidity and resource availability. This aligns with core principles of peer-to-peer systems. It facilitates unrestricted compute power trade, democratizing access to high-performance computing.
Bagel is a deep machine learning and cryptography research lab. Building a credibly neutral, peer-to-peer machine learning ecosystem.
Sounds super interesting. Just reminded the golem project, it could be a good addition to this cooperation as well.
Let met know if you’re interested in restaking this some of these resources on Pocket’s upcoming Shannon testnet.
We’d need your technical support to integrate with a Cosmos project, but would be able to generate demand.
https://arxiv.org/abs/2405.20450