Loopring Bi-Weekly Dev Update — 11/25/2017

Loopring is the protocol for decentralized token exchange

Daniel Wang
Loopring Protocol
4 min readNov 25, 2017

--

Protocol Smart Contracts

We received a smart contract audit report from Blockchain at Berkeley. Most feedback in the report are minor and many of them have been taken care of in our v1.0-beta.3 release. Although it is still labeled as a beta, we believe this release is truly production-ready. It will be used for our wallet/relay integration in the coming month. After the integration testing, we will deploy another beta then hit the final v1.0 release to conclude the v1.0 serial.

Here is more information about the v1.0-beta.3 release:

Source: github.com/Loopring/protocol/releases/tag/v1.0-beta.3
TokenRegistry:0x2EfEc84e4C52D1392cA0210b571234AD375C2250
TokenTransferDelegate: 0xaf7ef25C997A5121459122308a84A032D4A16868
RinghashRegistry: 0x17064d2A00c19CfE73ABF47eaab4d8533D4f92c5
LoopringProtocolImpl: 0xaD111a1D34045dF921259FF91F8096EeC1afD7A9

We have also registered the first batch of ERC20 tokens with v1.0-beta.3. These tokens will be tradable using Loopr wallet. If you want to get your token supported by the Loopring protocol, please wait for our v1.0 release.

To check if a token has already been registered, you can visit this page on etherscan.io, then use the isTokenRegistered function with the token’s ERC20 contract address of your interest.

Update: we submitted two rings (ring1, ring2) to v1.0-beta.3, if you compare the gas usage with the two rings (ring1, ring2) submitted to v1.0-beta.1, you will notice there is a significant gas reduction:

0.00179413 Ether ($0.84) in beta.1⇨ 0.001486095 Ether ($0.69) in beta.3

0.002702955 Ether ($1.26) in beta.1⇨ 0.00194206 Ether ($0.91)in beta.3

Relay

Based on an internal design review, we have been refactoring relay infrastructure and its major functionalities. What we have accomplished include:

  • Reimplementation of the order management component. Now it provides more data and better APIs for ring-matching.
  • Refactoring of the Ring-Matching component (i.e. match engine). The match engine now consumes less memory and is more computation-efficient.
  • Migration of database from leveldb to mysql to support complex queries.
  • Refactoring of code that bridges the Ethereum node and the relay; as well as code that deserializes Ethereum/Loopring events.
  • We are also done with implementing most JSONRPC with the exception of several account/balance related ones.

We will need one or two more weeks to complete the outstanding JSONRPC, and to add more tests. Then we will be able to start the integration with Loopr and our smart contract to experience trading with real token/coins on Ethereum mainnet.

Wallet

During the last two weeks, we have fixed various bugs and have also added/enhanced the following features:

  • Allowing users to customize the margin-split parameter in their orders.
  • Allowing users to add and remove relays. We expect in the future, relays developed by third-parties will surpass Loopring's official relay software in term of performance. By allowing customized relays in Loopr, we decoupled the wallet from its backends. This is a step forward to help other relays get started— they don’t need to develop a wallet in parallel. Loopr will be available as a product as well as as a coding baseline/reference.
  • Allowing a third component in URLs for easier bookmarking and backward navigation.
  • A better and simpler chart to display history trades.
  • Allowing users to set and update a cutoff timestamp. It helps users to invalidate all orders whose come-alive timestamp is smaller than the cutoff value.
  • Fixed a bug that will lead to 404 error.

We have started to adopt Loopring.js as an encapsulation of common JavaScript code, as of result of this effort, the wallet has a better separation between logic and UI.

Looping.js

We extracted more code from Loopr and put them into this library. It will soon be versioned and distributed as an npm package.

Summary

With the deployment of v1.0-beta.3, our focus in the coming month will be on the integration of the smart contracts, the wallet, and the relay. This is going to be very exciting. We’ll soon know how Loopring performs in terms of facilitating people to trade in a secure and decentralized manner.

For people who want to participate in our beta-testing, please be a little more patient — we need to go through at least one round of internal testing to fix obvious bugs and add missing features. The testing will be using real token and coins, we certainly don’t want you to lose money. If you own many LRC, you should be able to use our wallet for trading sooner than others.

If you have questions, join us on social media and direct your questions to our CMO Jay Zhou.
⭑ Twitter: https://twitter.com/loopring.org
⭑ Rocket Chat: https://loopring.rocket.chat
⭑ Telegram: https://t.me/loopringfans & https://t.me/loopringinternational

--

--