Loopring Protocol Smart Contracts

The Loopring project is a protocol for decentralized token exchange. We have deployed v1.3 on Ethereum mainnet. This set of smart contracts include the following files:

LoopringProtocol.sol: An interface for describing the protocol’s functionality.

LoopringProtocolImpl.sol: The protocol implementation that encapsulates most of the core logics. This file demands a great deal of review and auditing.

TokenRegistry.sol: This smart contract whitelists ERC20 tokens supported by Loopring protocol. Loopring will only support tokens with verified source code.

NameRegistry.sol: This smart contract allows ring-miners and wallets to register so the can use a smaller id instead of addresses in ring settlement transactions.

TokenTransferDelegate.sol: A smart contract to transfer tokens on behalf of different versions of the Loopring protocol meant avoid re-authorization after a protocol upgrade/migration.

Background

This is our second optimization bounty program. In our first optimization bounty, we have paid contributors 687750 LRC for reducing the gas usage of our referencing test from 511465 to 367070. With additional features implemented, the current gas usage for the same test has increased to about 471100.

Rewards

We will use 471100 as the gas usage baseline. For each percent of gas reduction, we will pay the contributor 10K LRC. The cap is 500K LRC.

We will also put the contributor’s GitHub URI in our smart contract source code if he/she can reduce gas usage by at least 5%.

Rules