Skip to content

About_Loopring3

Daniel Wang edited this page Apr 5, 2019 · 1 revision

Loopring Protocol (V3) using zkSNARKs

About

This is a very early version of Loopring's order-based DEX protocol (version 3.0). The code base is still being tested and is not production ready.

To understand several concepts introduced by the Loopring Protocol, such as order-ring, ring-matching, dual-authoring, free-burning, please read our whitepaper for Loopring Protocol 2.x.

To understand the overall design for Loopring 3.0, including Ethereum smart contracts and zkSNARKs circuits, please refer to the DESIGN doc. The design of the backend relayer system is and will not be covered by this document. We welcome any feedback regarding the design and our implementation, feel free to email us or submit pull requests.

Top Features

  • Onchain data-availability (DEXes can opt out for even greater throughput & lower cost)
  • All ERC20 tokens and Ether are supported by default
  • Multiple on-chain DEX instances with isolated state and dedicated event stream (different from 2.0)
  • Onchain deposit + on-chain & offchain withdrawal support
  • Support offchain order cancellation and order time-to-live settings (inherited from 2.0)
  • Allow partial order matching (aka partial fill) and offchain order-scaling (inherited from 2.0)
  • Multiple circuit permutations for different request batch sizes
  • Use any ERC20 token or Ether as the trading fee to reduce friction(inherited from 2.0)
  • DEX can buy down fee token burn rate (inherited from 2.0)
  • An enhanced version of dual authoring prevent orders/trades from being stolen by a middleman (enhanced on top of 2.0)
  • On current Ethereum mainnet, throughput is about 60 trades/second with on-chain data-availability, and ~350 trades/second without data-availability -- which can be further optimized in the near future.
  • A built-in mechanism to force DEX operators to fulfill duties in time (especially for handling deposits and withdrawals)
  • Support DEX operators to stake tokens to "buy" credit
  • Support a "maintenance mode" for DEX operators to upgrade backends within a time window
  • Support a unique feature called Order Aliasing (new to 3.0)
  • 100% secure for end users, even when DEX operators are evil (same as 2.0)
  • and more...

Challenges

  • SNARKs require trusted setups
  • Circuits not yet audited (smart contract auditing should be easy and we are very experienced)
  • Can switch to better hash function
  • and more...

nothing here

Clone this wiki locally