# zkSNARKs vs zkSTARKs: a primer

By [pseudotheos](https://paragraph.com/@pseudotheos) · 2022-01-18

---

Trying out a longer form article this time to allow a deeper dive into some areas of blockchain research. There are a lot of articles on zero knowledge proofs, and a lot of research papers on SNARKs or STARKs, but very little bridging the intermediate gap.

If you haven’t read my introduction to zero knowledge proofs Twitter thread, I strongly recommend it before going further, as a lot of this article builds on top of it.

[![User Avatar](https://storage.googleapis.com/papyrus_images/5ac29cba4b266d09d11b0a2e892a16415ba62b2a0f7d62862b968ed11be37781.jpg)](https://twitter.com/pseudotheos)

[pseudo 🇺🇦](https://twitter.com/pseudotheos)

[@pseudotheos](https://twitter.com/pseudotheos)

[![Twitter Logo](https://paragraph.com/editor/twitter/logo.png)](https://twitter.com/pseudotheos/status/1476380179966615557)

all these zk terms... what do they mean? what's the big deal with zk proofs?  
  
a quick ![🧵](https://abs-0.twimg.com/emoji/v2/72x72/1f9f5.png)breaking it down: ![👇](https://abs-0.twimg.com/emoji/v2/72x72/1f447.png)

 [![Like Icon](https://paragraph.com/editor/twitter/heart.png) 572](https://twitter.com/pseudotheos/status/1476380179966615557)[

8:30 PM • Dec 29, 2021

](https://twitter.com/pseudotheos/status/1476380179966615557)

The first introduction of a zero-knowledge proof was in a [1985 MIT paper](https://people.csail.mit.edu/silvio/Selected%20Scientific%20Papers/Proof%20Systems/The_Knowledge_Complexity_Of_Interactive_Proof_Systems.pdf) (PDF warning) by Shafi Goldwasser and Silvio Micali (who later founded [Algorand](https://www.algorand.com/)).

zkSNARKs and zkSTARKs are implementations of non-interactive zero knowledge proofs, which means that the prover does not need to disclose the data to the verifier. Non-interactive means that the prover only needs to send a single message to the verifier, instead of back-and-forth communication. This makes it possible for a blockchain to utilize ZK proofs, as blockchains are one-way. Once the block is produced, it is immutable.

There are two methods of zero-knowledge proofs that are currently being implemented with blockchain tech: zkSNARKs and zkSTARKs. In the Ethereum rollup space, there are two leaders: [zkSync](https://zksync.io/) is using zkSNARKs, and [StarkWare](https://starkware.co/) is using zkSTARKs. In addition to these two, there is [Loopring](https://loopring.io/), [Aztec](https://aztec.network/), [Polygon Hermez](https://hermez.io/) (SNARKs), [Polygon Miden](https://github.com/maticnetwork/miden) (STARKs), and many more. You can find a full list on [zkrollups.xyz](https://www.zkrollups.xyz/). Regardless of the implementation of SNARKs vs STARKs, all rollups solve the same problem and should be thought of less as competitors and more as collaborators both helping advance and scale Ethereum through different means.

### Introducing zkSNARKs

zkSNARK is an acronym: Zero-Knowledge Succinct Non-interactive Argument of Knowledge. Stemming from a [2012 UC Berkeley paper](https://dl.acm.org/doi/10.1145/2090236.2090263) by Alessandro Chiesa, zkSNARKs use elliptic curves to secure the randomness required for a proof.

Elliptic curves are collision resistant, which means that it is _very hard_ to find two separate inputs that produce the same output. If you’re interested in learning more about how elliptic curves work in regards to cryptography, this video is a great introduction.

[![]({{DOMAIN}}/editor/youtube/play.png)](https://www.youtube.com/watch?v=NF1pwjL9-DE)

zkSNARKs were first introduced in blockchain by Zcash, a fork of Bitcoin. Because SNARKs have been around longer, they have a lot of documentation, tooling, and are easier to get into as a developer compared to STARKs. There are some downsides to existing implementations, such as no post-quantum resistance (a problem for the next decade) and initial trust requirements. Regardless of the downsides, SNARKs offer much more than optimistic rollups, as shown below.

![source: Matter Labs](https://storage.googleapis.com/papyrus_images/5c02c94db86fd6510570afba5cbbcbc02db8f9441fdcdd88915f1f9b48c99e52.png)

source: Matter Labs

One issue with SNARKs is that they usually require a trusted setup. To mitigate the trust problem, zkSync has introduced a [universal trusted setup](https://blog.matter-labs.io/zksync-is-live-bringing-trustless-scalable-payments-to-ethereum-9c634b3e6823) for zkSync v1, which is much more secure compared to previous application-specific setups. Previous implementations required a lot more trust, as well as another setup for every future update of the protocol. Recently, [DARKs were introduced](https://eprint.iacr.org/2019/1229) ([and later modified for security](https://eprint.iacr.org/2021/358)) which remove the need for a trusted setup. zkSync has been working on [Redshift](https://eprint.iacr.org/2019/1400), which solves both the trusted setup problem as well as provides post-quantum security. Once this has been properly reviewed and battle-tested, it will be implemented into zkSync.

### zkSTARKs

Being much more recent, zkSTARKs have less tooling and developer support, but that is starting to change. [Introduced in 2018](https://eprint.iacr.org/2018/046.pdf) (PDF warning) by Eli Ben-Sasson, Iddo Bentov, Yinon Horeshy and Michael Riabzev, STARKs operate differently under the hood. zkSTARK is an acronym for Zero-Knowledge Scalable Transparent ARguments of Knowledge. The main difference between SNARKs and STARKs is that a STARK uses collision resistant hash functions instead of elliptic curves. There are some downsides to STARKs as well, mainly that proof sizes are much larger than a SNARK proof, and take longer to verify as well as cost more gas. This tradeoff is worth it, however, because the effective TPS and throughput ceiling is much higher than a SNARK.

STARKs are more scalable than SNARKs, and with [Validiums](https://ethereum.org/en/developers/docs/scaling/validium/), which store data off-chain, the gas ceiling that developers have had to deal with on L1s is effectively gone. Here’s an example of a 3d model stored on a zkSTARK rollup, something that is impossible on a L1.

[![User Avatar](https://storage.googleapis.com/papyrus_images/09c7c52105478735f7602d464b1595436041d05472724b63b14f445a06d4426b.jpg)](https://twitter.com/guiltygyoza)

[guiltygyoza](https://twitter.com/guiltygyoza)

[@guiltygyoza](https://twitter.com/guiltygyoza)

[![Twitter Logo](https://paragraph.com/editor/twitter/logo.png)](https://twitter.com/guiltygyoza/status/1477950243266527236)

Bringing 3D graphics to [#StarkNet](https://twitter.com/hashtag/StarkNet) - Axie #44 and #42 in the same scene host in cairo contracts (axies owned by [@Axie44](https://twitter.com/Axie44), modeling work by [@MonsterSea7](https://twitter.com/MonsterSea7)). Demo run in local pytest environment where the client retrieves and renders the gltf. Obviously working towards interoperability

![](https://pbs.twimg.com/ext_tw_video_thumb/1477949581296308225/pu/img/jOqZkCGpG4I3qx79.jpg)

 [![Like Icon](https://paragraph.com/editor/twitter/heart.png) 257](https://twitter.com/guiltygyoza/status/1477950243266527236)[

4:29 AM • Jan 3, 2022

](https://twitter.com/guiltygyoza/status/1477950243266527236)

### Comparisons

The levels in the charts below refer to complexity of arithmetic circuits. Each level is roughly 55x more complex than the previous level. In these examples, the difficulty slope for zkSTARKs rises much slower than SNARKs. As TPS and throughput increase, so does complexity. Even though zkSNARKs are less scalable, they are still magnitudes more scalable than existing L1s. Right now, zkSync can manage 3000 TPS with the same security guarantees as a L1 Ethereum transaction. With zkPorter, zkSync’s [Validium](https://ethereum.org/en/developers/docs/scaling/validium/) solution, it can settle 50,000+ TPS.

![source: ZK-STARK whitepaper and Adam Luciano](https://storage.googleapis.com/papyrus_images/75595ae60c30498c7dadc59630d298d64002003d864d3912c88af5c5327204ee.png)

source: ZK-STARK whitepaper and Adam Luciano

![source: ZK-STARK whitepaper and Adam Luciano](https://storage.googleapis.com/papyrus_images/cd2c8f1f0cf225dd94ca91b0caaf7890a2dd1651371dfbe2b5074b172c28fb12.png)

source: ZK-STARK whitepaper and Adam Luciano

![source: ZK-STARK whitepaper and Adam Luciano](https://storage.googleapis.com/papyrus_images/4a289045a292e70380db79582f0f955de7f017aa961cfcc43569483769bba3ea.png)

source: ZK-STARK whitepaper and Adam Luciano

![source: Matter Labs](https://storage.googleapis.com/papyrus_images/f9d5347a24d9ad080acf8128c78186e957b34d5454a01e5be72ef0c53463bc02.png)

source: Matter Labs

### Beyond L2s

Scalability is very close to becoming infinite, which will open the doors to a truly trustless, fast, and low-cost application layer secured by Ethereum. StarkWare is working on [recursive STARKs known as L3s](https://medium.com/starkware/fractal-scaling-from-l2-to-l3-7fe238ecfb4f) which stretch scaling even further.

![source: StarkWare](https://storage.googleapis.com/papyrus_images/b45067fc7f9cff7b7af6d6a0fb62de63893684644f72a1844caa2eefcfd760da.png)

source: StarkWare

### Conclusion

The zero knowledge space is still an area of active research, and there is still a lot of work to be done before we reach the [Endgame](https://vitalik.ca/general/2021/12/06/endgame.html), but the tech is advancing rapidly and moving away from the Layer 1 wars towards a rollup-centric future.

_Thanks for reading this article! This is the summation of a lot of research and my first longer article to help bridge the gap between research and the average user._ [_Follow me on Twitter_](https://twitter.com/pseudotheos) _to get notified about future posts and let me know what you think. My content will remain 100% free, forever, and is licensed under_ [_CC BY-SA_](https://creativecommons.org/licenses/by-sa/4.0/) _unless otherwise specified. (Shoutout to_ [_Swagtimus_](https://twitter.com/Swagtimus) _and_ [_Nisreen_](https://twitter.com/nisreenmandvi) _for helping out by proofreading!)_

### Further reading

[https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/)

[https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-starks/](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-starks/)

[

Introducing ZK Sync: the missing link to mass adoption of Ethereum
------------------------------------------------------------------

Introducing zkSync: the missing link to the mass adoption of Ethereum Matter Labs' trustless scaling & privacy engine built on ZK-rollup Executive summary A successful solution to the scaling ...

https://blog.matter-labs.io

![](https://storage.googleapis.com/papyrus_images/cb07342eafa31beb51b91aede9293a107a4f31f3d7d66081a8eaa40bf28daed6.png)

](https://blog.matter-labs.io/introducing-zk-sync-the-missing-link-to-mass-adoption-of-ethereum-14c9cea83f58)

[

Homepage
--------

StarkWare is using STARK proofs to bringing scalability, security and privacy to a blockchain near you

https://starkware.co

![](https://storage.googleapis.com/papyrus_images/c141b4f554c27b80fb22b181c228d0a84de2fd0e56ad46c7cccbb80243374ac0.webp)

](https://starkware.co/)

---

*Originally published on [pseudotheos](https://paragraph.com/@pseudotheos/zksnarks-vs-zkstarks-a-primer)*
