Loopring Protocol describes itself as a zkRollup-based layer-2 solution for decentralized exchange (DEX) and payment protocols that promises to remove the slow speeds and high transaction costs problems associated with other popular DEXes on Ethereum.
In 2019, not many people, even familiar with Bitcoin and Ethereum, did not hear of DeFi. By the summer of 2020, decentralized finance (DeFi) was taking the crypto world by storm, and by the end of 2020, the total value locked (TVL) on DeFi applications was around $25 billion from $8 billion at the end of 2019. The TVL is expected to cross $100 billion by the end of 2021.
At that time, the Ethereum blockchain protocol was the preferable stage for DeFi applications, with a few minor applications running on other platforms. As this DeFi activity grew, the platform’s aging infrastructure and legacy Proof-of-Work algorithm proved inefficient to meet the demand of this new financial system.
This led to a sharp increase in transaction fees that made DeFi on Ethereum prohibitively expensive for all but the largest transactions. So, some solutions were necessary to address these issues and this need gave birth to layer-2 solutions. Layer 2 platforms use various technologies such as Plasma and rollups to process transactions off the Ethereum main chain.
Although Ethereum’s transition from Proof-of-Work (POW) to Proof-of-Stake (POS) algorithm is underway, layer-2 solutions are seeing a significant increase in usage. Loopring is one of the teams that is using the Zero-Knowledge Rollups (zkRollup) layer-2 solution to offer DeFi platforms that provide a better user experience.
Let’s take a look at Loopring Protocol.
What is Loopring Protocol?
Loopring Protocol describes itself as:
“Loopring is an Ethereum zkRollup protocol for scalable, secure exchanges & payments.”
Loopring (LRC) was founded in 2017 by software engineer Daniel Wang. The initial coin offering (ICO) for Loopring took place in August 2017 and raised $45 million. The 85% of ICO proceeds were then to investors due to China’s tightening regulations. The current version of Loopring and 3.8.
Loopring’s L2 increases transaction throughput and decreases cost while maintaining complete Ethereum security guarantees. To provide the described functionality of exchange and payment, Loopring has built two non-custodial, high-performance products atop its layer-2. This includes Loopring Wallet, a mobile Ethereum smart wallet, and the Loopring Exchange, an L2 orderbook and automated market maker (AMM) DEX.
To provide its promised features of high-throughput, low-cost trading and payment on Ethereum, Loopring uses zkRollup-based layer-2 infrastructure to do most of the work off-chain. For the highest throughput, the protocols support off-chain balances that are stored in Merkle trees.
Users can deposit and withdraw tokens to Loopring smart contracts, and their balance is updated in Merkle trees. This way, the protocol can transfer tokens between users just by updating the Merkle tree off-chain, there is no need for expensive token transfers on-chain. This also lowers the costs as an off-chain token transfer takes only a minimal cost for generating the proof for updating a Merkle tree.
Difference Between Loopring and Other L2 Protocols
Loopring is a different kind of protocol that is difficult to understand as it doesn’t have an exact analog. Based on the information available on the internet, we can say Loppring in itself is not a DeFi protocol like Uniswap or SushiSwap. It allows DEXes built on top of it to sidestep the slow speeds and high costs associated with decentralized exchanges on Ethereum through the use of zkRollups.
The abstract of Loopring’s whitepaper describes it as:
“Loopring is an open protocol for building decentralized exchanges. Loopring operates as a public set of smart contracts responsible for trade and settlement, with an off-chain group of actors aggregating and communicating orders. The protocol is free, extensible, and serves as a standardized building block for decentralized applications (dApps) that incorporate exchange functionality.”
In short, Loopring is an ecosystem that allows the creation of DEXes on its layer-2 but also has its own DEX and wallet built on its layer-2 protocol.
The difference between other layer-2 protocols like Arbitrum and Loopring is that other protocols seek to draw in other protocols or dapps to migrate or build anew on their L2 but don’t build specific protocols, nor user-facing products themselves. Loopring has also built its own products atop its layer-2.
As this article is to discuss the DeFi side of Loopring and the Loopring Exchange and Loopring Wallet are their flagship DeFi products, let’s take a look at them.
Loopring Exchange
A blog post by the Loopring team describes Loopring Exchange as:
“Loopring Exchange is a non-custodial Ethereum exchange built on Loopring layer 2. It is an orderbook-based and AMM-based exchange that replicates the high-performance, low-cost trading experience of centralized exchanges.”
Loopring Exchange is more than a DEX, and also acts as a payment app where users can send ETH and ERC20 token transfers to any Ethereum address instantly, cheaply, and securely on L2.
Just like other DEXes, users can provide liquidity to earn fees and swap tokens. The new feature is that on Loopring exchange, users can send an Ethereum-based asset to any other Ethereum address, whether the address has previously used Loopring L2 or not.
How to Use Loopring Exchange
To begin trading on a Loopring exchange, users must first send their funds to a smart contract managed by the Loopring protocol. Users can access Loopring Exchange on any web browser or through the Loopring smart wallet mobile app.
To start, users first have to connect their wallets. The exchange supports Metamsk, Loopring Wallet using WalletConnect, and many others. After this, they can deposit their assets to Loopring L2. Since depositing is an Ethereum layer-1 transaction, meaning it moves from L1 to L2, this costs gas. Once assets are on L2, they are gas-free for as long as users would like.
Once asset are on Loopring L2, users can perform the desired action. For example, they can send to any Ethereum address just by providing the address or ENS name. As this process will be on L2, these transactions are instant and gas free, and costs only a fix of $0.01.
Gas-Free Token Swaps
As we know, Loopring Exchange supports both automated markete making (AMM) and orderbook models.
AMM Model
Trading through AMM is as same as Uniswap where users swaps tokens from AMM pool. Loopring fees are 0.25% for the swap that are from the token that is being bought. These are just protocol fees, no gas costs.
0.15% of that goes to liquidity providers (LPs), the remaining 0.1% goes to the relayer and protocol fee. LPs earn fee from all trades in the pools they provide liquidity to, proportional to their share of that pool. Like Uniswap and other AMMs, user simply deposit an equal value of two assets in the pool.
LPs’ postion in the pool is represented by LP tokens. There are further liquidity incentives provided in LRC and other tokens for certain AMM pools. Loopring Exchnage runs a 14-day AMM Liquidity Mining round in which LPs receive rewards in native LRC token.
In this round, Loopring takes random snapshots of the relevant AMM pools several times a day, and calculate the size of reward each LP earns based on the average of all snapshot balances in the round.
Orderbook Model
The Loopring orderbook supports limit order, meaning traders can state the price they want to buy or sell at, and leave it resting on the books. The takers can then fill these orders. Makers receive rebates on their orders that get filled on the books. The rebate is 0.02%.
In addition to maker rebates, there are also often liquidity mining programs for orderbook pairs. This incentivizes makers to place tight resting limit orders on the books, and receive rewards for providing that liquidity for others to take.
Loopring Exchange’s oderbooks don’t support market orders as there are no bids and asks. Insteaad, its uses a feature called ‘Order Ring’ to facilitate orderbook trades. The whitepaper explains Order Ring as:
“Loopring orders are expressed in what we call a Unidirectional Order Model (UDOM). UDOM expresses orders as token exchange requests, amountS/amountB, (amount to sell/buy) instead of bids and asks. Since every order is just an exchange rate between two tokens, a powerful feature of the protocol is the mixing and matching of multiple orders in circular trade. By using up to 16 orders instead of a single trading pair, there is a dramatic increase in liquidity and potential for price improvement.”
Loopring Smart Wallet
Loopring Wallet is the world’s first Ethereum smart wallet powered by zkRollup, available for Android and iOS. It is a non-custodial wallet where ensure their assets’ security by choosing their trusted third party as the guardian.
Users can choose people, institutions, and hardware that they trust as the guardians of their wallet. As long as more than half of their guardians are trustworthy, users’ assets are secure. Users can choose their own name and address.
Loopring Wallet is what called ‘Socail Recovery’ wallet. This means that if user’s is lost, stolen, phished or hacked, guardians can recover user’s funds onto a new wallet. With Smart functionality enabled, users can whitelist address they trust so that hacker or phishers can not transfer their assets to any other address. Daily limits can also be set to add further protection.
The Loopring Smart Wallet also comes with Loopring L2 Exchange and all of its functionality integrated in it.
Loopring LRC Token
ERC20-based Loopring (LRC) is the utility token of the Loopring network. LRC has max supply of 1,374,513,896 with 1.32B or 96% LRC supply in circulation, CoinMarketCap data, at the time of writing, says.
LRC incentivizes positive behavior from liquidity providers, insurers, and DAO governors. LRC is deflationary as tokens from some of the fees and from operators who have their stake slashed for bad behaviour get burned.
Protocol fees are paid in LRC or ETH to three types of participants that includes liquidity providers, insurers, and Loopring DAO, in an 80%, 10%, and 10% proportion, respectively. Protocol fees accrued in tokens other than LRC and ETH is sold on L2 for LRC and ETH.
To protect against the risk of unforeseen bugs, the Loopring insurance fund was created. Anyone can deposit LRC into this fund and earn a proportional share of 10% of fees.
From LRC tokenomics, we can summarize that “the current fees earned by the protocol are 0.02% on AMM swaps, 0.046% on orderbook trades, 0.004% on stablecoin-stablecoin trades, and $0.01 on transfers.”
The Loopring DAO receives 10% of all protocol fees that decides to do with these funds. It can buyback LRC and burn it, use for impermanent loss protection to draw more LPs, distribute to DAO voters, distribute more incentives to LPs/makers, fund grants, etc.
Loopring Relayers, the operators of zkRollups who hosts the Merkle tree, creates roll-up blocks, and generates the zkSNARK proofs to publish to Ethereum, also receives 0.1% of the L2 transaction.
Futhermore, An operator must lock up LRC in order to run a decentralized exchange on Loopring protocol.
Summary
Loopring itsef is not a DeFi protocol. It is L2 zkRollup platform like optimism that allows to built secure DEXes and payment protocol on it. Its L2 promises full security of Ethruem, high throughput, and gas-less operations.
Loopring Exchange and Loopring Wallet are two defi products by Loopring that it has built on its own L2 platform, called Loopring Protocol.
Important Links
Website: https://loopring.org/#/
Whitepaper: https://loopring.org/resources/en_whitepaper.pdf
Documentation: https://github.com/Loopring/protocols/blob/master/packages/loopring_v3/DESIGN.md#trading
Loopring Exchange: https://app.loopring.io/#/landing-page
Loopring Wallet: https://loopring.io/#/
Loopring Blog: https://medium.com/loopring-protocol