diff --git a/patterns/pattern-threshold-encrypted-mempool.md b/patterns/pattern-threshold-encrypted-mempool.md new file mode 100644 index 0000000..e786fe9 --- /dev/null +++ b/patterns/pattern-threshold-encrypted-mempool.md @@ -0,0 +1,144 @@ +--- +title: "Pattern: Threshold Encrypted Mempool" +status: draft +maturity: pilot +layer: L1 +privacy_goal: Hide transaction content until block inclusion via threshold encryption +assumptions: Honest threshold committee (k-of-n), timely key release, compatible block builder +last_reviewed: 2026-01-14 +works-best-when: + - MEV protection required at protocol level + - Users cannot or prefer not to trust private relays + - Censorship resistance combined with pre-trade privacy needed +avoid-when: + - Committee liveness requirements unacceptable + - Decryption latency incompatible with use case + - Single trusted party acceptable (simpler private relay) +dependencies: [Threshold cryptography, Distributed key generation, Block builder integration] +--- + +## Intent + +> **Sub-pattern of [Private Transaction Broadcasting](pattern-private-transaction-broadcasting.md)** — This pattern provides detailed coverage of threshold encryption specifically. See the parent pattern for alternative approaches (private relays, TEE-based builders). + +Prevent MEV extraction by encrypting transaction content before mempool submission, with decryption occurring only after block ordering is committed. A distributed committee holds threshold key shares; no single party can decrypt prematurely. This provides cryptographic (not trust-based) protection against front-running while maintaining censorship resistance. + +## Ingredients + +- **Cryptographic Primitives**: + - **Threshold encryption**: k-of-n scheme where k committee members must cooperate to decrypt + - **Distributed Key Generation (DKG)**: Committee jointly generates threshold public key without any party knowing full private key + - **Identity-Based Encryption (IBE)** or **timelock encryption**: Optional variants for slot-based decryption + +- **Infrastructure**: + - **Keyper committee**: Distributed set of key holders (validators, independent operators, or DAOs) + - **Sequencer/proposer integration**: Block builder must support encrypted transaction inclusion + - **Decryption oracle**: Publishes decryption keys after inclusion commitment + +- **Standards**: + - No ERC standard yet; Shutter uses custom protocol + - Compatible with ERC-20, ERC-7573, and other token standards at application layer + +## Protocol (concise) + +### Encryption Phase + +1. **Committee setup**: Keypers run DKG to generate threshold public key `PK` and individual key shares `sk_i`. +2. **Key publication**: Threshold public key `PK` published; users encrypt transactions with `PK`. +3. **Transaction encryption**: User encrypts transaction `tx` as `E(PK, tx)` and submits to mempool. +4. **Encrypted inclusion**: Block builder includes `E(PK, tx)` in block without seeing contents. + +### Decryption Phase + +5. **Inclusion commitment**: Block is proposed/finalized with encrypted transactions. +6. **Decryption key release**: After slot commitment, k-of-n keypers release decryption key shares. +7. **Key aggregation**: Shares combined to produce decryption key `DK` for that slot/block. +8. **Transaction reveal**: `DK` decrypts all transactions in block; execution proceeds with revealed content. + +## Committee Assumptions + +| Assumption | Requirement | Failure Impact | +|------------|-------------|----------------| +| **Honest threshold** | At least k of n keypers are honest |