Filecoin (FIL) is a blockchain network that seeks to create a huge network of decentralized data storage nodes, which works based on smart contracts and a native token known as FIL.
EThe Filecoin project is a project focused on building a decentralized storage network. A network that is economically powered by blockchain technology and a cryptocurrency under the same name and is known as the FIL token. In that sense, the idea behind Filecoin is very similar to the well-known Siacoin (SIA).
But you will surely wonder what exactly is and how does Filecoin work? Is this type of system sustainable? Well, this and more you will know below.
Get started on Bit2Me and jump into the world of cryptocurrencies with a head start. Register easily and get €15 FREE on your first purchase with this link. Don't wait any longer to join the crypto revolution! Join Now
History and origin of Filecoin (FIL)
To understand the origin of Filecoin, we must go back to one of the greatest needs of the computing world: distributed storage. Digital information, unlike written information, has always had risk: accidental or malicious loss of that information.
In that sense, one of the largest fields of research in the world of information technology and computing has always been the creation of secure, redundant and distributed storage systems. However, the lack of computing power, technologies and the cost of development, held back in many ways the implementation of these systems.
Today, most of these problems are a thing of the past. The creation of the Internet and its growth for more than 30 years, the evolution of integrated systems, the greater computational power and the low cost of storage media has led us to have all the necessary tools for the creation of true storage systems of decentralized information.
The Birth of Napster
At this point you may be surprised to learn that the first system of this type was Napster, in 1999. Napster was an application P2P, which allowed you to access music files found on other computers running said software. In simpler words, Napster was a great distributed storage system. One to which users could access to upload or download the music that was distributed in said network. In this way, the music could always be available on the network, since, if someone deleted the information, it could still be available in another location that had said file.
In this sense, Napster was quite a revolution, one that put the record labels against the wall, generating multimillion-dollar losses. This made the music industry understand the need to embrace Internet technology and streaming to survive the digital evolution. But Napster was only the beginning, programs like eDonkey, Bittorrent, Kazaam, Ares, Frostwire, DC ++ each and every one of them, had the ability to create huge networks to distribute data around the world without intermediaries. In fact, systems like eDonkey (created by Jed McCaleb, the creator of Stellar) and BitTorrent became the mecca of P2P file sharing worldwide.
This however was just the beginning of a revolution that would soon turn the world of data storage upside down.
Freenet, the first P2P web storage system
With the birth of Napster, the P2P boom for data sharing began. Out of nowhere, several projects were born that sought to exploit the great ability to distribute data over this type of network. One of those projects is freenet, a project that was born in March 2000. The objective of Freenet is to create a P2P network free of censorship, with the capacity to deploy services, web pages with privacy protection and being completely anonymous.
Freenet is a Tor-type project. In fact, Freenet is the first "darknet" created with this type of technology, since Tor and I2P are later (2002 and 2003, respectively). In any case, Freenet has an interesting functionality capable of allowing its users to store data in a decentralized way, with handling of permissions and fine access control. At present, this project is still active, and its community is one of the largest and most loyal to the system.
IPFS, a distributed file system
Despite the huge leap that networks like Freenet, I2P and Tor made to distributed storage technology, it was obvious that these systems still had some weak spots. First, they are complex to configure, access control is limited and not modular, in order to allow this storage capacity to be linked with existing projects and systems in a simple way.
Overcoming these problems is the approach behind the project IPFS or InterPlanetary File System, designed by Juan Benet in February 2015. IPFS seeks to create a modular system capable of creating a file system, with decentralized operation using technologies such as DHT (Distributed Hash Table) and DAG (Directed Acyclic Graph). Thanks to these technologies, IPFS is able to function as any file system (such as Windows NTFS or GNU / Linux ext4).
We can say then that IPFS is the conclusion of a technology that has been evolving since 1999, and that is now available to everyone.
The birth of Filecoin
Now you ask yourself, how does all this fit with the development of Filecoin (FIL)? Unlike Siacoin, IPFS is a storage system that works without incentives. Users altruistically store chunks of files from other users. That doesn't scale. Siacoin solved all of this, and it's what IPFS relied on so as not to be left behind.
Basically, Juan Benet and the team behind IPFS copied the incentive model behind Siacoin, adding a token, which they also used to finance themselves through an ICO. In this way, users could access said storage by paying a small fee for it. And all of this would be paid with the platform's native token, the FIL token.
Benet's idea was presented in July 2017 with the release of his white paper. And, by August 2017, after a ICO (Initial Coin Offering) which lasted a few minutes, Benet was able to raise more than $ 200 million for his project. With this, the financial financing of Filecoin and its development was more than assured.
How does Filecoin (FIL) work?
Filecoin's operation relies on a number of unique innovations designed for this network. His whitepaper in that sense is quite clear and, he lets us see, the key pieces in the operation of this network. In this sense we can mention:
DSN or Decentralized Storage Network
The DSN or Decentralized Storage Network, is a network of nodes that run the Filecoin software and thus are able to add storage space to the Filecoin network. The system is completely autonomous in its coordination thanks to the Filecoin connection protocol, which turns this network into a huge decentralized storage network.
The system that controls the entire network is resistant to Byzantine failures and messages are sent using the Gossip protocol, but a little modified. The idea is that the network is resistant, self-healing, efficient in data transmission and above all secure. In fact, the messages handled by the network protocol can be divided into three types:
- put: a message that allows access to the system and with which data can be handled. In this way, clients running the Put protocol can store data under a unique identifier key.
- Get: this message allows clients to retrieve the data that is stored within the network by providing the key to access it.
- Manage: this message of the protocol allows to control the available storage, to audit the service offered by the providers and to repair possible failures in the data.
It is in this way that the network can share messages with each other and manage the data and its access at all times. Of course this is only part of how DSN works. Another of the main functions is to maintain the failsafe and data integrity mechanisms.
In this case, DSN maintains a series of Byzantine Agreements (BA) that guarantee at all times that access to the data will be possible in almost any network condition. For example, if a 1000-node Filecoin network is hacked by an attack, taking 50% of its nodes offline, access calls from the network can be routed in such a way that the network partition can be circumvented and access data seamlessly. This is an extreme case of network attack, something that we can hardly see in reality, but that gives a clear message: Filecoin is a secure and fault resistant network.
Another function of the DSN is to maintain the integrity of the data. For this, DSN automatically assigns a series of algorithms that ensure that the integrity of the data can be guaranteed. The use of SHA-256 hashes and CRC32 functions allow this task to be carried out in the most optimal way possible.
Proof of Replication and Proof of Spacetime, Filecoin's security pillars
Another major innovation in Filecoin (FIL) is consensus protocols Proof of Replication y Proof of Spacetime (PoSt). Both protocols are a replacement for the known Proof of Storage, with which many of its functions are shared.
Proof of Storage, the genesis of Filecoin consensus protocols
But before we get into Proof of Replication and Proof of Spacetime, let's examine how its predecessor, Proof of Storage (PoStge) works. Proof of Storage (PoStge) is a system that allows users to check at all times that a contracted space is really available and is being used by user data.
The idea is to allow the user to quickly and easily verify that their data is really stored and that it will not be lost or deleted. To achieve this, PoStge generates a series of cryptographic and probabilistic tests that respond to a challenge / response scheme that uses user data to generate a valid test.
Put more simply, Proof of Storage does the following:
- The user sends the data to the network and the nodes store this information.
- If the user wants to verify the data, send a request verification of data (Proof of Storage). In this request there is a cryptographic and probabilistic challenge that must be solved by the network. Basically what the network is told is: if you take these certain blocks of data that it sends you (selected randomly), and you generate the cryptographic proof, you will get the answer to my challenge.
- The network only receives the pointers of the data blocks, and the cryptographic challenge, with that data, the nodes where the user information is stored, will begin to take the data blocks, do the cryptographic test and obtain the response to the challenge. The answer will only be correct if the node actually has the user's information stored, thus demonstrating that the data is actually stored.
This scheme used by Proof of Storage allows to maintain the security that the data is on the network, but at the same time, it allows to avoid Sybil attacks (with nodes reflecting false duplicate identities), outsourced attacks (preventing nodes from being able to store more information than they can actually handle) and build attacks (avoiding another means of manipulating the amount of data actually stored). The usefulness of this distributed storage system is undeniable, but Filecoin has gone one step further, by designing its own protocols.
Proof of Replication (PoRep), an alternate version of Proof of Storage
Proof of Replication (PoRep) is a derivative of Proof of Storage, but which aims to: allow a server to convince a user that some data has been replicated on its own storage. In this way, the user can be sure that their data has an exact replica of their data within the network.
PoRep's testing scheme follows the same as Proof of Storage, except that PoRep makes use of more advanced cryptographic functions such as ZK-snarks. The use of this type of test has a double objective: to be extremely private and secure, in addition to being very efficient in size and computational execution.
Proof of Spacetime (PoSt), ensuring data over time
One point that Proof of Storage and Proof of Replication do not address is checking data for specified periods of time. To solve this problem, Filecoin has Proof of Spacetime (PoSt).
The idea is to make nodes and users capable of creating temporary proofs of data stored on the network, without requiring high bandwidth usage. In this way, for example, a user who has rented storage space for a year, can, throughout that time, receive cryptographic evidence that attests that their data in that time has not been altered or deleted.
To achieve this, nodes using Proof of Spacetime perform a sequential cryptographic storage test in a specified period of time. This, in order to guarantee that the data remains within the system. For this, the user sends a request for Proof of Spacetime, and the network replies using a cumulative series of Proof of Replication, along with a specific cryptographic challenge at a given time. By adding these tests, a unique cryptographic mark is obtained for each time iteration, which serves as a temporary test that the data is actually stored.
To see this in a simpler way imagine the following:
You store 100GB of data in Filecoin for a period of one year. In the storage contract you have added that every month the system will send you the corresponding Proof of Replication and Proof of Spacetime. When the first month arrives, the first couple of tests are sent to you, and everything goes well. But the arrival of the second month is when Proof of Spacetime shows its power.
In that second month, the node sends you the Proof of Replication with its respective challenge / response test. But in the case of Proof of Spacetime this changes, since the node will take both Proof of Replication (from the first and second month), it will take the cryptographic challenge imposed by the system and the time interval to correctly answer the challenge test / response from that protocol.
The answer will only be correct if the previous Proof of Replications are regenerated correctly, applying the Proof of Spacetime corresponding to their period, and thereby proving that no part of the data has been deleted.
Click here to open your user account in Spanish for FREE and securely and receive a €15 gift.
The test becomes more complex as more time passes, because the blocks used for the generation of these tests are random, and the elimination of a part of the data could be easily detected with this system.
Smart contracts in Filecoin
Filecoin is a network with the ability to run smart contracts And indeed, these are the heart of the payments and rewards system for Filecoin users and miners. Each smart contract in Filecoin can be viewed as a program that allows you to spend tokens, request data storage / retrieval in the markets, and validate storage tests, and more.
All these interactions take place on the blockchain, so they can be publicly audited, guaranteeing the security of this system. However, two points should be emphasized:
Filecoin has pre-defined template contracts for the aforementioned actions. For example, a storage rental agreement is already predefined on the network and can be used without major problems directly with the Filecoin software. There is the possibility of creating custom contracts tailored to specific needs.
Among the types of contracts that we can see in Filecoin we can describe:
- Archiving contracts: We allow users to program the conditions for which they offer or provide storage services.
- Hiring miners: clients can specify in advance the miners offering the service without participating in the market
- Payment strategies: clients can design different reward strategies for miners, for example, one contract can pay the miner in an incremental way over time, another contract can set the price of storage reported by a trusted oracle
- Ticketing services: a contract could allow a miner to deposit tokens and pay for storage / retrieval on behalf of its users
- More complex operations: customers can create contracts that allow data updating.
The mechanism in charge of executing these smart contracts is known as Filecoin Virtual Machine (FVM), and the programming of these smart contracts is given in Go language. This makes it very easy to program smart contracts in Filecoin and, in fact, it has another advantage, which is that the code of these smart contracts can be executed using threads, accelerating their computational execution.
Gas in Filecoin
As Ethereum, Filecoin uses the concept of Gas for the payment of fees within the network. However, the system used for this is completely different. First of all, Filecoin has a value called BaseFee, a small commission that is burned on each transaction within the network. This has been created in order to prevent miners from manipulating commissions. In addition, it also serves to prevent spam attacks.
Another value created is that of GasPremium, which indicates the priority rate that senders include to encourage miners to choose the most profitable transactions. In other words, if the sender of a message wants their message to be included more quickly, they can set a higher GasPremium.
So then we have the following concepts and values of Gas within Filecoin:
- GasUsed is a measure of the amount of resources (or units of gas) consumed to execute a transaction. Each unit of gas is measured in attoFIL and therefore GasUsed is a number that represents the units of energy consumed.
- BaseFee is the set price per unit of gas (measured in attoFIL / unit of gas) that will be burned (sent to an unrecoverable address) for each message run. The BaseFee value is dynamic and adjusts based on network congestion parameters.
- GasLimit is measured in units of gas and is set by the issuer of the transaction. It places a hard limit on the amount of gas (that is, the number of units of gas) that the execution of a message must consume in a chain.
- GasFeeCap is the maximum price that the sender of the message is willing to pay per unit of gas (measured in attoFIL / unit of gas). Along with the GasLimit, the GasFeeCap sets the maximum amount of FIL that a sender will pay for a transaction: a sender is guaranteed that a transaction will never cost more than: GasLimit * GasFeeCap.
- GasPremium is the price per unit of gas (measured in attoFIL/gas) that the sender of the message is willing to pay (in addition to the BaseFee) to "give an additional tip" to the miner who will include this message in a block. Miners in Filecoin
Filecoin miners
Filecoin has a blockchain system that allows managing the economic, contract and payment system of the network. In that sense, Filecoin has miners who work in order to generate blocks, maintain consensus and network security, and execute smart contracts.
In Filecoin to mine, we bet more on storage space than on available computational power. Thus we have that in Filecoin there are several types of miners:
- Storage, responsible for storing files and data on the network.
- Recovery, responsible for providing quick ways to recover files.
- Repair, an option that is about to be implemented on the network.
Storage miners are the heart of the network. These earn FIL tokens by storing data for clients and calculating cryptographic evidence to verify storage over time. The probability of winning the block reward and transaction fees is proportional to the amount of storage the miner brings to the Filecoin network, and not to the hashing power.
On the other hand, recovery miners are the veins of the network. These earn FIL tokens and mining fees for a particular file, which are determined by the market value of the size of that file. The bandwidth of a recovery miner and the initial response time of offers (that is, latency and proximity to clients) will determine its ability to close recovery offers on the network. The maximum bandwidth of a recovery miner will set the total number of deals it can make.
In any case, the mining work seeks to generate a new block every 2 minutes within the network, and the rewards are adjusted according to the level of participation of the miners, although on average, about 310.000 FIL tokens are generated daily. Likewise, the total number of FIL tokens that will exist in the network is 2.000.000.000 tokens, being a deflationary cut network with an emission limit. Currently, there are some 68 million FIL tokens in circulation.
Filecoin use cases
The main use case for Filecoin comes as a data storage and backup system. Think about it for a moment, what better place to keep your critical data than a distributed storage network built to withstand disasters such as a loss of connection in up to 50% of its nodes?
In this case, Filecoin offers capabilities that other systems do not offer, especially the fact that it is decentralized. Thus, for example, you can avoid that the destination of your private data, is the elimination of the same. Either due to a simple accident (like the one that happened at OVH recently), or because some country raises an order to intervene a storage platform (as happened with Megaupload). In these cases, Filecoin gives you peace of mind: there is no way those scenarios will happen in Filecoin.
Along with this, Filecoin is a system capable of integrating with applications, games and more. What offers developers greater flexibility to have storage space in better conditions and with respect to privacy.
A good example of the latter can be seen with Powergate. This is a platform capable of using the potential of IPFS and Filecoin to allow the integration of these services in desktop and web applications. And this is just the beginning of a technology that is just showing the enormous potential it has to give to the world.
Get started on Bit2Me and jump into the world of cryptocurrencies with a head start. Register easily and get €15 FREE on your first purchase with this link. Don't wait any longer to join the crypto revolution! Join Now