Current cloud hosting platforms, although efficient, all share the same problem: They are centralized. This exposes the uploaded files to all types of risk. They can be accessed, tampered with and lost. Furthermore, these platforms usually rely on a subscription model which means users often don’t get what they pay for. As usual, blockchain is here to help. There are a number of projects that are working on decentralized cloud storage solutions. One of them is Sia.
Sia is a decentralized cloud storage platform created to provide a competitive alternative to both traditional and P2P cloud hosting platforms. It allows users to store their files in a decentralized manner, giving users the chance to monetize their idle HDD space by becoming a host. While Sia provides a blockchain-based solution for storage contracts and payments, the files are not directly stored on the blockchain, and are instead stored by peers called hosts. The only thing that is stored on the Sia blockchain is the information from the transactions and storage contracts that are formed between the uploader and the host, defining the terms of their agreement.
When clients want to store a file, they can do so by creating a storage contract with the host. Both the client and storage provider must accept the terms before the contract is made valid. Hosts can choose to reject unfavorable terms or unwanted files. File contracts also specify a duration, challenge frequency, and payout parameters. Hosts must comply with these parameters in order to receive the full reward for hosting. These contracts allow both the client and the host to have a certain degree of flexibility. Hosts can announce themselves as minimally reliable, offering a low price and a agreeing to minimal penalties for losing files; or they can advertise themselves as highly reliable, offering a higher price and agreeing to harsher penalties for losing files.
These parameters include the reward for a valid proof, the reward for an invalid or missing proof, and the maximum number of proofs that can be missed. Proofs ensure clients that the host is still storing the file and are provided in the form of a segment of the original file and a list of hashes from the file’s Merkle tree. These proofs are made public and can be verified on the blockchain.
In every contract, the challenge frequency specifies how often a storage proof must be submitted, and creates discrete challenge windows during which a host must submit storage proofs. Submitting a valid proof during the challenge window triggers an automatic payment to the host. If no proof or an invalid proof is submitted, the payment will instead be destroyed. The contract will be deemed invalid if the number of maximum proofs that can be missed is exceeded.
If the contract is still valid at the end of the contract duration, it successfully terminates and any remaining coins are sent to the valid proof address. Conversely, if the contract funds are exhausted before the duration elapses, or if the maximum number of missed proofs is exceeded, the contract unsuccessfully terminates and any remaining coins are destroyed.
Since the storage proofs contain no mechanism to enforce constant uptime and there are also no provisions that require hosts to transfer files back to clients upon request, clients can choose to split up files into pieces which are then encrypted and stored across many hosts, allowing the client to attain high file availability even if the average network reliability is low. Files can be recovered even if all the parts are not available, protecting clients against offline hosts and ensuring that storage providers must compete to provide the best quality of service when returning files to the user. Since clients can request a file at any time, hosts have a direct incentive to maximize uptime in order to collect as many rewards as possible. Contracts do not require hosts to transfer files back to their client when requested. Instead, an out-of-band ecosystem must be created to reward hosts for uploading.
Hosts can also announce themselves to the network, allowing clients to create a database of potential hosts and form contracts with only those they trust. We’re left with a system in which neither clients or hosts are required to trust each other or a third party to complete a storage contract, and although there are certain vulnerabilities in this system, users have no direct benefit to exploit them, rendering this a highly functional p2p cloud storage platform.
It is also worth mentioning that although the platform relies on no central authority to process transactions or contracts, Nebulous Incorporated, the for-profit company that created Sia, charges a 3.9% fee that is allocated to Siafunds holders. Siafunds are held by Nebulous (88%) and by the early crowd-fund backers of Sia (22%). This system is employed as an alternative to premine as a source of income.