Can Trendy Cryptography Tools Help DeFi?
Editor's Note: This article comes fromEthereum enthusiasts (ID: ethfans)Editor's Note: This article comes from

Ethereum enthusiasts (ID: ethfans)
Ethereum enthusiasts (ID: ethfans)
The decentralized finance (DeFi) movement has vowed to level the financial world, making it fairer and more transparent. However, for DeFi to achieve this goal on a global scale, decentralized blockchains like Ethereum need to scale throughput! This means that we need to use new cryptographic proof schemes (some people will collectively refer to these schemes as "zero-knowledge proofs", "ZKP").
In this article, we will explain the current challenges facing decentralized cryptocurrencies, the path of various cryptographic proof systems to solve these problems, and why zk-STARK is the most suitable for solving this problem.
secondary title
text
We live in an era of ever-increasing throughput of computer systems. Everything from bandwidth, to storage space, to the number of pixels on a screen is constantly improving. So why is it so difficult to increase the transaction processing speed (measured in TPS "transactions per second") of Bitcoin and Ethereum?
The answer is that we also want to ensure decentralization. The prerequisite for the blockchain to remain permission-free is that every user with an ordinary laptop can verify the integrity of the transaction history. There is a core principle here, which we call "inclusive accountability", which means: we cannot rush to increase the processing power of the system, otherwise it will degenerate into a centralized payment system with only a few chaebols The kind that controls (that is, "the current financial system").
image description
Therefore, all scaling schemes, including Plasma, Optimistic Rollup, and our approach (based on cryptographic proof systems, often referred to as ZK Rollup schemes), introduce two distinct classes of entities: a small group of "powerful" parties , need to invest a lot of resources to perform intensive calculations; there is also a large group of nodes, which are responsible for verifying transactions and ensuring that the calculation results generated by powerful participants are auditable.
How can throughput be scaled while ensuring decentralization? Then let the powerful participants do the calculations, and the weak participation guarantees to ensure auditability. It doesn't matter whether the powerful participants are malicious or not, what matters is that the weak participants can guarantee accountability!
Before diving into the details, let's take a look at cryptographic proof systems.
secondary title
You need to know something about cryptographic proof systems
The cryptographic proof system was founded in 1980; its great value to the access-free blockchain has led to a Cambrian explosion of new theoretical constructions and new protocols in the blockchain field in recent years. In the following, we only focus on STARK, which is also a type of proof scheme that our StarkWare team intends to bring to the market.
There are usually two types of roles in cryptographic proof systems: prover and verifier.
Prover: The prover wants to prove to the verifier that a certain computational statement is correct, eg "I have processed these 10,000 transactions and the resulting database hash is X". The verifier provides a proof of this computational statement and sends it to the verifier.
Notice! In a cryptographic proof system like STARK, the computational burden of the prover and verifier is asymmetrical!
Compared with simply executing the original calculation process, the calculation overhead of the prover is much larger; on the contrary, the verifier has to benefit from the huge overhead paid by the verifier, and the calculation amount to be performed by the verifier is smaller than the original calculation process Much more, for example, if 10,000 transactions originally need to be executed, then the verifier only needs to pay the computational overhead of 10 transactions.
So, in what ways can today's cryptographic proof system help DeFi?
scalability Privacy fairness
fairness
We come one by one.
text
1. Improve scalability with STARK
We return to the fundamental challenge: scaling Ethereum throughput while maintaining inclusivity and accountability. We need a technique that can greatly increase throughput (by distributing the computational burden to a small number of "strong actors"), while many "weak actors" can fully verify the computational integrity of these strong actors. ), and it will not increase the burden on weak players. Other extension schemes, such as Plasma and Optimistic Rollup, rely on Fraud Proof, and we have explained in this article why the cryptographic proof system is a better solution (Editor's Note: Chinese translation see the hyperlink at the end of the article "Validity Proofs vs. Falseness Proofs").
Using STARK's scalability (the speed of verification is exponential in the speed of constructing proofs), we can boldly make any powerful entity a prover, even Darth Vader & Sons (Daily Wars) The puppet controlled by the villain is also no problem. The key here is that a strong prover must attach a concise proof to all his operations, and all weak nodes can easily verify these proofs. Thus, with STARK (and other cryptographic proof systems), we can guarantee inclusive accountability while providing almost unlimited throughput scaling (strictly speaking, we "can only" scale exponentially) .
To be more specific, the basis of the ZK Rollup scalability solution is to allow large computing tasks (or a large number of small computing tasks) to be executed off-chain, and the off-chain computing resources are much more abundant; then the computing execution process is generated Proofs of validity are sent to the blockchain (along with a commitment to the new state); these proofs are then verified by a validator smart contract. After verification, network participants can trust that the entire computation is valid (without trusting any single entity). It is precisely because we do not have any trust assumptions that we can fairly accept a proof of validity, even if it is issued by Darth Vader.
None of this is on paper anymore: using StarkEx, our scaling engine, we've achieved a throughput of over 9,000 self-custodial transactions per second (a 2,000x improvement over the Ethereum mainnet )! And, this is not the limit: we are not limited by blockchain resources, only by cloud resources.
The first DeversiFi decentralized exchange powered by the StarkEx engine will go live next week. Moreover, an NFT exchange supported by StarkEx is also under intensive development, which will be able to support the transaction of in-game assets.
2. ZKP enhances privacy
Improving transaction processing speed is not a sufficient condition for public chains to become popular. We also need privacy.
The pioneers of public chains have discovered the benefits of ZKP for privacy before discovering the benefits of ZKP for scalability. The Zcash blockchain, launched in 2016, is the first system to provide shielded transactions using the ZKP scheme.
Privacy is also critical to achieving an efficient market. When trading in the market, traders want to be free and not give away their own unique information. Permission-free blocks (and DeFi) are completely transparent by design: in order to allow all small nodes to verify the state of the blockchain without introducing any trust assumptions, all transactions will be made public on the chain.
So the challenge is: how can privacy be achieved without sacrificing the trustless nature of DeFi? You can take advantage of the zero-knowledge property of ZKP!
As mentioned above, zero-knowledge proofs allow us to prove a computational statement without disclosing private inputs. This property, applied to the blockchain, allows unique information to be included in private inputs that are not exposed by evidence at all. The result is a happy ending: privacy is preserved, and anyone can verify the state of the blockchain without introducing trust assumptions, perfect.
text
text
Note: Privacy does not mean anti-regulation. The need for privacy by market participants can coexist with the need for regulators to observe and monitor the health of the market. As an example: instead of sharing all of its ledgers with tax collectors, a business could create a zero-knowledge proof that it paid taxes. Businesses' privacy is protected, and regulators can be confident that taxes have been collected (an example of this can also be found here).
3. ZKP enhances fairness
The fairness of the market is not only meaningful in philosophical speculation. Traders stay away from venues they perceive as unfair, so fairness helps liquidity. There are many ways to damage the fairness of the market, but most of them include system operators (such as the exchange itself) abusing the right to know in advance as one of the links. ZKP can help participants ensure that operators cannot abuse their privileges or favoritism.
A notable example is front-running. Frontrunning is when market makers use advance information to trade before others know that information, which is illegal. Regarding the impact of front-running trading on the market, everyone's estimates vary, but the generally accepted conclusion is that the impact is huge and not conducive to market efficiency.
text
ZKP can solve the problem of front-running transactions, because the privacy protection of traders can not only prevent other traders, but also the operator cannot see through it-this ensures that the operator cannot use the privilege of knowing for profit, allowing the operator to return to its original position. original location. We would love to see such a solution.
secondary title


