This implementations includes two protocols for dark pool auctions: Non-Private and Indifferentially Private. We introduce a new system based on Indifferential privacy (where a user is indifferent to whether certain information is revealed after some special event) combined with lightweight encryption, offering an efficient and practical solution that mitigates the risks of an untrustworthy auctioneer.
WARNING: This is an academic proof-of-concept prototype and is not production-ready.
We integrate our code into ABIDES, an open-source highfidelity simulator designed for AI research in financial markets (e.g., stock exchanges). The simulator supports tens of thousands of clients interacting with a server to facilitate transactions (and in our case to compute sums). It also supports configurable pairwise network latencies.
Our protocol works by steps (i.e., round trips). A step includes waiting and processing messages. The waiting time is set according to the network latency distribution and a target dropout rate.
We recommend using Miniconda to set up environment. You can download Miniconda by the following command:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
To install Miniconda, run
bash Miniconda3-latest-Linux-x86_64.sh
If you use bash, then run
source ~/.bashrc
Now create an environment with python 3.9.12 and then activate it.
conda create --name idp-darkpool python=3.9.12
conda activate idp-darkpool
Use pip to install required packages.
pip install -r requirements.txt
The code is in branch main
.
First enter into folder pki_files
, and run
python setup_pki.py
Our program has multiple configs.
-c [protocol name]
-n [number of clients (power of 2)]
-i [number of iterations]
-p [parallel or not]
-d [debug mode, if True then output info for every agent]
The protocol supports batches of clients with size power of 2, starting from 128, e.g., 128, 256, 512.
Example command for non-private auction:
python -O abides.py -c non_private_auction -n 1024 -i 1 -d 0
Example command for IDP auction:
python -O abides.py -c idp_auction -n 1024 -i 1 -d 0
We thank authors of Flamingo for providing an example template of ABIDES framework.