Skip to content

Instantly share code, notes, and snippets.

@corollari
Created January 23, 2021 04:27
Show Gist options
  • Save corollari/c66f5b4f32e86f268cd34ee7cf66ac4f to your computer and use it in GitHub Desktop.
Save corollari/c66f5b4f32e86f268cd34ee7cf66ac4f to your computer and use it in GitHub Desktop.
Dark pool protocol

Main idea

Build an off-chain orderbook DEX such as oasis with the following differences:

  • Order matching is done by software running inside a trusted execution environment -> nobody can know what the orderbook looks like.
  • Orders are broadcast along with range proofs that prove that the amounts are higher than a certain value.
  • Use a scheme like tornado.cash to hide the creators of the order.

Information leakage

  • Deposits and withdrawals, although these are not linked between them
  • Orders that matched, although the amount of the order is not revealed

Improvements

  • Use some sort of MPCs that makes it so a single instance doesn't know the orderbook and instead multiple instances need to be coordinated to get to know it, then we could distribute the order matcher across multiple cloud providers and parties so that all of them have to be compromised for the orderbook to be revealed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment