A typescript implementation of PeekABook, a private order matching system proposed by Barry Whitehat and Kobi Gurkan.
PeekABook
is a private order matching system on Ethereum. It allows users to advertise and search for trading orders without leaking the order price.
To trade, users can either post an advertisement or search for existing advertisements on the smart contract. An advertisement consists of ({identity}, {sell or buy}, {pair_name}, {amount})
, which means user identity
wants to either sell or buy amount
units of pair pair_name
. When a user A
contacts an advertiser B
, SMP(Socialist Millionaire Problem) Protocol to let both A
and B
know whether they desire the same price. Thanks to the protocol, A and B will only know whether priceA == priceB
is true or not. They won't learn any more than this fact. js-smp-peer
is used to handle and initiate SMP protocol.