project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Filecoin App

ProofAnchor: A decentralized app leveraging Filecoin blockchain for proof of document existence, enabling users to verify document integrity by storing its hash on the blockchain, with Filecoin integration for additional proof and storage layers. #Blockchain #Filecoin

Filecoin App

Created At

ETHOnline 2023

Project Description

ProofAnchor is a cutting-edge application that leverages the inherent features of blockchain technology to provide indisputable proof of existence for documents. It uses the capabilities of Filecoin to create an ecosystem where users can securely and verifiably timestamp their documents, essentially anchoring data in a way that certifies its authenticity and timestamp.

Here's a detailed breakdown of how ProofAnchor works and its features:

Integration with MetaMask: The application integrates with MetaMask, a popular Ethereum wallet, to allow users to interact with the Filecoin blockchain. This feature is crucial because it provides the user interface for blockchain interactions, managing Filecoin accounts, and signing transactions.

File Upload and Hashing: Users can upload files through a user-friendly interface. Upon upload, the application generates a SHA-256 hash of the file, providing a unique fingerprint. This hash is crucial as it's used for the document's identification and verification without keeping the actual file on the blockchain, ensuring privacy and security.

Storing Proof on Blockchain:

Upon generating the hash, the user can then call the storeProof function. This function interacts with a smart contract deployed on the Filecoin blockchain. Instead of storing the whole file, it saves the document's unique hash, timestamping it on the blockchain. This method ensures that any future changes to the document would result in a different hash, highlighting any tampering or revisions. The actual file doesn't get stored on the Filecoin blockchain. Instead, ProofAnchor uses Filecoin as a storage solution, taking advantage of its efficiency and cost-effectiveness for large data storage. This approach keeps the Filecoin blockchain lean, while still providing a way to retrieve the actual files if necessary. Retrieving Proof of Existence: With the getProof function, users can verify the existence of a document at a certain point in time. By providing the file's hash, the function checks the blockchain for the corresponding proof and returns the timestamp from when the document's hash was anchored into the blockchain. This feature is crucial for various use cases, including legal processes, intellectual property protection, and historical data preservation.

Decentralization and Immutability: By using blockchain technology, ProofAnchor benefits from decentralization and immutability. No single entity controls the data, and once the proof of existence is stored on the blockchain, it cannot be altered or erased. This security is paramount for scenarios where indisputable proof is required.

Front-End Interface and Backend Logic: The application boasts a clean user interface that allows for file uploads and interactions with the blockchain. The backend, built with Express.js, handles file uploads and the hashing logic. The use of smart contracts allows for transparent, auditable, and automated execution of blockchain interactions.

In summary, ProofAnchor provides a secure, decentralized platform for verifying the authenticity and existence of any document by leveraging the strength of the Filecoin blockchain. Whether for legal documents, creative works, or any data requiring proof of existence, ProofAnchor offers a solution that ensures peace of mind, accountability, and transparency.

How it's Made

In building ProofAnchor, we ventured to create a robust, secure, and efficient system that leverages the immutability and security of blockchain technology for document verification. This project harnessed a variety of technologies, each playing a critical role in the system's overall functionality.

First, we started with the Ethereum blockchain. We chose this because of its advanced smart contract capabilities and its compatibility with Filecoin through the Filecoin-Ethereum bridge. We wrote our smart contracts in Solidity because of its clear syntax and features optimized for the Ethereum Virtual Machine (EVM). These contracts handle the core logic for storing proofs of document existence, ensuring that once a document's proof is stored, it's practically immutable and verifiable by any party.

For our development environment, we used the Remix IDE due to its powerful tools for writing and deploying smart contracts. It simplified much of the testing and deploying phase, and we could easily connect it to the Filecoin blockchain, which supports EVM. The integration with Filecoin is a crucial aspect as it broadens the storage capabilities, ensuring that our application is not just limited to transactional proofs but can also store larger sets of data securely in a decentralized storage network.

On the server side, we used Express.js, a fast, unopinionated, minimalist web framework for Node.js, which allowed us to set up our server functionalities efficiently. It handles our file uploads and interacts with the blockchain to store the subsequent proofs.

One of the key aspects of our project is the use of the web3 library, a collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket. We used it to connect to the user's MetaMask wallet, simplifying Ethereum transactions and interactions with our smart contract.

In terms of handling file uploads, we relied on Multer because it provided the necessary functionality for file handling in Express. We combined this with crypto to generate a SHA-256 hash of each uploaded file, ensuring its uniqueness and integrity, which is what we actually store on the blockchain.

For the frontend, plain HTML, CSS, and JavaScript were sufficient to create a user-friendly interface. The form handling and subsequent interaction with the Express server are straightforward, ensuring users can easily upload files and retrieve stored information.

One particularly 'hacky' thing we did involves storing the document hash. Instead of storing a file directly on the blockchain, which can be very costly, we generate a cryptographic hash of the file. Only this hash is stored on the blockchain, serving as incontrovertible proof of the file's existence without the need to store the file itself, cutting down on costs and storage requirements. This method is incredibly effective because any change to the file would result in a completely different hash, verifying the file's integrity at the time of upload.

Partner technologies, especially the integration with Filecoin, significantly enhanced our project's storage capabilities, allowing for a decentralized, secure, and robust storage solution beyond what Ethereum alone could provide. This partnership ensures users have confidence in the immutability and longevity of their document proofs.

The entire system operates seamlessly, providing a user-friendly way for users to verify the existence of their documents on the blockchain, while we ensure everything behind the scenes is secure, cost-effective, and reliable.

background image mobile

Join the mailing list

Get the latest news and updates