Cointime

Download App
iOS & Android

zk-SNARK vs. zk-STARK

SNARKs and STARKs are zero-knowledge proof technologies that allow one party to prove to another that a statement is true without revealing any further information.

Zero-knowledge proofs (ZKPs) have been garnering a lot of attention across an array of use cases for their transformative potential for enhancing security, protecting user privacy, and supporting scaling with layer-2 networks.

ZKPs enable one party to prove to another party that a statement is true without revealing any additional information. ZKPs are both beneficial for increasing privacy—since they reduce the amount of information shared between parties—and scalability, since they allow proofs to be verified at a faster rate than if the entire data set would have to be verified.

Two prominent zero-knowledge proof systems are SNARKs and STARKs. In this article, we’ll dive into what they are, how they work, and their key differences.

What Is a SNARK?

zk-SNARK stands for Zero-Knowledge Succinct Non-interactive Argument of Knowledge—they were introduced in a 2012 paper co-authored by Nir Bitansky, Ran Canetti, Alessandro Chiesa, and Eran Tromer. SNARKs provide the ability for one party to prove to another that they know a secret without revealing the secret itself.

zk-SNARKs can be added to distributed ledger solutions as a zero-knowledge proof protocol to enhance privacy and scalability. Zcash was the first widespread application of zk-SNARKs, applying the technology to create shielded transactions in which the sender, recipient, and amount are kept private. Shielded transactions in Zcash can be fully encrypted on the blockchain yet still be verified as valid under the network’s consensus rules by using zk-SNARKs.

An important property of some SNARKs is their reliance on a trusted setup ceremony—an event where the keys that are used to create the proofs required for private transactions and the verification of those proofs are created. If the secrets used to create the keys during the event are not destroyed, they could be utilized to create false proofs. This would give participants the ability to forge transactions or mint new tokens out of thin air in the case of a cryptocurrency. Because of the inherent privacy features of SNARKs, there would be no way to verify that the forged proofs were indeed forged. 

The security level of a SNARK is measured by the amount of work that must be done to find a convincing proof of a false statement. In other words, a SNARK is secure if it is computationally infeasible to produce a convincing proof of a false statement. For SNARKs that require a trusted setup to be considered secure, at least one participant in the ceremony has to have produced and then discarded a trapdoor that, if combined with the other trapdoors, would make it possible to compromise the security of the SNARK. As such, trusted setups are commonly run with many participants to render the possibility of this occurrence low enough.

While the trusted setup is only required initially, users of a SNARK-based network must trust that the ceremony was performed correctly and that the secrets were destroyed and are not being held by the participants of the creation event. The reliance on such a ceremony has been an area of criticism for SNARKs as a potential security Achilles heel. 

Another limitation of some SNARKs is that they are not considered to be quantum-resistant. Proponents of SNARKs argue that if quantum computers start posing a threat to SNARKs, larger issues will be at hand in the world of cryptography.

What Is a STARK?

zk-STARK stands for Zero-Knowledge Scalable Transparent Argument of Knowledge and is a zero-knowledge proof system that was introduced as an alternative to SNARKs in a 2018 paper by Eli Ben-Sasson, Iddo Bentov, Yinon Horesh, and Michael Riabzev. As stated in the paper, STARKs (and, more broadly, ZKPs) can serve an important benefit for society:

Human dignity demands that personal information, like medical and forensic data, be hidden from the public. But veils of secrecy designed to preserve privacy may also be abused to cover up lies and deceit by institutions entrusted with data, unjustly harming citizens and eroding trust in central institutions. Zero-knowledge (ZK) proof systems are an ingenious cryptographic solution to this tension between the ideals of personal privacy and institutional integrity, enforcing the latter in a way that does not compromise the former.”

STARKs underpin StarkWare’s scalability technology. By enabling developers to take storage and computation off-chain, STARKs increase scalability, as STARK proofs that verify the accuracy of off-chain computations can be produced by off-chain services and then posted on-chain. 

STARKs allow blockchains to move computations to a single off-chain STARK prover and then verify the integrity of those computations using an on-chain STARK verifier. Layer-2 networks can unlock scalability benefits by computing a large number of transactions in a single batch using STARKs and then using a single STARK proof to confirm the transactions’ validity on-chain. All of the transactions in the batch share the cost of the on-chain operation, offering a low gas cost for each individual transaction on the layer-2 network.

Importantly, as the randomness utilized by the verifier is publicly available, and the proof can be verified without relying on any external parameters, STARKs do not have the requirement of a trusted setup ceremony.

SNARKs vs. STARKs: Key Differences

Both SNARKs and STARKs have their advantages, and the choice between the two depends on the specific use case requirements of the user.  

SNARKs are considered more efficient and faster by their proponents, as they can be verified in a matter of milliseconds. However, this efficiency comes at a cost, as SNARKs rely on a potential security weak link—the trusted setup ceremony. This means that the initial parameters used in the proof must be generated in a secure environment, and any compromise of the parameters can result in a breach of security.

STARKs offer enhanced security through the non-requirement of a trusted setup but take longer to verify and are considered less efficient as a result. STARKs have larger proof sizes than SNARKs, which means that verifying STARKs may take more time and be more gas-intensive than SNARKs. On the other hand, as the proof for STARKs can be verified without relying on any external parameters, STARKs can be easier to audit than SNARKs. Unlike most SNARKs, STARKs rely on hash functions which are considered to be quantum-resistant.

STARKs are more scalable and quantum-resistant, while SNARKs are more resource-efficient.

With that said, there are several reasons why SNARKs have initially been more widely adopted than STARKs, despite having the potential security drawbacks associated with the trusted setup ceremony. SNARKs were developed six years ahead of STARKs, which helped give them a head start in terms of adoption.

Achieving Exponential Scalability With Zero-Knowledge Proofs

Zero-knowledge proofs are a foundational technology for the blockchain ecosystem that help unlock orders of magnitude more scalability while helping to preserve the privacy of individuals and the integrity of institutions. zk-SNARKS and zk-STARKS are at the forefront of this revolution, and they are both helping to unlock a wide range of use cases for public blockchain networks that were previously inaccessible, incentivizing innovation and helping create a more efficient global economy.

If you are a developer and want to integrate Chainlink trust-minimized services, check out our documentation, ask a question in Discord, or set up a call with an expert.

Comments

All Comments

Recommended for you

  • The Russian Central Bank supports the use of cryptocurrencies for international settlements and plans to promote the formulation of relevant bills

    According to Bitcoin.com, Russia supports expanding the types of currencies and payment methods for international settlements. Last week, the Governor of the Central Bank of Russia, Elvira Nabiullina, stated that the bank will support the acceleration of a bill that supports the use of cryptocurrencies for international payments. However, Nabiullina emphasized that these payments should be introduced under an experimental sandbox legal framework.It is reported that the institution has always opposed the circulation and use of cryptocurrencies for national payments because these assets are not controlled by national regulatory agencies. However, the country's central bank is open to its use for foreign settlements. In contrast, the use of national digital assets (also known as CBDC) for payments has been explored without any exploratory sandbox.

  • Tether issued $500 million in USDT yesterday and redeemed $181 million in USDT

    According to the latest data from ChainArgos, Tether (USDT) conducted a large-scale issuance and redemption activity on April 15th. A total of $500 million USDT was issued that day, while $181 million USDT was redeemed.

  • Hong Kong Securities and Futures Commission: We believe that fund companies applying for virtual asset ETFs will submit applications to the Hong Kong Stock Exchange next

    Some fund companies have expressed that they have received conditional and principle approval from the Hong Kong Securities and Futures Commission for virtual asset spot ETFs. When queried by Hong Kong media, the Hong Kong Securities and Futures Commission stated that investment products recognized by the Commission will be listed on the list of publicly available investment products on its website. The Hong Kong Securities and Futures Commission further pointed out that if the applied ETF product roughly meets the Commission's requirements, a conditional authorization will be issued, but various conditions must still be followed, including paying relevant fees, submitting documents, and obtaining approval from the Hong Kong Stock Exchange for listing. It is believed that the fund companies that have applied will submit their applications to the Hong Kong Stock Exchange for the next step.

  • Hong Kong citizens can directly use their securities accounts to purchase spot BTC and ETH without opening an account on an exchange

    The Hong Kong Securities and Futures Commission has approved at least three fund companies to collaborate with licensed exchanges, allowing citizens to purchase spot Bitcoin and Ethereum with securities accounts. Currently, investors who want to buy virtual currencies need to open an account at a virtual currency exchange. Multiple fund companies have announced that they have obtained licenses from the Hong Kong Securities and Futures Commission and are collaborating with two licensed exchanges on the market to launch virtual asset fund products, which means that citizens can directly use securities accounts to purchase spot Bitcoin and Ethereum without the need to open an account at an exchange. Some industry insiders believe that this measure will help promote the development of virtual asset trading and increase tax revenue.

  • CZ will be sentenced in the U.S. District Court for the Western District of Washington on April 30

    On April 16th, it was reported that former CEO of Binance, CZ, will receive a sentence on April 30th at the federal district court in the Western District of Washington, USA. Judge Richard Jones will hear statements from the prosecutor and CZ's lawyers. In November 2023, he pleaded guilty to violating the Bank Secrecy Act by failing to maintain effective anti-money laundering procedures.

  • Grayscale GBTC assets under management fall below $20 billion

    Official data from Grayscale shows that as of April 15th, GBTC holds 311,621.1013 BTC, and its asset management scale (non-GAAP) has fallen below $20 billion, reaching $19,747,454,120.96, with circulating shares dropping to 349,830,100.

  • In the past 24 hours, the entire network has liquidated $276 million

    According to Coinglass data, Golden Finance reported that there were liquidations of 276 million US dollars in the past 24 hours, including 202 million US dollars in long positions and approximately 73.83 million US dollars in short positions. Among them, Bitcoin liquidated approximately 79.1762 million US dollars and Ethereum liquidated approximately 67.9918 million US dollars.

  • Bloomberg: This Bitcoin halving may have an impact of about tens of billions of dollars on cryptocurrency miners

    Bloomberg stated that the next Bitcoin "halving" is expected to occur around April 20th. This will result in a 50% reduction in the amount of Bitcoin that miners can earn through verifying transactions each day. The upcoming Bitcoin halving could cause a loss of billions of dollars for cryptocurrency miners. In addition, competition for discounted electricity among artificial intelligence companies is becoming increasingly fierce, which will also lead to a decrease in revenue for Bitcoin mining companies after costs soar.

  • Avalon, an Orlando-based game studio, secures $10m funding for debut multiplayer online game with web2 and web3 appeal.

    Orlando-based game studio Avalon has secured $10m in funding from investors including Bitkraft Ventures, Hashed, Coinbase Ventures, Spartan Capital, Foresight Ventures, LiquidX, and Momentum6. The funds will be used to develop Avalon's debut title, a multiplayer online game that allows for interoperability of assets and progression between worlds for both web2 and web3 gamers. The game is designed to allow players to create, share, play, and take ownership of their experiences, with characters that interact in real-time through a partnership with artificial intelligence pioneers Didimo and Inworld AI. The game is currently being developed for PC and cloud streaming.

  • Uniswap daily trading volume climbs and exceeds $3 billion mark

    According to The Block shows that despite receiving a Wells notice from the SEC on April 10th, Uniswap's daily trading volume continued to rise over the weekend, breaking the $3 billion mark. Uniswap founder Hayden Adams posted on X that he was not surprised by the Wells notice and is "ready to fight." It is reported that the US cryptocurrency exchange Coinbase received a Wells notice in March 2023, but there has been no progress so far.