Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

Repository files navigation

dcipher

BuildLicense: MITStars


Overview

dcipher is a modular protocol for threshold cryptography.
It combines smart contracts and off-chain node operators to enable:

  • Asynchronous Distributed Key Generation
  • Threshold signing
  • Identity-based encryption
  • Chain abstraction

The repository is organized into:

  • Binaries (bin/) – runnable agents, CLIs, and services.
  • Crates (crates/) – Rust libraries used across the project.
  • Modules (modules/)Git submodule dependencies that pull in protocol-specific logic or external components.

Repository Structure

Binaries (bin/)

BinaryPurposeDocumentation
adkg-cliCLI for running and testing Asynchronous Distributed Key Generation ceremoniesREADME
blocklock-agentAgent for the Blocklock protocol (time-lock / conditional decryption)
dsignerThreshold signing daemon, allowing operators to separate condition evaluation and signing for securityREADME
gen-keysUtility for key generation (testing / setup)README
monitoringAn agent that listens/polls dcipher-related information and ships it to prometheusREADME
onlyswaps-smoketestA continuous monitoring and testing tool for only swaps.README
onlyswaps-solverAn agent for providing token liquidity on chains that support onlyswaps to make yield.README
onlyswaps-state-apiAPI for caching and serving state related to ONLYSwaps
onlyswaps-verifierA dcipher protocol implementation called ONLYSwaps for enabling cross-chain token swapsREADME
randomness-agentA dcipher protocol implementation for providing request-based verifiable randomness on-chain

Crates (crates/)

CratePurpose
adkgCore Asynchronous Distributed Key Generation implementation
agent-utilsUtilities shared by dcipher agents
configShared configuration handling for agents that use networking, threshold signing, or load config files (TOML, env, etc.)
dcipher-agentsCommon agent framework code
generatedAuto-generated Rust bindings from Solidity (kept in sync via generate-bindings.sh)
networkNetworking primitives and libp2p integrations
onlyswaps-clientA client to interact with onlyswaps
omnieventA library for streaming contract events sources into database sinks, and back into filterable streams for apps built on top of alloy
signerSigning logic (BLS / threshold compatible)
superalloyA crate providing multiplexing logic for combining alloy providers
utilsGeneral helper utilities

Modules (modules/)

These are Git submodule dependencies, not local crates.
They typically include protocol-specific or external components maintained in separate repositories.
Update them with:

git submodule update --init --recursive

Getting Started

Prerequisites

  • Rust 1.89.0+
  • Node.js & npm
  • make
  • Foundry (if running the tests)

Quickstart

Build everything, including solidity and tests:

make all

Build the repo (but not the tests):

cargo build

Build a specific binary (e.g. adkg-cli):

cargo build --release -p adkg-cli

Build Docker images (requires binaries to be built first):

make build_binaries
make build_docker_randomness-agent
make build_docker_onlyswaps-verifier

Clean artifacts:

make clean
make clean_node_modules
make clean_forge

Bindings

If Solidity contracts change, regenerate Rust bindings:

./generate-bindings.sh

CI will fail if bindings are out of sync.


Testing

  • Rust crates:
cargo test --workspace

Contributing

  1. Fork & clone the repo
  2. Create a feature branch
  3. Run cargo test and forge test before pushing
  4. Open a PR and ensure CI passes

License

Licensed under MIT.

About

dcipher is a modular protocol for threshold cryptography

Topics

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages