According to PANews, zkSync recently released an educational illustration using a zoo analogy to explain the concept of zero-knowledge proofs. The analogy compares a zoo to a circuit, animals with special skills to logic gates, and a group photo of happy animals to a proof. By inputting data into the circuit without revealing specific content and performing complex calculations, a proof is generated, completing a zero-knowledge proof process.
In the zoo analogy, the circuit corresponds to a series of logic gate constraints (addition, subtraction, multiplication, division, etc.) that aggregate the abilities of all animals. The data passed into the circuit must be able to be executed within various formulas. In a layer2 environment, data such as transaction hashes, accounts, and data balances can be transformed into formulas for calculation.
Various animals in the zoo represent different logic gates. For example, zebras have the ability to compare whether two numbers are equal, crocodiles represent 'less than,' and spiders represent more complex multi-choice gates. Different animals represent different arithmetic formulas, and their happiness or sadness indicates the structure of the formula calculation.
A complex circuit is constructed by various animals (logic gates) and boxes (rules). When a formula is proven to be true, animals like zebras and caterpillars become happy, and a proof is generated for the formula. To ensure the credibility of the proof, a special animal called Zeek is introduced as the verifier in the layer2 system. Zeek can observe whether other animals are happy, and if they are, the proof is verified and uploaded to the main network for final confirmation.
The process of taking a group photo is similar to generating SNARK proofs or KZG commitments, while the printed film is equivalent to STARK/SNARK proofs. Visitors to the zoo represent individual transactions, and only when the animals are happy and take a group photo is a proof generated and confirmed on the blockchain.
However, not all animals in the zoo can be happy and work according to predetermined rules at the same time, leading to congestion, errors, and invalid state transitions. These situations result in under-constrained conditions, making it impossible to pass the final verification.