## 2 Blockchain-Based Data Storage Methods: On-Chain, Off-Chain, and Hybrid Approaches
### Off-Chain Data Storage Methods
#### 2.2.2 Decentralized Systems (P2P)  
Decentralized systems align with the core philosophy of blockchain technology by ensuring that data are stored across multiple nodes rather than relying on a central authority. These peer-to-peer (P2P)-based systems eliminate dependency on a centralized entity and enhance data security through user participation. * _Off-chain Data Storage with IPFS_: The InterPlanetary File System (IPFS) is a content-addressable data storage protocol that operates on a decentralized network. Data are addressed based on its content and is shared across all nodes in the network. It provides a low-cost and secure data storage solution. However, data availability depends on the active participation of network users. More specifically, IPFS offers a decentralized file storage system that addresses blockchain scalability challenges. Storing large datasets directly on-chain is often costly and inefficient. To mitigate this issue, IPFS enables off-chain storage by maintaining data separately from the \begin{table}
\begin{tabular}{p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline \hline
**Data Storage Environment** & **Storage Mechanism** & **Description** & **Advantages** & **Disadvantages** & **Examples** \\ \hline \multirow{9}{*}{Decentralized Systems (P2P)} & IPFS [78; 86] & Content-based data storage system in a distributed network & Decentralized, low cost & Data continuity depends on user participation. & IPFS \\ \cline{2-6}  & Filecoin [75; 76] & Blockchain-based data storage and incentive mechanism built on IPFS & Strong data continuity with incentive model & High transaction costs & Filecoin \\ \cline{2-6}  & Swarm [87] & Ethereum-based P2P data storage protocol with Ethereum & Flexible and compatible with Ethereum & Performance limitations may exist & Swarm protocol \\ \cline{2-6}  & Storj [79] & Blockchain integrated P2P storage solution. & Strong security and incentive model & Difficulty in coordination between users & Storj network \\ \cline{2-6}  & Sia [80] & Blockchain-based P2P data storage platform. & Low cost, supports data encryption & The scalability of the marketplace may be limited & Siacoin \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._blockchain while storing only hash values on-chain. This approach ensures data integrity while significantly reducing storage costs [10; 48; 78]. Figure 4 illustrates the working mechanism of IPFS. Each data fragment is assigned a unique cryptographic hash, which is used to retrieve the data. This mechanism guarantees data authenticity and immutability while allowing for transparent and verifiable data access. Unlike traditional centralized storage solutions, IPFS distributes data across multiple nodes, ensuring persistent accessibility without reliance on a single server [10; 78]. IPFS has significant applications in industries handling sensitive data, such as healthcare. Specifically, it enhances security, privacy, and traceability of patient records. In blockchain-integrated IPFS, data are fragmented and encrypted, providing higher levels of security and confidentiality. This structure not only protects sensitive healthcare data but also offers a robust defense against potential data breaches [48]. Additionally, IPFS's cost-efficient model enables the affordable storage of large datasets, making it a viable solution for industries requiring secure and scalable data management. * _Off-chain Data Storage with Filecoin_: Filecoin is a blockchain-based storage solution that utilizes the IPFS infrastructure to facilitate off-chain data storage. In this system, data contracts are stored on the blockchain, while the actual data are distributed across the IPFS network. Filecoin offers a decentralized architecture while ensuring verifiability of stored data. However, high transaction costs remain a limitation, as users must pay fees for data storage operations on the network.