Skip to main content
Try out the RareSkills ZK AI Tutor!

Blog

The technical content top engineers rely on to level up.

22 min read

Multiplicative Subgroups and Primitive Elements

Multiplicative Subgroups and Primitive Elements Introduction This chapter continues our study of group theory by exploring subgroups and generators. The concept of a primitive element will be...

Last updated onMar 24, 2026
Read Article

8 min read

Square and Multiply Algorithm

Square and Multiply Algorithm The square and multiply algorithm computes integer exponents in $\mathcal{O}(\log n)$ (logarithmic time). The naive way to compute an exponent $x^n$ is to multiply $x$...

Last updated onAug 20, 2025
Read Article

7 min read

Computing the Current Tick Given sqrtPriceX96

Computing the Current Tick Given sqrtPriceX96 In the previous chapters, we saw that the protocol stores the square root of the price instead of the price itself. Therefore, it is necessary to relate...

Last updated onAug 20, 2025
Read Article

7 min read

Uniswap V3 Factory and the Relationship Between Tick Spacing and Fees

Uniswap V3 Factory and the Relationship Between Tick Spacing and Fees In early chapters, we introduced the concept of ticks, which discretize the price curve. A tick is a price defined by the formula...

Last updated onAug 20, 2025
Read Article

4 min read

ZK Proof of Selection Sort

ZK Proof of Selection Sort Most computations of interest are generally “stateful” — that is, they need to go through a series of steps to produce the final result. Sometimes, we do not need to show...

Last updated onAug 20, 2025
Read Article

9 min read

How a ZKVM Works

How a ZKVM Works A Zero-Knowledge Virtual Machine (ZKVM) is a virtual machine that can create a ZK-proof that verifies it executed a set of machine instructions correctly. This allows us to take a...

Last updated onAug 20, 2025
Read Article

8 min read

32-Bit Emulation in ZK

32-Bit Emulation in ZK The default datatype in ZK is the field element, where all arithmetic is done modulo a large prime number. However, most “real” computation is done using 32, 64, or 256-bit...

Last updated onAug 20, 2025
Read Article

24 min read

Modeling the Stack Data Structure in ZK

Modeling the Stack Data Structure in ZK This tutorial shows how to create a stack in Circom. Be warned — this chapter is long. However, the strategy for creating ZK proofs about stacks will be...

Last updated onJan 3, 2026
Read Article

4 min read

Introduction to Stateful Computations in ZK

Introduction to Stateful Computations in ZK When carrying out iterative computations such as powers, factorials, or computing the Fibonacci sequence, we need to “stop the computation” after a certain...

Last updated onApr 15, 2025
Read Article

6 min read

The Permutation Argument

The Permutation Argument A permutation argument is a proof that two lists hold the same elements, but possibly in a different order. For example, is a permutation of and vice-versa. The permutation...

Last updated onApr 15, 2025
Read Article

4 min read

MD5 Hash In Circom

MD5 Hash In Circom In this tutorial, we will implement the MD5 hash in Circom both to compute the hash and to constrain in Circom that it was computed correctly. Although the MD5 hash function is not...

Last updated onAug 20, 2025
Read Article

3 min read

Quin Selector

Quin Selector The Quin Selector is a design pattern that allows us to use a signal as an index for an array of signals. As a prerequisite, we assume the reader has read the chapter on Conditional...

Last updated onMar 10, 2026
Read Article