> For the complete documentation index, see [llms.txt](https://delnorte-terra-vision.gitbook.io/delnorte-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://delnorte-terra-vision.gitbook.io/delnorte-docs/notary-proof-of-existence-on-blockchain/blockchain-as-a-notary-system.md).

# Blockchain as a Notary System

* Blockchain serves as an **independent notary system** by recording transactions in a decentralized manner across numerous machines. This means that once a transaction is recorded on the blockchain, it is virtually tamper-proof and will be stored indefinitely. A well-known example of this is **Eternity Wall**, a project that demonstrates how blockchain can be used to record data such as personal messages or images permanently.

**Proof of Existence:**

* **Proof of existence** is a closely related concept. It involves storing a **hash of a document** on the blockchain to prove that the document existed at a certain point in time. By hashing the document, a cryptographic signature is created that can be verified on the blockchain. This process does not store the entire document but a unique fingerprint of it, making it feasible even with the limited storage capacity of most blockchains.
* **Bitcoin as an Example**: A practical implementation of proof of existence is seen in Bitcoin, where a document's hash can be embedded in a Bitcoin transaction. This ensures that the document’s existence at the time of the transaction is verifiable. However, because blockchain is not suited for storing large files, only the hash of the document is stored, making it a secure and efficient method for proof of existence without burdening the blockchain’s storage capacity.

**Challenges and Solutions for Document Storage:**

* Storing entire documents on the blockchain can be **memory-intensive**, which is why only the document’s **hash** (a digital fingerprint) is stored. However, by **partitioning the storage** and leveraging a subnet within the blockchain network, the blockchain can scale to accommodate larger documents or files.
* One solution to this issue is the use of **sidechains** or **Layer 2 solutions**, which are secondary blockchains connected to the main chain. These can store larger files and interact with the main chain for verification purposes, providing a more scalable system for document storage while maintaining security and decentralization.

**Smart Contracts and Blockchain for Legal Agreements:**

* Blockchain's inherent structure, which records inputs and outputs in a transaction, creates a natural environment for **smart contracts**. A **smart contract** is essentially a self-executing contract where the terms of the agreement are written directly into code. When certain conditions are met, the contract is executed automatically.
* This concept of **document transference** allows for not only the creation of legal documents but also the transfer of roles or ownership. For example, transferring the role of **owner** in a document or contract can be facilitated via blockchain transactions, similar to the way digital assets like cryptocurrencies are transferred.

**Escrow and Blockchain Transactions:**

* Blockchain can also be used for **escrow** services. In this case, a blockchain transaction could be set up where funds are held until specific conditions are met (e.g., a buyer paying for goods). The contract logic ensures that if the conditions are not met, the funds are returned, providing an automated, trustless mechanism for the parties involved.
* Smart contracts can also be used to securely **verify document existence** and the terms of an agreement. For example, when two parties sign a contract, the details of the contract can be encrypted and stored on the blockchain. If necessary, the document can be verified later to confirm its contents and ensure its authenticity, providing **auditability** and **traceability** of legal documents.
