Codex Storage vs Filecoin: Enhancing Durability for Decentralised Storage

Codex Storage vs Filecoin: Enhancing Durability for Decentralised Storage

As the demand for resilient, censorship-resistant data storage continues to grow, decentralised storage networks (DSNs) have become an increasingly vital part of the digital infrastructure. 

These systems distribute data across a network of independent nodes, reducing reliance on centralised providers and enhancing fault tolerance.

Among the early innovators in this space is Filecoin, a well-established DSN that operates a public storage marketplace built on top of the InterPlanetary File System (IPFS)

While closely related, Filecoin and IPFS are distinct yet complementary protocols, both developed by Protocol Labs. IPFS enables the peer-to-peer exchange of verifiable data, whereas Filecoin introduces a mechanism for incentivised, persistent storage.

Codex Storage introduces an expanded approach with its Decentralised Durability Engine (DDE). This architecture builds on the initial concept of a DSN by introducing powerful reliability and durability features, as well as an open marketplace for storage and retrieval.

Designed to serve diverse use cases, from decentralised applications (dapps) and long-term data archiving to content delivery, Codex aims to offer a robust, censorship-resistant alternative to traditional cloud storage platforms.

In this article, we explore and compare the core features, technical underpinnings, and practical implementations of Filecoin and Codex, highlighting how each protocol approaches the challenge of decentralised storage.

DSN Protocol Designs and Durability

Filecoin defines a DSN as a system in which clients store and retrieve data under unique identifiers, while the network manages storage allocation, audits providers, and repairs faults. 

However, while both Filecoin and Codex include mechanisms to ensure the durability of data stored on their respective DSNs, they take different approaches to solving this challenge. Filecoin’s approach to durability centres around replication, storing multiple copies of files to deliver a configurable measure of redundancy.

Codex Storage addresses these gaps through its Decentralised Durability Engine (DDE), which integrates redundancy mechanisms (such as erasure coding and replication), remote auditing protocols, repair incentives, and strategic data dispersal. 

The aim behind Codex’s approach to distributed storage is to create a more durable and fault-tolerant storage system that can be rigorously verified.

For example, Codex uses erasure coding to improve redundancy through parity data–a method more storage-efficient than simple replication that can be used to scale the network to accommodate large file sizes while remaining resilient to data loss. Additionally, the protocol leverages incentivised repair mechanisms and strategic data dispersal to create a multi-faceted approach to durability. 

Filecoin relies on the replication of data together with storage provider-operated solutions such as ZFS snapshots to maintain the durability of data on its network.

Codex also leverages blockchain technology to publish publicly verifiable proofs, meaning that verifiers are the public blockchain nodes themselves. The protocol uses both off-chain and on-chain components to ensure the durability and resilience of data stored on the distributed network.

For a full breakdown of the Codex protocol, read the whitepaper

Storage Provision and Data Retrieval Marketplaces

Filecoin operates dual markets for storage and retrieval. Clients pay storage miners, while retrieval miners earn fees for data delivery. The network facilitates transactions and ensures storage providers are rewarded, but participation often involves manual onboarding processes, particularly for Filecoin Plus, which requires human-based KYC verification.

Codex employs free-market-style contracts for distributed storage, where pricing is determined in real-time based on an operator’s costs associated with storing the data and implementing the appropriate repair mechanisms. Once retrieval incentives are implemented on the network, these will also be a factor in determining streaming retrieval cost.

When it comes to data retrieval, Filecoin supports two methods: direct retrieval and hot data retrieval from IPFS through a service provider. 

In the first instance, clients can request data directly from storage providers for a small fee, which they pay in FIL tokens to the storage provider. 

As most Filecoin nodes are also IPFS nodes, stored data can also be retrieved via IPFS if an available node is willing to serve the content. This is facilitated through services like Storacha, which is a decentralised hot storage network built on top of IPFS and Filecoin. Storacha provides 5GB of free hot storage at no cost and charges a monthly fee for data storage above this amount.

Codex, on the other hand, aims to offer a permissionless storage retrieval marketplace that allows clients to send out storage requests, receive offers from providers, and establish contracts. The fees related to this retrieval mechanism will be based on real-time free-market pricing negotiated between storage providers and users on the network.

The early iteration of this marketplace is currently being improved to reduce interaction complexity and introduce built-in repair incentives, ensuring a more seamless and reliable storage process. Unlike Filecoin, Codex prioritises automatic redundancy and durability through its integrated repair mechanisms.

Read more about the new design for the Codex data retrieval marketplace.

Tokenomics - FIL and CDX

FIL is the native currency and utility token of the Filecoin network. It is used to pay for storage and data retrieval, and it can be earned by storage providers for providing reliable storage services to the network. 

The token is issued and transacted on Filecoin’s own blockchain, which is tightly coupled with its data storage and retrieval systems.

The CDX testnet token will be used for payments, collateral, and security mechanisms on the incentivised testnet. The Codex DDE is linked to the Ethereum network, where it published public storage proofs for public verification, and its incentivisation token will also operate on this network. 

Under Codex’s proposed tokenomics model for the incentivised testnet, storage providers must post CDX testnet tokens as collateral, which are slashed if they fail to meet their obligations. 

This ensures that economic incentives align with network reliability. Validators also participate by marking proofs as missed and earning rewards for maintaining data integrity.

Comparing the User Experience

Using Filecoin to store and retrieve data

Storing data on Filecoin is achieved by creating a Filecoin Deal, a contract between you (the uploader) and a Filecoin storage provider to store your file for a given period in exchange for FIL tokens.

Filecoin storage providers include the likes of Lighthouse and Storacha, each of which offers a basic free plan that includes 5GB of storage as well as a selection of paid plans for users who require greater storage capacity.

Once you have created an account with a storage provider and have an API key, you can store data on the Filecoin network. This can be done using the SDK or CLI tools provided, which help you to create a Filecoin deal, query its status, and ensure the file is stored and accessible.

Once your file is stored, you can retrieve a Proof of Data Segment Inclusion (PoDSI), which allows you to verify the correct aggregation of your data and prove to third parties it is stored in its proper form on the network. The PoDSI can be retrieved via a simple terminal command.

Files uploaded to Filecoin through a service provider generate a Content Identifier (CID), which identifies the file stored on the network. This can be used to retrieve the file using a command or the appropriate tool through the service provider’s SDK or interface.

Using Codex to store and retrieve data

Currently, Codex Storage is in alpha and operating on an unincentivised testnet. This means incentive systems and the CDX testnet token are not yet implemented on the network, and the marketplace for storage data and retrieval is not yet active.

Participants in the testnet run nodes in Altruistic Mode, facilitating the distribution of data stored on the network and allowing peers to exchange data without charging any fees.The Codex Storage CLI offers a simple interface from which you can install Codex, run a node, and upload or download files to the distributed storage network.

Once your Codex Storage client is installed, you can use the CLI to upload a file directly to the network by simply following the prompts and specifying the path of the file you would like to upload along with the required command.

Files successfully uploaded to the Codex testnet will generate a corresponding CID, which you can share and use to download the related file from the network through commands in the CLI application.

For a step-by-step guide on how to install the Codex client and interact with the Codex testnet, read our tutorial blog post.

The process for downloading and uploading files to the Codex testnet is currently unincentivised and there are no costs to these actions, making the process relatively straightforward. 

As Codex progresses on its roadmap, it aims to integrate the CDX testnet token and marketplace in a way that makes using the network as streamlined as possible.

Codex is Designed for Durability and Resilience

This brief overview of the Codex and Filecoin protocols demonstrates that while Filecoin is a well-established player in the decentralised storage space, Codex introduces significant advancements through its durability-focused design. 

The DDE model provides structured redundancy, verifiable proofs, and integrated repair incentives, aiming for comprehensive long-term resilience. 

As both networks evolve, focusing on durability, scalability, and economic viability will be key to shaping the future of decentralised storage that can accommodate the demands of fast-growing industries such as AI and IoT.

The Codex testnet is now live, and interested users can download the client and operate a node to play their part in defending against censorship and help secure a future of fair and durable data. 

Want to get involved? Here’s how to get started:

  • Join our Discord to connect with the community and Codex tpandaeam, ask questions, and stay updated.
  • Try out the testnet and play your part in the decentralised storage revolution.
  • Share your feedback to help us refine and improve Codex. Your insights are invaluable in shaping the future of decentralised storage.

Follow us on social media, join our Discord, and subscribe to our newsletter to get the latest updates from Codex.