How to solve DeFi performance problems with zero-knowledge cryptography?

What is DeFi

Decentralized finance (DeFi) is an emerging ecosystem , mainly on top, composed of agreements, and aims to make traditional financial services a permissionless and non-custodial service. A lot of people will DeFi agreement known as the “Golden Financial building blocks” , because each protocol are modular financial primitive, have the ability to interoperate with other agreements, to create a new financial services. These emerging financial services include decentralized exchanges (DEX), such as Uniswap, which replaced the traditional order book model with automated market makers (AMM), matched transactions in a non-custodial manner, and provided synthetic assets through the Synthetix protocol. Assets on the chain exposed to the real world, as well as lending protocols, such as Aave and Compound.

Demand for DeFi and Competitiveness of the Charged Market

DeFi has found a clear fit between its products and the market . By earning yields and using DEX to facilitate token exchange, there is no sign of a decrease in the demand for crypto assets to generate benefits. The increase in demand has had a great impact on the network, and users have increased gas fees to encourage miners to prioritize package transactions.

159904611138477Monthly DEX volume by project:

The motivation to increase transaction fees to take advantage of market opportunities (such as newly launched governance tokens or provide liquidity to earn the rate of return on pooled assets) will always exist, because this is a natural behavior that follows monetary incentives in any market . However, when the protocol has not yet migrated to the 2.0 architecture, problems arise. The 2.0 architecture will greatly increase the throughput of the main chain through sharding. The transaction/second bottleneck of network congestion caused by the launch of Non-Homogeneous Token (NFT) CryptoKitties in 2017 is now more relevant to the real economic activities in DeFi applications than ever before.

YAM protocol started

It seems that a new DeFi project will be launched every week, proposing a novel currency experiment to provide attractive income opportunities for early participants. The most recently launched project is the Yam protocol, which combines a flexible supply mechanism inspired by Ampleforth to maintain the dollar peg, to store yCRV vaults during supply expansion, on-chain governance from deployment, and fair token distribution inspired by YFI Model, in which there is no former mine or VC interest.


Gas price during YAM project launch:

At the peak, the total value (TVL) of the YAM farming pool locked up by several governance tokens such as YFI, COMP and MKR accumulated in less than 24 hours equivalent to 606.3 million U.S. dollars in Crypto assets . Although these contracts are a combination of Synthetix’s reward/staking agreement contract and Compound’s on-chain governance contract; however, the agreement has not been formally audited, which may cause unforeseen circumstances for multiple DeFi protocol participants and on-chain governance Security Risk. Therefore, it can be said that based on an unaudited contract, TVL is quickly accumulated just for the pursuit of high-yield opportunities.

159904611259429The total value locked in the Yam protocol (USD):

DeFi vision

DeFi value proposition has always been to create a free license , unmanaged financial services, and to achieve low barriers to entry “for the people without bank accounts to provide banking services,” the goal . Due to the competitiveness of the market and the current scalability of the network, the barriers to entry for small market participants have increased, and this vision is slowly being weakened. Since these scalability limitations will still exist before the first phase of 2.0 is launched, the DeFi field will be forced to adapt by implementing a layer 2 scalability solution, otherwise it may sacrifice its vision to create a permissionless Financial system with low barriers to entry .

DeFi uses zero-knowledge cryptography technology

The Layer2 scalability solution aims to reduce the amount of on-chain transactions, that is, to reduce the amount of on-chain calculations by adopting an encryption scheme that ensures the same security and finality as on-chain transactions. The central demand point of the DeFi ecosystem is DEX , which facilitates the exchange of tokens and allows participants who choose to deposit crypto assets as a means of providing liquidity to promote low slippage transactions, thereby using transaction fees, governance tokens or Earn rewards in the form of yield on crypto assets. Therefore, in order to fully expand the scale to reduce the demand pressure on the block space, the primary concern is this central infrastructure.


A prominent Layer 2 scalability solution is ZK-Rollup, in which a group of transactions can be crypto and packaged together into a single transaction through zk-snark . The basic premise of this structure is to acknowledge the fact that the transaction data contains 13 bytes (to, from, value, fee, nonce), because the Crypto signature contains 32-96 bytes, which requires more gas to verify each transaction.

The ZK-Rollup structure involves a Relayer node collecting a set of transactions t[1], t[2], …, t[n], and he verifies whether the Crypto signature of each transaction is correct. Then construct a zk-snark proof to prove that each state transition from the previous state to the back state of the transaction set is valid, which allows the state transition to be performed off-chain at a lower cost.

This Layer 2 structure is very important for platforms that require high throughput, fast settlement time, and cheap transaction fees . Modern DEX meets all of these requirements and is affected by competition in the fee market due to the high demand for block space, as well as relying on the allocated transaction fees while waiting for transaction confirmation and the multiple transactions required to exchange ERC20 tokens.

Loopring protocol v3.0 has realized the zk-rollup structure with the main chain as the single source of truth for transaction data, commonly known as the data availability in Layer 2 scalability, and has achieved a significant throughput of 2025 tx/s and 0.0002 USD/transaction or The settlement cost of 150 USD/million transactions. However, the analysis on Loopring’s DEX did not realize the potential provided by the zk-rollup structure, because most DEX trading volume is dominated by Uniswap and Curve, because their incentives are to attract and maintain low slippage trading flows. Sex.

159904611220215Recurring transactions processed daily:

Optimistic Rollup

Optimistic Rollup is another Layer 2 scalability solution. It does not use zero-knowledge cryptography to generate concise proofs to reduce the amount of calculations on the chain. Instead, it relies on a mechanism called fraud proofs to combat state root pairs. Malicious promise of the main chain . Fraud proof refers to a mechanism that proves that the state transition performed by the aggregator (the entity responsible for the off-chain transaction Rollup) is fraudulent and causes the rollup of the Rollup side chain.

The aggregator is motivated by rolling up the facts bound in the smart contract on the chain to provide the correct promise. If a fraudulent promise is made, it can be proved by fraud, and the aggregator will receive financial penalties for malicious behavior.

Synthetix OVM exchange demo

Optimism has developed an Optimistic Rollup solution, which uses Optimistic Virtual Machine (OVM) as a Layer 2 operating environment for smart contracts that can be executed on a virtual machine (EVM). The Synthetix protocol launched an experimental trading competition on a Layer 2 exchange, using OVM to take advantage of increased scalability, which is reflected in the gas cost of transaction execution reduced by 143 times, as well as rapid transaction confirmation and reduced oracle update delays. User experience advantage.


SNX Layer2 exchange statistics using OVM:

Fuel Optimistic Rollup

Fuel Labs has developed a highly optimized UTXO-based Optimistic Rollup for fast, safe and low-cost ERC20 exchange. The Layer2 protocol is permissionless and non-custodial, which means that DEX designed for ERC20 can use Fuel’s optimized rollup as its base layer. Fuel v1 includes 100,000 transfers on the Ropsten benchmark, and in the case of 150gwei, the cost is approximately $8,343. The integration of BLS signatures improves Bitcoin ECDSA, where each Crypto signature must be independently verified. The BIP 0340 Schnorr signature combines all Crypto signatures and public keys in the transaction into a single key and signature; BLS signature combines a block All signatures within. The scalability advantage of implementing this signature to UTXO optimistic extension will reduce the cost by about (4-8 times) and increase the throughput to about 2-2.5k transactions/sec.


Fuel v1 Ropsten results:

to sum up

The current state of the DeFi ecosystem is affected by the scalability issues inherent in the Ethereum main chain and is sacrificing its vision of building a more inclusive financial system. Increasing the competitive market of block space by increasing transaction costs is increasing the barriers to entry for small market participants. This is exactly the population that the DeFi protocol intends to penetrate.

The DeFi protocol can utilize zero-knowledge cryptography through the Layer 2 Rollup solution , and can aggregate transactions and significantly reduce gas fees by replacing the zk-snark proof of state transitions performed outside the verification chain. The Layer2 Rollup solution not only has significant scalability advantages, but also improves user experience through instant transactions. The future DEX will be lightning fast and gas-free.

Leave a Reply
Related Posts

US SEC and Ripple file for expedited judgment

The parties presented sufficient positional evidence to the Southern District of New York court within two years to reach a summary judgment. If a federal judge accepts the SEC and Ripple’s petition, he will have to dismiss the lawsuit or admit to…
Read More