In The Network - Loopring
zk-Rollups, LRC Staking, Loopring DEX Activity, and Transaction Batching
This Formal Verification research is free for everyone. If you don’t want to miss out on the latest digital assets research and content then hit that subscribe button today.
Loopring
Loopring is an open protocol used for building scalable order book based DEXs on Ethereum using zk-Rollup constructions. The DEXs themselves are non-custodial but are each maintained by a single (or set of) operator(s) that batch several transactions together. zk-SNARK proofs are created to prove that all transactions are legitimate which are verified off-chain and then uploaded to the Ethereum mainnet. The goal is to provide a scalable but secure DEX infrastructure on using layer 2 that can lower the on-chain costs requirements.
While other exchanges have experimented on the protocol (see Dolomite beta), the Loopring team decided to launch their own DEX on the protocol earlier this year which aims to be the de facto exchange for traders on the protocol.
With DEX volume reaching $2.2 billion so far in 2020 and DEXs iterating on token structure, incentive mechanisms, and functionality (see Kyber Katalyst, Uniswap V2, 0x V3), it is important to pay attention to entrants like Loopring particularly when they offer a very novel framework in which DEXs can operate.
With this in mind, we will cover the key network insights from the Loopring protocol so far including LRC staking, Loopring DEX activity, and transaction batching.
Staking
LRC is the native token to the Loopring protocol. The token has 3 main functions: as a collateral asset for exchange owners who build their DEX on the Loopring protocol to improve economic security and reputation, a capital asset that gives stakers 70% of the protocol fees (0.06% of trading volume) of all exchanges, and being a consumable token that gives staking exchange owners lower protocol fees. Importantly, protocols fees are abstracted away from traders, and exchange operators take on this cost.
Currently, there is 140m LRC staked in the staking pool contract which represents 10% of the total token supply. This translates to ~$6m in value locked at the time of writing. The bulk of this supply locked has come from the Loopring team themselves who staked the team supply allocation (34.8m) as well as the developer funds (24.5m) which totalled to more than 108m LRC being staked. They also plan to stake the 20% team supply (1/24th vested monthly starting October 2019). While this means the team is aligned to developing the protocol and the Loopring exchange, other stakers in the pool have been effectively pushed out.
Having staking functionality for a token may mean that the supply on exchanges is lowered as users choose to put their assets to work. While this doesn’t necessarily imply causation, this dynamic has been found for LRC. After the exchange balance on centralised exchanges (e.g. Binance, Huobi) climbed to a peak of 320m, and as staking was opened up for LRC holders, exchange balance started to fall towards ~250m LRC. To rule out whether this was merely a function of a LRC mass exodus to DEXs, liquidity can be analysed on Uniswap and Kyber - there is only $400k Uniswap V1, $6k on Uniswap V2, and further low liquidity seen on Kyber’s own reserve pool.
In November 2019, 0x released V3 which allowed ZRX holders to stake to market makers (MMs) to earn a return on the fees facilitated by the market maker, representing somewhat of a general crossover with LRC in terms of staking for fees. We can compare and contrast the rates at which LRC and ZRX were staked to their respective staking contracts. Both staking functions opened up at around the same time (0x opened up staking for MMs slightly earlier than all token holders in January 2020). By indexing growth rate by taking supply locked to total supply, we can see that LRC has a larger percentage of their network staked (~10%) than 0x (~2%).
While the staking contribution by the Loopring team clearly throttled the percentage gain over 0x (and will continue to do so from the monthly Loopring team staking for the next 1.5 years), the trajectories are nonetheless very distinct from one another with the Loopring network seeing a growing percentage of tokens being staked since inception.
Loopring Exchange
The Loopring exchange was launched in February with the goal of being an established DEX built on the Loopring protocol. Specifically, it is a non-custodial exchange that uses a centralised relayer who is responsible in batching transactions, producing a verifiable zk-SNARK proof which can be verified off-chain and then put on the Ethereum mainnet. Maker and taker fees are 0% and 0.10% respectively.
The bottom line is operators can censor trades if they choose to but it is not in their economic interest to: all exchanges have to stake LRC and this stake can be burned if the operator doesn’t play by the rules. The Loopring exchange doesn’t behave like a ‘pure’ DEX for end users - deposits and withdrawals are maintained by the DEX operator too which can sometimes take ~20 minutes to complete. While leaving a lot to be desired, these deposit and withdrawal times are dependent on prover optimisations which should improve in time.
Looking at the exchange users, the number of registered accounts has totalled 1.8k with most of the growth skewed at the start of March when the exchange was rolled out. Since the initial launch hype, the account growth has been incredibly small with <10 account typically registering per day.
If we look at the daily transactions and volume for the Loopring exchange, there is a clear concentrated cluster of activity in March. The average transaction count during this period was 8.3k per day with the highest trade count for a single day being 80k. To put this in context, Uniswap performed a total of 250k trades in March. In terms of Loopring exchange volume, it had an average of $500k with $2m trading volume seen on the 31st March alone. Cumulative volume has amounted to $22.6m which translates to ~$13.5k in protocol fees, 70% of which have gone to LRC stakers.
The reason for the period of intense activity seen during March was largely due to a trading competition set up by the Loopring team to test their zk-Rollup capabilities which rewarded users for high volume and number of trades. Since then, activity has flattened with 5-8k trades and ~$200k trading volume seen per day, although there are some very early signs that volume might be starting to break out of this flat channel.
We should also point out that a front-end bug was found on May 7th due to the risk of linking a user created password with an Ethereum address to derive a user’s account key. However, this doesn’t look to have significantly altered transaction or volume activity on the exchange.
Let’s dive deeper. We can see that the average trade size of the Loopring exchange fell to its lowest point during the trading competition - this isn’t a surprise. More interestingly, when we consider the more ‘organic’ trading volume since then, volume has increased at a slightly faster rate than transaction count. Also taking into consideration the account data above, the exchange might be used by a select few traders who are increasing their overall trading volume over time. While the exchange activity is very small in comparison to other DEXs, the trade cost savings through a zk-Rollup framework are even more salient with larger trade amounts so we might reasonably expect an ever increasing preference of fewer large trade amounts over time. This may run counter to what operators need - frequent trades to combat cost inefficiencies in transaction batching.
Additionally, we can compare volume to LRC spot price. Remember, certain aspects of LRC make it capital asset, where once users stake they have a right to a certain percentage of the volume (and thus protocol fees) through all DEXs built on Loopring. We might therefore expect a relationship between earnings and token market price. On the 16th March, the LRC price to volume ratio spiked when the daily volume dropped significantly to only $50k. Conversely, the ratio started to drop during the trading competition when volume (and fees) and before LRC started appreciating at spot. However, since the competition, the LRC spot price has grown at a faster rate than volume on the Loopring exchange (note this ratio only includes the Loopring exchange volume which is currently the only prominent exchange on Loopring).
While we’ve analysed the Loopring exchange trading activity in isolation, it is useful to compare such activity with other DEXs. Below, we’ve compared Loopring to 0x (a prominent order book based DEX) and Kyber and Uniswap (two of the leading liquidity pool based DEXs). Note, liquidity is sometimes shared between DEXs which might not be accounted for in some cases in the data calculation.
The first thing to note is that the liquidity pool models generally tend to take a larger portion of the market share than off-chain order book based DEXs which may indicate the latter is forming more of a niche within the market. Secondly, Loopring typically has 2% of the combined volume of Loopring, 0x, Kyber, and Uniswap. While it is still relatively early days for the Loopring exchange, it will be particularly interesting to see how it compares to the growth rate of 0x V3 since its launch in November 2019 as the exchange rolls out its own Loopring API to bolster liquidity on the exchange. With layer 2 complexities to consider, Loopring has to be able to attract liquidity while also providing solutions to bridge with established layer 1 DeFi applications which comes with additional complexities.
Loopring has 6 listed assets with a large percentage of them being stablecoins. In USD terms, the exchange balance (~$5 million) is very small but has benefited from dollar price appreciation of the underlying assets. ETH has the most liquidity with LRC following in second place. However, as we’ve seen stablecoin supply recently breaking $10 billion and more recently in demand for Uniswap V2 stable pairs, the Loopring team might start finding its liquidity also being driven by stablecoins too, perhaps competing with the likes of Curve.
Transaction Batching
As discussed above, one of the key features of the Loopring protocol is the ability for exchange transactions to be batched into blocks and verified with a ZK proof. This creates an unusual dynamic not seen in other DEXs where provers on Loopring exchanges have real world prover costs as well as an incentive to batch as many transactions as possible in each block committed to Ethereum’s mainnet - the upper limit to batch size is 1024 transactions. For example, Loopring has an average cost of 5k gas per transaction (was previously 40k) but when blocks are being filled with the upper limit of transactions, gas cost would be reduced to 400 gas per tx. Loopring’s model becomes more efficient with increased usage and adoption.
Throughout March and April, the majority of trade block sizes were largely 128. However, this only represents 10% of the current upper limit of what is possible. More positively, we can now see a greater variance in block sizes with 256 and 512 starting to recently take up 20% of the total blocks committed. There’s still a long way to go - the upper limit block size of 1024 still only makes up <1% of the total signifying an ongoing transaction inefficiency with the exchange from an operator’s perspective. This is what is so critical for Loopring’s exchange’s survival in the coming months - weighing up the service experience for users and cost efficiency from a business standpoint. This novel dynamic does not really exist with other DEXs.
Conclusions
While still incredibly early, Loopring represents an exciting layer 2 framework for DEXs. Over time, we should expect the prover costs to decrease while batching efficiencies to increase over time. However, attracting liquidity is a chicken and egg problem - more users have to be willing to trade on Loopring to eradicate these inefficiencies or else operators pay the ultimate cost. The problem, of course, is compounded with multiple Loopring DEXs competing for the same liquidity.
Initiatives aimed at on-boarding users like Loopring’s mobile smart wallet and API will prove to be crucial in the success of attracting liquidity. Bridging this liquidity in Loopring’s off-chain world with Ethereum’s on-chain one, however, remains an open question.
About Formal Verification
In collaboration with leading digital assets data companies, Formal Verification offers both key and concise data analysis and ecosystem research for decentralised networks and digital assets so you can be attuned to the absolute key developments both on and off the chain.
Formal Verification will be free for everyone until June 8th (hurry!). If you subscribe before June 8th, you’ll receive Formal Verification at a 20% discount forever as a special thank you for your early support. Get it locked in.