Skip to main content

Dark Pool

A blockchain-based dark pool is a private financial exchange designed for trading securities, derivatives, or other financial instruments while maintaining high levels of privacy and anonymity. Unlike traditional exchanges where order books and trade details are publicly visible, dark pools operate in secrecy, revealing minimal information to the public.

By integrating blockchain technology, these dark pools enhance trustless and programmability through smart contracts and decentralized protocols. One major concern is that implementing the core features to protect the transaction information remains a big challenge.

FHE-based Solution

With FHE and zkFHE, the dark pool can be enabled allowing participants to trade without disclosing their identities or the specifics of their orders. We explain the key steps of the idea.

Initial Setup

Let's assume a dApp DP provides the core features of a dark pool. At the beginning, the dApp shall communicate with zkFHE network and require a subset of zkFHE nodes to create a shared public key PK.

Order Submission

For each new order, the participant shall request an encryption computation prior to submitting it to the dark pool. This can be achieved by encrypting the order field with PK. This includes encrypting details such as asset type, quantity, and price. For example, Enc(price, PK) is part of the encrypted order, where price is a signed number representing a buy order or a sell order.

Matching and Execution

The matching process shall be designed to match buy and sell orders based on parameters such as price and quantity. This can be enabled by periodically requesting a matching computation from zkFHE network. Typical computations for matching orders on the same asset type are:

delta_price = Enc(price1, PK) + Enc(price2, PK)
matched = Compare(delta_price, zero); // an encrypted boolean value

The operations check if the buy and sell orders can match the deal by comparing the signed addition value with the encrypted zero, and threshold decrypting matched to check the truth.

Account Settlement

Once matching orders are found, the matched quantities are mq= Min(Enc(quantity1, PK), Enc(quantity2, PK)). The dark pool executes the trades by adjusting the encrypted balances of the participants with mq. The execution process involves updating encrypted account balances with homomorphically addition or subtraction without decrypting any data.

alt text

A practical dark pool system will be more complicated than the above idea. However, we can still believe that it is possible to fully implement a feature-complete and low-latency on-chain dark pool application using (zk)FHE techniques.