← Back to home

mina-dark-pool

Dark pool using hybrid execution model for private order matching with delayed execution

Screenshots

mina-dark-pool screenshot 1
mina-dark-pool screenshot 2
mina-dark-pool screenshot 3
mina-dark-pool screenshot 4
mina-dark-pool screenshot 5

Problem Statement

This project makes use of Protokit to create a custom sequencer, which enables private order matching.My implementation is based off of a constant product liquidity pool (see acknowledgements), where users can provide liquidity in any LP. For each LP, I have also added a whitelist mechanism, which is in line with what a dark pool is.In this project, here are the features of the Dark Pool I have implementedprivate order matching (using custom sequencer)delayed order execution (based on block heights)expiration of orders (based on block heights)public LP operationspublic order submissionpublic token registry for pools (unique based on token pair)hooks for users to setup callbacks once orders are matched / before orders are matched

Solution

Based off of the Protokit starter template, I have created a DarkPool and TokenRegistry runtime module for pool and token management.Additionally, I created a DarkPoolMempool sequencer module to match orders whenever an incoming order is submitted. This checks against incoming method IDs and also stores a simple set in memory to avoid matching orders multiple time in a block. This will eventually be done in a cronjob.The frontend is built using shadcn and Next.js. I have detailed my other approaches in the README.md, for your perusal.

Hackathon

ETHGlobal Singapore

2024

Prizes

  • 🏆

    Best Mina application or library built using Protokit3rd place

    Mina Protocol

Contributors