Version 1.0
May 2025
The Decentralized Hash Registry (DEHR) is a smart contract protocol deployed on the Optimism network that provides immutable, timestamped proof of document existence and ownership. By combining cryptographic hashing with blockchain transparency, DEHR creates a decentralized notarization system that links document integrity to verified registrant identities. This whitepaper outlines the technical architecture, security model, and practical applications of DEHR as a foundational infrastructure for digital document attestation.
Traditional document verification systems suffer from several critical limitations:
- Centralized Control: Reliance on trusted third parties creates single points of failure
- Lack of Transparency: Verification processes are often opaque and non-auditable
- High Costs: Traditional notarization and verification services incur significant fees
- Limited Accessibility: Geographic and temporal constraints restrict access to verification services
- Identity Dissociation: Document proofs lack verifiable links to registrant identities
DEHR addresses these challenges through a decentralized registry that:
- Provides immutable proof of existence for any digital document
- Links registrations to verified registrant identities through wallet registration
- Operates transparently on public blockchain infrastructure
- Eliminates intermediaries while maintaining cryptographic security
- Offers global accessibility with 24/7 availability
DEHR implements a two-tier registration model:
struct Registrant {
string name;
uint256 registrationTimestamp;
bool isActive;
}
mapping(address => Registrant) private registrants;
Wallet Registration Requirements:
- Unique registrant name (non-empty string)
- One-time registration per wallet address
- Immutable association between wallet and registrant identity
The registry maps SHA-256 file hashes to comprehensive registration metadata:
struct Registration {
address registrant;
string registrantName;
string filename;
uint256 timestamp;
}
mapping(bytes32 => Registration) private registry;
DEHR maintains several data structures for efficient querying:
- Primary Registry: Hash-to-registration mapping
- User Enumeration: Per-user hash collections for portfolio management
- Global Enumeration: Complete hash inventory for ecosystem analytics
The contract emits structured events for off-chain indexing and real-time monitoring:
event HashRegistered(
bytes32 indexed fileHash,
address indexed registrant,
string indexed registrantName,
string filename,
uint256 timestamp
);
event RegistrantRegistered(
address indexed wallet,
string indexed registrantName,
uint256 timestamp
);
DEHR implements a permissioned registration model where:
- Only registered wallets can register document hashes
- Wallet registration is a prerequisite for all hash operations
- Each wallet maintains a unique, immutable registrant identity
All state-changing functions utilize OpenZeppelin's ReentrancyGuard
:
function registerHash(
bytes32 fileHash,
string calldata filename
) external nonReentrant onlyRegisteredWallet {
// Protected state changes
}
Comprehensive validation prevents malformed registrations:
- Hash Validation: Rejects zero hashes (
bytes32(0)
) - Filename Validation: Requires non-empty filename strings
- Duplicate Prevention: Blocks re-registration of existing hashes
- Name Validation: Ensures registrant names are non-empty
Once registered, hash-to-registrant associations are permanent and cannot be modified, ensuring data integrity over time.
sequenceDiagram
participant User as User Wallet
participant DEHR as DEHR Contract
User->>DEHR: registerWallet("John Doe")
DEHR->>DEHR: Validate name & wallet status
DEHR->>DEHR: Store registrant mapping
DEHR->>User: Emit RegistrantRegistered event
sequenceDiagram
participant User as Registered User
participant DEHR as DEHR Contract
User->>User: Generate SHA-256 hash off-chain
User->>DEHR: registerHash(hash, "document.pdf")
DEHR->>DEHR: Verify wallet registration
DEHR->>DEHR: Validate hash uniqueness
DEHR->>DEHR: Store registration with timestamp
DEHR->>User: Emit HashRegistered event
sequenceDiagram
participant Verifier as Anyone
participant DEHR as DEHR Contract
Verifier->>DEHR: isRegistered(hash)
DEHR->>Verifier: Returns boolean
Verifier->>DEHR: getRegistration(hash)
DEHR->>Verifier: Returns (registrant, name, filename, timestamp)
Deployment on Optimism provides:
- Reduced Gas Costs: ~10-100x lower than Ethereum mainnet
- Faster Confirmations: Sub-second transaction finality
- Ethereum Security: Inherits Ethereum's battle-tested security model
- Packed Structs: Optimized storage layout minimizes storage slots
- Minimal State Changes: Single storage write per registration
- Event-Driven Architecture: Heavy data stored in events, not state
DEHR integrates seamlessly with the Signether web application:
// Wallet registration
await dehrContract.registerWallet(registrantName);
// Hash registration
const fileHash = await generateSHA256(file);
await dehrContract.registerHash(fileHash, file.name);
// Verification
const registration = await dehrContract.getRegistration(fileHash);
Standard Web3 libraries provide direct contract interaction:
const { ethers } = require('ethers');
const provider = new ethers.providers.JsonRpcProvider('https://mainnet.optimism.io');
const contract = new ethers.Contract(contractAddress, abi, provider);
// Query operations
const isRegistered = await contract.isRegistered(fileHash);
const registration = await contract.getRegistration(fileHash);
DEHR operates on a pay-per-use model with transparent pricing:
- Wallet Registration: ~$0.01-0.10 USD (one-time)
- Hash Registration: ~$0.001-0.01 USD per document
- Verification: Free (read operations)
- Cost Efficiency: 99%+ cost reduction vs. traditional notarization
- Global Scale: No geographic limitations or business hours
- Permanent Availability: 24/7 verification capability
- Cryptographic Integrity: Mathematical proof of document authenticity
- Contract Execution: Timestamped proof of agreement versions
- Intellectual Property: Prior art establishment for patents/copyrights
- Compliance Records: Regulatory filing verification
- Thesis Defense: Submission timestamp verification
- Research Data: Dataset integrity and provenance tracking
- Publication Priority: Establish research priority claims
- Version Control: Document revision tracking
- Audit Trails: Compliance documentation
- Supply Chain: Certificate of authenticity verification
- Identity Documents: Backup verification for important papers
- Medical Records: Health document integrity
- Financial Records: Tax document verification
Mitigated Threats:
- Document tampering (cryptographic hashing)
- Registration forgery (wallet-based authentication)
- Timestamp manipulation (blockchain consensus)
- Centralized censorship (decentralized infrastructure)
Residual Risks:
- Private key compromise (user responsibility)
- Off-chain document availability (orthogonal concern)
- Quantum computing (future cryptographic concern)
- Key Management: Users must secure private keys properly
- Hash Verification: Always verify document hashes before registration
- Network Verification: Confirm correct Optimism network connection
- Backup Storage: Maintain secure document copies independently
- Multi-Hash Support: SHA-3, BLAKE2 algorithm compatibility
- Batch Registration: Gas-efficient bulk document processing
- Metadata Extensions: Enhanced document categorization
- Cross-Chain Compatibility: Multi-network registration support
- IPFS Integration: Decentralized document storage linking
- ENS Support: Human-readable registrant naming
- Oracle Integration: Real-world event triggering
- Layer 3 Deployment: Application-specific blockchain optimization
The Decentralized Hash Registry represents a paradigm shift toward trustless document verification infrastructure. By combining cryptographic integrity with blockchain transparency, DEHR creates a globally accessible, cost-effective alternative to traditional notarization services.
The protocol's dual-registration model (wallets + hashes) provides verifiable identity linkage while maintaining user privacy and system security. Deployment on Optimism ensures economic viability while preserving the security guarantees of Ethereum's consensus mechanism.
As digital transformation accelerates across industries, DEHR provides the foundational infrastructure for next-generation document attestation systems, enabling new business models built on cryptographic proof rather than institutional trust.
Contract Address: TBD (Optimism Mainnet)
Compiler Version: Solidity ^0.8.28
Dependencies: OpenZeppelin Contracts v5.0+
Network: Optimism (Layer 2)
License: MIT
- Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System
- Buterin, V. (2014). Ethereum Whitepaper
- Optimism Collective. (2021). Optimistic Rollup Protocol Specification
- OpenZeppelin. (2024). Smart Contract Security Patterns
- NIST. (2015). SHA-256 Cryptographic Hash Algorithm Standard
For technical support and implementation guidance, visit the Signether Documentation or contact the development team.