Skip to content

Monorepo for DEXES, the Web3 backbone for business processes

License

Notifications You must be signed in to change notification settings

degengineering/dexes

Repository files navigation

DEXES

A decentralized infrastructure for cryptographic identity and document timestamping on Ethereum, enabling secure digital interactions through OpenPGP cryptography.

Products

DEXES provides two complementary products for decentralized cryptographic operations:

πŸ” Web3PGP

Decentralized Public Key Infrastructure (PKI)

Web3PGP enables a decentralized public key infrastructure using OpenPGP and Ethereum. It allows:

  • Decentralized Key Registry: Store and retrieve OpenPGP public keys on the blockchain
  • Identity Certification: Establish trust chains by certifying keys on-chain
  • Key Revocation: Revoke compromised or expired keys transparently
  • Transparent Auditing: Immutable record of all key operations via blockchain events
  • Cost Efficiency: Uses event logs for gas-optimized storage instead of contract state

πŸ“– Web3PGP Documentation | βš™οΈ Web3PGP CLI

πŸ“… Web3Sign

Document Timestamping & EDI System

Web3Sign provides decentralized Electronic Data Interchange (EDI) with cryptographic timestamping:

  • Document Timestamping: Create immutable timestamps for any digital document
  • Proof-of-Existence: Cryptographically prove document existence at specific times
  • Certified Copies: Track document provenance with signature workflows
  • Blockchain Verification: Verify document integrity and timestamp authenticity
  • OpenPGP Integration: Leverages Web3PGP keys for cryptographic operations

πŸ“– Web3Sign Documentation | βš™οΈ Web3Sign CLI

Project Structure

This monorepo contains all components of the DEXES ecosystem:

dexes/
β”œβ”€β”€ contracts/           # Solidity smart contracts (Foundry)
β”‚   β”œβ”€β”€ src/            # Contract source code
β”‚   β”œβ”€β”€ test/           # Contract tests
β”‚   └── scripts/        # Deployment & management scripts
β”œβ”€β”€ clis/               # Command-line interfaces
β”‚   β”œβ”€β”€ web3pgp/        # Web3PGP CLI
β”‚   └── web3sign/       # Web3Sign CLI
β”œβ”€β”€ sdks/               # Software development kits
β”‚   └── typescript/     # TypeScript SDK
β”œβ”€β”€ frontends/          # Web applications
β”‚   β”œβ”€β”€ web3pgp/        # Web3PGP frontend
β”‚   └── timestamp-verification/  # Timestamp verification tool
β”œβ”€β”€ documentation/      # Project documentation
β”‚   β”œβ”€β”€ NETWORKS.md     # Network information
β”‚   └── SETUP.md        # Setup guides
β”œβ”€β”€ examples/           # Usage examples and tutorials
└── scripts/            # Utility scripts

πŸ“š Documentation Links

Quick Start

Prerequisites

  • Node.js 18.x or higher
  • Foundry (for smart contract development)
  • GPG (for cryptographic operations)

Installation

# Clone the repository
git clone https://github.com/degengineering/dexes.git
cd dexes

# Install dependencies
npm install

# For contract development
cd contracts && forge install

Basic Usage

# Generate a key and register it
web3pgp blockchain generate-key
export DEXES_WALLET_PRIVATE_KEY='your_key'
gpg --export <your_key_fingerprint> | web3pgp blockchain register

# Timestamp a document
web3sign timestamp -e <fingerprint> -H <hash> -s signature.asc

Architecture

Smart Contracts (Ethereum)

  • Web3PGP: Core PKI contract for key registration and management
  • Web3Sign: Timestamping contract for document verification
  • FlatFee: Fee management with access control
  • AccessManager: Role-based access control system

Client Libraries

  • TypeScript SDK: Comprehensive SDK for both Web3PGP and Web3Sign
  • CLIs: Command-line tools for direct interaction
  • Web Frontends: Browser-based interfaces

Key Design Principles

  • Decentralized: No central authority or single point of failure
  • Gas Efficient: Event-based storage for cost optimization
  • Composability: Modular design for integration with other systems
  • OpenPGP Native: Leverages existing cryptographic standards
  • Upgradeable: UUPS proxy pattern for future enhancements

Development

Building

# Build all components
npm run build

# Build contracts
cd contracts && forge build

# Build CLIs
cd clis/web3pgp && npm run build
cd clis/web3sign && npm run build

Testing

# Test contracts
cd contracts && forge test

# Test CLIs
cd clis/web3pgp && npm test
cd clis/web3sign && npm test

# Test SDK
cd sdks/typescript && npm test

Deployment

# Deploy contracts to testnet
cd contracts
forge script script/DeployTestEnvironment.s.sol --rpc-url $SEPOLIA_RPC_URL --broadcast

# Publish CLIs
cd clis/web3pgp && npm publish
cd clis/web3sign && npm publish

Contributing

Contributions are not yet open. Issues, questions, feedback and bug reports are welcome as Github issues.

Reporting Issues

Guidelines

  • Follow the existing code style and conventions
  • Write tests for new functionality
  • Update documentation for API changes
  • Ensure all tests pass before submitting PRs

Development Setup

See the Setup Guide for detailed development environment setup.

Security

  • Audit Ready: Contracts designed with security best practices
  • OpenPGP Validation: All cryptographic validation performed off-chain (openpgp.js)
  • OpenZeppelin Access Control: Role-based permissions for sensitive operations
  • OpenZeppelin Upgradeable: Secure upgrade mechanisms for bug fixes
  • Safe MultiSig: Sensitive operations require multiple signatures

For security-related issues, please email support@lake42.eu (fingeprrint: D5DDB02C46A0A22A0C90D27E2C97F822EEFDA9B7) instead of creating public issues.

License

Smart contracts are licenced under Business Source License 1.1 - see LICENSE file for details.

The rest of the code is licenced under permissive licences.

Community

About

Monorepo for DEXES, the Web3 backbone for business processes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors