How to use zero-knowledge cryptography to solve DeFi performance issues?

How to use zero-knowledge cryptography to solve DeFi performance issues?

By Brad Behrens

What is DeFi

Decentralized Finance (DeFi) is an emerging ecosystem, primarily on Ethereum, consisting of protocols that aim to make traditional financial services permissionless and non-custodial. Many people refer to DeFi protocols as "financial building blocks" because each protocol is a modular financial primitive with the ability to interoperate with other protocols, enabling the creation of novel financial services. These emerging financial services include decentralized exchanges (DEXs) such as Uniswap, which replaces the traditional order book model with an automated market maker (AMM) to match trades in a non-custodial manner, synthetic assets provided by the Synthetix protocol that are exposed to real-world assets on-chain, and lending protocols such as Aave and Compound.

Demand for DeFi and the competitiveness of the fee market

DeFi has found a clear product-market fit, and there is no sign of abating the demand for crypto assets to generate profits by earning yields and using DEX to facilitate token exchanges. The increasing demand has had a significant impact on the network, with users increasing gas fees to incentivize miners to prioritize transactions.

Monthly DEX volume by project: https://www.duneanalytics.com/

The incentive to increase transaction fees to take advantage of market opportunities (such as newly launched governance tokens or providing liquidity to earn yield on pooled assets) will always exist as it is the natural behavior in any market that follows monetary incentives. However, the problem arises when the protocol has not yet migrated to the 2.0 architecture, which will significantly increase the throughput of the main chain through sharding. This transactions/second bottleneck that caused network congestion in 2017 through the launch of non-fungible tokens (NFT) CryptoKitties is now more relevant than ever to real economic activity in DeFi applications.

YAM protocol launched

It seems like every week a new DeFi project launches, proposing a novel monetary experiment that offers attractive yield opportunities to early adopters. The most recent project to launch is the Yam protocol, which combines an elastic supply mechanism inspired by Ampleforth to maintain the USD peg, a treasury to store yCRV as supply expands, on-chain governance from the start of deployment, and a fair token distribution model inspired by YFI where there are no front-end miners or VC interests.

Gas prices during the launch of the YAM project: https://ethgasstation.info/

At its peak, the total value locked (TVL) of the YAM farming pool, which consists of several governance tokens such as YFI, COMP, and MKR, accumulated digital assets equivalent to $606.3 million in less than 24 hours. Although these contracts are a combination of Synthetix's reward/staking protocol contracts and Compound's on-chain governance contracts; the protocol has not been formally audited and may pose unforeseen security risks to participants and on-chain governance of multiple DeFi protocols. Therefore, it can be said that TVL is rapidly accumulated based on an unaudited contract simply for the pursuit of high-yield opportunities.

Total value locked in the Yam protocol (USD): https://yam.zippo.io/

DeFi Vision

DeFi’s value proposition has always been to create permissionless, non-custodial financial services with a low barrier to entry to achieve the goal of “banking the unbanked.” This vision is slowly being eroded by the increased barriers to entry for small market participants due to the competitiveness of the market and the current scalability limitations of the network. Since these scalability limitations will remain in place until the launch of Phase 1 of 2.0, the DeFi space will be forced to adapt by implementing layer 2 scalability solutions or risk sacrificing its vision of creating a permissionless, low barrier to entry financial system.

DeFi uses zero-knowledge cryptography technology

Layer2 scalability solutions aim to reduce on-chain transaction volume, i.e., reduce on-chain computation by adopting cryptographic schemes that ensure the same security and finality as on-chain transactions. The central demand point of the DeFi ecosystem is the DEX, which facilitates token exchanges and allows participants who choose to deposit crypto assets as a means of providing liquidity to facilitate low-slippage transactions, thereby earning rewards in the form of trading fees, governance tokens, or crypto asset yields. Therefore, the first focus in order to fully scale up to reduce the demand pressure on block space is on this central infrastructure.

ZK-Rollup

A prominent Layer 2 scalability solution is ZK-Rollup, where a group of transactions can be encrypted together into a single transaction through zk-snark. The basic premise of this structure is to recognize the fact that transaction data contains 13 bytes (to, from, value, fee, nonce), because digital signatures contain 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 verifies that the digital signature of each transaction is correct. Then a zk-snark proof is constructed to prove that each state transition from the previous state to the next state of the transaction set is valid, which allows the state transition to be executed off-chain at a lower cost.

This Layer 2 construction is important for platforms that require high throughput, fast settlement times, and cheap transaction fees. Modern DEXs meet all of these requirements and are subject to competition in the fee market due to the high demand for block space, reliance on allocated transaction fees while waiting for transaction confirmations, and the multiple transactions required to exchange ERC20 tokens.

Loopring Protocol v3.0 has implemented a zk-rollup construction with the main chain as the single source of truth for transaction data, commonly known as data availability in Layer2 scalability, and achieved a significant throughput of 2025 tx/s and a settlement cost of $0.0002/transaction or $150/million transactions. However, analysis of DEXs on Loopring does not realize the potential provided by the zk-rollup construction, as most DEX trading volumes are dominated by Uniswap and Curve, as their incentives are to attract and maintain liquidity for low slippage transactions.

Cycle transactions processed every day: https://www.duneanalytics.com/

Optimistic Rollup

Optimistic Rollup is another Layer 2 scalability solution that does not use zero-knowledge cryptography to generate concise proofs to reduce on-chain computation, but instead relies on a mechanism called fraud proofs to counter malicious commitments of the state root to the main chain. Fraud proofs refer to mechanisms that prove that the state transitions made by the aggregator (the entity responsible for the off-chain transaction Rollup) are fraudulent, and lead to the rollback of the Rollup sidechain.

Aggregators are incentivized to provide correct commitments by the fact that they are bound in an on-chain rolled-up smart contract, and if fraudulent commitments are made, which can be proven through fraud, the aggregator will receive a financial penalty for malicious behavior.

Synthetix OVM Swap Demo

Optimism has developed an Optimistic Rollup solution that uses Optimistic's virtual machine (OVM) as a Layer 2 runtime for smart contracts that can be executed on the 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 a 143x reduction in gas costs for transaction execution, as well as user experience advantages of fast transaction confirmations and reduced oracle update delays.

SNX Layer2 exchange statistics using OVM: https://medium.com/ethereum-optimism/synthetix-exchange-meets-the-ovm-2de3a572d6df

Fuel Optimistic Rollup

Fuel Labs has developed a highly optimized UTXO-based Optimistic Rollup for fast, secure, and low-cost ERC20 swaps. The layer 2 protocol is permissionless and non-custodial, which means that DEXs designed for ERC20 can use Fuel’s optimized rollup as their base layer. Fuel v1 includes 100k transfers on the Ropsten benchmark, which costs about $8,343 at 150gwei. The integration of BLS signatures improves on Bitcoin ECDSA, where each digital signature must be independently verified, and BIP 0340 Schnorr signatures comb all digital signatures and public keys in a transaction into a single key and signature; BLS signatures combine all signatures within a block. The scalability benefits of implementing this signature to UTXO optimistic rollovers will reduce costs by about (4-8x) and increase throughput to about 2-2.5k transactions/second.

Fuel v1 Ropsten results: https://docs.fuel.sh/v1.0.0/Introduction/Benchmarks.html

Summarize

The current state of the DeFi ecosystem is affected by the inherent scalability issues of the Ethereum mainchain and is sacrificing its vision of building a more inclusive financial system. Increasing the competitive market for block space by raising transaction fees is increasing the barrier to entry for small market participants, which is exactly the demographic that DeFi protocols are meant to penetrate.

DeFi protocols can leverage zero-knowledge cryptography through Layer2 Rollup solutions, which can aggregate transactions and significantly reduce gas fees by replacing zk-snark proofs that verify state transitions executed off-chain. Layer2 Rollup solutions not only have significant scalability advantages, but also improve user experience through instant transactions. The future DEX will be lightning fast and gas-free.

<<:  Filecoin releases the most stringent mining model. What should we do if 80% of mining machine manufacturers may stop buying cloud computing power? (POC Series 5)

>>:  [New] [DeFi Mining-SUN] Use Bitpie wallet to participate in SUN mining (TRON system)

Recommend

Which women are beautiful but have bad luck according to their faces?

Yao Beina’s untimely death saddened many of her f...

The facial features of men who are particularly prone to offend others in life

Emotional intelligence has always been a point th...

The biggest theft in history: Bybit hacker funds tracking

On February 21, 2025, Dubai-based cryptocurrency ...

Will a woman with a mole on her left shoulder be a good wife?

Is it good for a woman to have a mole on her shou...

How to tell your fate by your cheeks

How to tell your fate by your cheeks 1. People wi...

Celebrity face analysis: Does Xu Jinglei have a good face?

As one of the earliest people to show her image a...

Men who work hard but have no luck are destined to achieve nothing.

Behind every successful person there are a lot of...

The face and palm of a person who cannot save money

The face and palm of a person who cannot save mon...

What does a mole on the corner of the mouth mean?

People with moles on their lips and around their ...

The wisdom line shows career direction from palmistry

The wisdom line shows career direction from palmi...

What does a loving person look like?

Sometimes, if we want to judge whether a person i...

kk

sghkuhdf iu...

Is a square-faced girl good looking? Is a square-faced woman's fate good or bad?

Girls with square faces and strong noses If a wom...

Women with elephant eyes are kind and generous.

Are women with elephant eyes good or bad? As the ...