Skip to content

olehmisar/mezcal

Repository files navigation

Mezcal

Mezcal (Nahuatl: mexcalli - agave booze) - on-chain dark pool implementation using Noir and Taceo coNoir. Hides EVERYTHING about orders and traders(tokens, amounts and addresses of traders are completely hidden). Trades settled on an EVM chain using a very simplified version of Aztec Protocol. The tradeoff is O(N^2) order matching engine.

The code is highly experimental. The core code is located in packages/contracts.

TODO

contracts and circuits

  • split contract into a generic rollup and ERC20 specific
    • extract PoolGeneric storage into a struct
  • join Erc20Note
  • split Erc20Note
  • negative tests
  • use bignumber for amounts
  • support ETH
  • fees
  • prove against a historical note hash tree root
  • PublicInputsBuilder
  • deploy as proxy
  • test contracts with larger token amounts
  • TODO(security): parse inputs to circuits instead of assuming they are correct. Same applies to types returned from unconstrained functions. noir-lang/noir#7181 noir-lang/noir#4218