Discover DePIN Cloud Web3: Transforming Infrastructure Services with Blockchain DePIN

Mantri Nodes
18 min readJun 2, 2024

--

The Web3 Alternative to Cloud Giants: How Decentralized Physical Infrastructure Networks Transform Infrastructure Services with Blockchain

Versione italiana dell’articolo disponibile Qui; Italian Version available Here.

DePIN networks provide decentralized cloud services

TL;DR; Let’s enter the world of Decentralized Physical Infrastructure Networks (DePIN), networks that use blockchain to manage physical infrastructures in a decentralized way and offer Infrastructure services as a Web3 alternative to traditional big players

In this article we analyze the DePIN projects that exploit the decentralization of the blockchain to provide physical infrastructure services such as storage, computing, wireless, IoT etc. in a distributed way without intermediaries; an infrastructure provider can make its infrastructure capacity available to the network, encouraging the growth of the network; we will see how blockchain allows us to innovate in this area by allowing access to resources in a permissionless way and how this lays the foundations for the infrastructure services of the future.

We will then walk through the Filecoin example, exploring hands on how to use the client to make a deal for storage and upload the data to be archived.

Disclaimer:

The content presented in this article is created entirely by human writers WITHOUT the use of AI or automated writing tools.

Introduction

In the crypto space, finance is not the only area of decentralization. Blockchains support a new wave of technical infrastructure for creating decentralized and open cloud services, which will be a main part of Web3.

The use of blockchain protocols in the infrastructure sector has the aim of allowing the construction and operation of infrastructures and technology layers in an open and decentralized manner; this area is therefore trying to trace a path that can allow for emancipation from the technological giants that currently control most of the cloud services and infrastructure market; the networks with a DePIN focus, therefore, want to create peer-to-peer networks that bring together supply of hardware with demand on an open and decentralized market. These services, in addition to being used as alternative primary services to the large cloud providers, can probably be used as a decentralized redundancy, reducing the risk of using only the platforms of the main cloud providers.

DePIN The origin of the acronym

The introduction of the acronym DePIN is due to Messari who, through a survey on X (formerly Twitter) in 2023, selected with the community the most representative name for web3 Physical Infrastructure:

Survey on X where the acronym DePIN is selected

Salvador Gala e Sami Kassab released the report “State of DePIN” at the end of 2023, entirely dedicated to this topic where an in-depth analysis and classification of the applications and chains that fall within this area is carried out.

The acronym DePIN is what has therefore become a standard for classifying this type of project, but this type of project has been around for several years and over time has been classified with various acronyms:

These acronyms therefore tend to always connect a decentralization component and a financial component as a Tokens based incentive; the acronym in vogue now DePIN takes the fame obtained from decentralized finance where the acronym DEFI has now become a standard and replicates it on physical infrastructures taking advantage of the now consolidated association of the acronym with blockchains and the token economy.

What are Decentralized Physical Infrastructure Networks

Let’s try therefore to better understand what is meant by Decentralized Physical Infrastructure Networks or more briefly DePIN.

DePIN networks are blockchain-based networks that instead of focusing on financial services, attempt to build decentralized technological infrastructures in the real world, creating networks of physical hardware that can perform and offer specific services and functions currently offered in a centralized and traditional way by companies legacy.

“Networks that use crypto-incentives to efficiently coordinate the buildout & operation of critical infrastructure.(Messari.io — Sami Kassab / Salvador Gala , 2023)”

DePIN Timeline by Messari

DePIN’s perimeter of specialized infrastructures covers various services and is in the process of expanding:

  • Compute
  • Wireless
  • Energy
  • AI
  • Services
  • Sensor

According to Messari’s report, DePIN projects can be classified into two large groups:

  • Physical Resource Networks (PRNs): protocols that support the provision of physically localized hardware in specific areas/locations to support specific use cases linked to the physical localization of the hardware (for example purposes only we can think of Helium which aims to create a decentralized wireless network)
  • Digital Resource Networks (DRNs): protocols that support the provision of hardware resources as a decentralized service such as computational capacity or storage less dependent on the physical location of the hardware (for example purposes only, filecoin can be taken as a reference which is a decentralized storage network)

Basic principles of DePIN networks

The DePIN Networks embrace the principles of blockchains and extend them to infrastructure services; as within blockchains we can find various configurations with permissioned and permissionless networks, public and private networks.

The fundamental aspects that I believe these networks inherit from blockchains are:

  • Decentralization of the chain and infrastructure: in fact, not only a transactional layer, but also the service and physical layer is being moved to distributed participation; decentralization, in fact, tends to push the participation of more subjects who, in addition to accepting and respecting the operating rules of the network and securing it from censorship and unilateralism; these subjects also allow the basic offchain physical characteristics to be decentralized in order to overcome the limit of possible physical blocks on the service/hardware of a single provider rather than legislative regulatory interventions of a single body such as a state
  • Tokenization and incentives: DePIN networks tend to tokenize physical assets and track on-chain agreements to ensure transparent management and verifiability of the physical layer as well; this is done through the economic incentive that puts the nodes participating in the network in a position in which it is not economically convenient to behave irregularly, fraudulently or maliciously even on the tokenized offchain component and on the agreements with the users of the service; in fact, participation, in addition to being incentivized by the cost of the service paid by the users, will be secured by an economic countervalue (typically a stacking) also on the offchain component which can be slashed by the network in case of non-compliance with the guarantees and anomalous behavior
  • Verifiability: the agreements and services provided are tracked onchain and are therefore immutable in their information and verifiable at any time, which can guarantee the possibility of always analyzing the behavior of nodes and wallets, as well as tracing in an immutable and non-falsifiable way an agreement between the customer and the service provider; we will try to verify in our next examples how we can verify these types of onchain agreements

Purpose and Goals of DePIN projects

These networks therefore have the aim of decentralizing not only the ledger with transactions, data and nodes, but also the physical infrastructures themselves and the services, tending to create an ecosystem in which each component can be managed in a distributed way through the blockchain, allowing greater accessibility as well as security to services.

Furthermore, DePIN networks push each participant to expand the network by sharing physical resources, taking advantage of the provision of this capacity

The distributed architecture of these networks tends to provide high resistance to systemic problems in a decentralized way, in fact the network that can be operated via blockchain allows the functioning of the network to be guaranteed even following problems with individual components. This becomes fundamental for networks not only of services, but of hardware, perhaps of sensors and IoT where the provision of the service following the failure of a hardware component is guaranteed by the presence of the network on other devices.

Furthermore, by leveraging the resources made available by the individual nodes operating in the network, therefore by the actors who want to participate in the network because they are incentivized, they allow on the one hand to significantly reduce management costs and complexity compared to traditional centralized models.

The incentivized model for network participation allows for rapid expansion and scalability of the network as it does not rely on a single entity for resources and development, but a kind of crowdsourcing model.

Incentive for participation in the DePIN network and role of the Blockchain

DePIN projects use native tokens to incentivize users to contribute with physical resources such as connectivity, computing power and sensors, rewarding those who participate in the network; in these cases the Tokens can have different functions, if on the one hand the goal is to incentivize and reward those who make resources available for the infrastructure (similar to what happens to Miners in PoW networks or Validators in PoS networks to maintain the distributed ledger and record transactions), in these networks initially the tokens take on both the function of governance and payment by users towards the network operators; the more complex networks tend to track the use of resources on the blockchain and allow timely, continuous and punctual recognition of service costs from the user to the DePIN network node.

To do this, Smart Contracts on the blockchain are used to automate the management of physical assets.

The Role of Smart Contracts

In networks of this complexity, where offchain components are a fundamental gearwheel, there must be a mechanism that guarantees onchain proof and the verifiability and authenticity of offchain components, services and data, as well as programmability and an automatic incentive layer. From this perspective, programs that can be executed on the blockchain become even more important; entities that propose themselves as suppliers of services and physical assets must map and verify the infrastructure onchain and periodically submit evidence of the availability and verification of the physical asset to the chain; furthermore, the customer must be able to submit and verify agreements with physical asset providers without revealing information; this will happen by exploiting smart contracts for the agreement and onchain registration of offchain characteristics; smart contracts are then used to generate verifiable IDs that tie to the characteristics of the service and infrastructure.

Hands On: Let’s explore a DePIN project: Filecoin

The Filecoin Project Homepage

Filecoin is a peer-to-peer network that enables file storage, with built-in financial incentives and encryption to ensure files are stored reliably over time.

Filecoin is configured in a certain sense as a backend archive for storage providers and less as a product for Enduser.

In Filecoin users pay to store their files on storage providers. Storage providers are computers responsible for storing files and proving that they have stored them correctly over time. Anyone who wants to store their own files or get paid to store other users’ files can sign up to Filecoin. The available storage space and the price of that storage space are not controlled by any single company. Instead, Filecoin facilitates open markets for file storage and retrieval that anyone can participate in.

Filecoin is based on the same software that is used by the IPFS protocol, which allows content storage in a peer to peer manner without relying on centralized services; Filecoin adds an incentive layer to this protocol.

The incentive layer involves the use of a native token to encourage storage on the network; Storage providers “mine” the $FIL token by providing storage service on the network.

In particular, the protocol provides a double minting model for rewards, a Baseline minting, which mints the token based on the performance of the network, and a Simple minting which is generated when the blocks are produced. To guarantee the correct behavior of the network nodes, collateral guarantee mechanisms are envisaged with the possibility of slashing for non-compliant actions and behaviors.

The data that is uploaded to Filecoin is divided into blocks and distributed across a network of participants who provide the storage; to do this Filecoin uses directed acyclic graphs to map the relationships between the various data blocks:

  • Filecoin breaks data into manageable chunks. These blocks can have relationships with each other, for example, a block can reference another block or a set of blocks that contains part of its data.
  • Filecoin records the relationships between various blocks of data during the storage process. This allows you to trace the provenance of the data and ensure the integrity of the data during its storage and retrieval.

Proof of Storage / Replication / Spacetime

Being a decentralized storage network, the protocol uses so-called proof-of-storage where miners contribute their free storage space to the network to store data and then provide proof to the client to verify whether their data has been stored for a period.

Two other mechanisms are used that allow storage providers to guarantee the characteristics of the service provided: with proof-of-replication, storage providers prove that they have created a copy of the data and are storing it on behalf of the network; Proof-of-Spacetime is used to continuously prove that we are storing customer data for the entire duration of the storage contract.

Compute-over-data & Filecoin virtual machine

The protocol allows you to perform calculations and analyzes directly on the data, without the need to move or copy the data from one place to another, i.e. perform processing on the data layer used by the content-address system; in this way the goal is to support large off-chain computing capacity so as to allow computation where the data is, instead of moving the data to external computing resources.

The Filecoin VM, on the other hand, allows you to execute smart contracts with relatively more limited calculations for the creation and application of rules to support automatic data storage and rules, as well as manage, query and update the blockchain underlying the network.

Let’s Explore the Filecoin Chain

We can briefly explore the filecoin chain to see the characteristics of distributed storage; at the time of writing this article the availability of storage that can be allocated from the network is approximately 23EiB.

storage capacity available on Filecoin

There are approximately 2900 active storage providers as of May 2024.

Active Storage Providers

We see that there are more than 3500 active customers according to filecoin plus

Active Clients

and from destor.com we can identify some of the main users of decentralized storage.

Top Active Customers according to destor.com

Browsing the chain, we can analyze the details of the agreements for data storage from a customer to a service provider (we will see the details of uploading a file via a client in the following sections).

Example of a deal between a Customer and a Storage Provider saved onchain

By analyzing the message we can identify the following details:

  • Proposal CID: The proposal Deal ID on the Blockchain
  • Create Time: The Deal Creation timestamp
  • Message CID: the message ID that calls the method “PublishStorageDeals”
  • Piece CID: a Content Identifier That represents the archived data
  • Signature: the Customer Sign in the Deal Creation

In detail we can see the characteristics in particular:

  • storage Dimension
  • Start Epoch for the storage deal
  • End Epoch for the storage deal
  • Provider

Upload and Retrieve Data from Filecoin

To interact with the network, upload and retrieve data or use a service provider towards Filecoin, there is the SDK with which to interact with the Filecoin Virtual Machine, services and clients; in our case for testing we will try to use the Lotus command line client.

We will therefore briefly try to save data on the Filecoin Network, following the Lotus documentation we will go to:

  • package some data
  • import them into the local Lotus lite node
  • find a storage provider via the Filecoin Plus miner registry
  • create a storage agreement and then wait for the agreement to complete.
  • Upload Data
  • Retrieve data from the network
NOTE: The data uploaded on Filecoin are Public

Before sending data to Filecoin storage providers, it needs to be packaged; CAR (Content Addressable aRchive) files are a type of standard format for grouping and exchanging addressable data by content; this format allows you to organize and encapsulate data, ensuring that it can be easily verified and retrieved.

To use Lotus we will need at least one Lite-node; a Lite-Node can do things like sign messages and talk to storage providers; for other activities the Lite-nodes automatically direct these requests to the full-nodes.

To use the Lotus Client we will need a Filecoin address and the $FIL loaded on the address.

First let’s create a 5GB file of random data:

dd if=/dev/urandom of=5gb-filecoin-payload.bin bs=1M count=5200

The dd command in Linux is a file copying and converting utility which in this case will read data from ‘/dev/urandom’ which is a special device of the Linux kernel that provides random data.

We then import the file we want to upload to filecoin in the lotus client service

lotus client import 5gb-filecoin-payload.bin

Lotus creates a directed acyclic graph (DAG) based on the file; the DAG is used to record relationships between blocks of data during the storage process. This is important because Filecoin adopts a distributed, decentralized storage model, where data is broken into blocks and distributed across the Filecoin network itself.

Once completed, Lotus will generate the payload CID.

We must now select a storage providers from those available, we can find the list of available miners in the Top Miners table:

Active Storage Providers in the Filecoin Network

We choose two Storage Providers and check their characteristics in the Reputation System, to check costs, minimum hosted data size and location

Storage Providers Reputation System

“note: in this Provider selection process we find some inconsistencies between the network explorer and the Reputation System for which we have not been able to find a clear justification; the path taken is only for illustrative purposes of the use of the low level client, for data use and storage it is probably better to use and follow services that make this part transparent”

Once the storage provider of interest has been selected, we continue with the creation of the data storage agreement; To do this, the Lotus client provides us with an interactive tool that guides us in selecting the features:

lotus client deal

We specify the CID of the data created in the previous steps and enter the number of days for which we want the file to be kept on Filecoin

Data CID (from lotus client import): bafykbz…
Deal duration (days): 180
Miner Addresses (f0.. f0..), none to find: f02665 f049882

Once the transaction has been confirmed, the client will return a CID for each Storage Provider:

Deal (f01000) CID: bafyreict2zh…
Deal (f01001) CID: bafeauyreict…

In this step, the Lotus client goes to sign the message on the blockchain for the submission of the storage agreement with the configured wallet

We check the progress of the transfer with the command:

lotus client list-transfers

Once completed our file is available and uploaded to storage; we will be able to recover it using the CIDs created at the time of the agreement.

Through the chain explorer we can see the deals that are created:

Deals on the Chain Filecoin
Example — Detail of a deal from a client to a provider

Retrieve Data

Similar to what was done for signing the agreement with the storage provider and uploading the data, to carry out the data recovery we will have to use a client (as indicated previously there are services that make this operation transparent).

Clients like Lessie allow you to retrieve uploaded data; to do this we will need to have the CID of the data we want to recover available and it will be possible to recover the data simply with the call:

lassie fetch -o - <CID>

The same Client also provides an HTTP interface and it will also be possible to retrieve the file directly from the HTTP daemon:

GET /ipfs/{cid}[/path][?params]

In general there will be no transaction costs to pay to extract data from Filecoin using the client, in fact Filecoin is designed to incentivize storage providers to offer storage; in general the network uses two types of known, the storage nodes preserve the data while the retrieval nodes are optimized for rapid data recovery; retrieval nodes are paid a small fee of $FIL when they are the first to locate and send the requested data; in general this small cost is passed indirectly as the cost of storage.

Therefore, to perform data recovery you will not have to sign any onchain transactions.

Summary Filecoin

We therefore briefly covered the low-level use of a filecoin client which allowed us to understand how the characteristics of a decentralized network and the blockchain can bring characteristics of web2 and web3 into the management of files, therefore in addition to the decentralized storage capabilities the typical features of web3 such as immutability, verifiability as well as incentives are integrated.

As seen, the Network is designed for non-retail use and there are various providers that abstract the storage and blockchain layer to provide a semi-managed service with web3 features.

This is an example of Decentralized Physical Infrastructure which has already widely taken hold and lays the foundations for decentralized web3 also in physical infrastructures, currently has an active deal capacity that reaches a total of 1900PiB (pettibytes), which are equivalent to 190 million of hours of video, 190 trillion images, 1.9 quadrillion documents (report by Messari).

Active Storage Usage on Filecoin Network

The amount of active storage makes us understand how this service is a truly active reality in DePIN and how these projects can become the new wave of infrastructure.

Conclusions

We have seen how the blockchain is integrating with the offchain world to provide services on traditional physical infrastructures while adding the decentralization and non-censorship characteristics typical of web3. The DePIN networks are appearing in various areas in which they will be able to experiment with the possibility of providing infrastructural services similar to existing ones, but in a new way and involving all those entities that want to make this type of service or hardware available to participate in the network.

This therefore requires that the offchain characteristics be surveyed, tokenized and guaranteed through onchain agreements and tests that guarantee the possibility of execution without third-party intermediaries, but guaranteeing a specific level of service and availability.

Reflections on the Future of DePIN and Decentralized Physical Infrastructure

The DePIN networks are an area with use cases that open up the use of blockchains to great application possibilities in the future, while on the one hand they could become a driving force for the growth of non-centralized and alternative infrastructure services to the big players, on the On the other hand, there is still a lot of experimentation and analysis of the benefits and mainstream adoptability of these networks.

I also see the possibility of opening up participation to even smaller players up to in specific cases the individual contributor such as a technology enthusiast (think of the possibility of making wifi networks available in DePIN which could be within the reach of even the less experienced); but all this driven by the economic incentive underlying the blockchain and not just the desire to experiment.

I believe, however, that at this moment access is still very difficult in various areas even where DePIN networks have already been created. It seems to me that the entry barrier is quite high and also the understanding of the advantages of the possible use cases by of a user is not always immediate; the hope of having an infrastructure service similar to that of the big players, but at a much lower cost seems distant to me personally, not so much for the technological and service part which in specific vertical cases could also become comparable, but from the point of view of both of the cost for the end user who is often subjected to the volatility of the tokens associated with the project, and of the ease of use and access compared to the now mature web2 services.

However, I must say that this area is fascinating and I think that in the future it will be able to generate interesting niches and stimulate the birth of a web3 infrastructural and technological layer which will allow us to have services comparable to those we know and greater guarantees, as well as allowing all of us to possess and exercise a small piece of that network by becoming an active part of web3.

Disclaimer:

The article here includes some examples for illustrative purposes only. It should be noted that these cases do not in any way constitute suggestions or advice on the use of the example platforms.

Furthermore, it should be noted that the article was written based on my current knowledge, there may be inaccuracies, errors or omissions. Readers are therefore advised to conduct further research and consult additional sources before making decisions or taking actions based on the content provided herein.

DYOR

References:

--

--

Mantri Nodes
0 Followers

Empowering Blockchain Networks & Driving Web3 Education 🌐 Explore more at https://nodes.mantri.cloud/