Page cover

🖥️ZK CIRCUITS

A bit more of the how

To understand the inner workings of SLY and the privacy protections it offers, it's essential to delve into the technology behind Zero Knowledge (ZK) circuits, specifically focusing on the implementation of the Zero Knowledge protocol within SLY's architecture.

  1. Circom Circuits and Privacy Protections:

    • SLY leverages a series of Circom circuits to provide essential privacy protections for its users. These circuits are responsible for implementing the Zero Knowledge protocol, which enables SLY smart contracts to prove various claims about user deposits while maintaining privacy.

    • The Zero Knowledge protocol ensures that sensitive information, such as the validity of a deposit, its withdrawal status, and the timing between deposit and withdrawal transactions, can be verified without revealing any unnecessary details to external parties.

  2. Zero Knowledge Protocol and ZK Circuits:

    • Zero Knowledge proofs allow a prover to demonstrate the validity of a statement without revealing any additional information beyond the fact that the statement is true. This is achieved through the use of cryptographic techniques that enable the generation of succinct proofs.

    • ZK circuits are designed to encode the logic of specific statements or claims within a cryptographic circuit. These circuits are constructed in a way that enables efficient computation and verification of proofs while ensuring the integrity and privacy of the underlying data.

    • In the context of SLY, ZK circuits are utilized to prove claims related to user deposits, withdrawals, and anonymity mining. These circuits are tailored to the specific requirements of the SLY protocol, ensuring optimal performance and security.

  3. Succinct Non-Interactive Arguments of Knowledge (SNARK):

    • SLY employs a specific form of Zero Knowledge system known as "Succinct Non-Interactive Arguments of Knowledge" (SNARK), with a focus on the GROTH16 implementation.

    • SNARKs offer a powerful approach to generating and verifying Zero Knowledge proofs in a highly efficient and compact manner. This makes them particularly well-suited for applications where resource constraints, such as gas costs on the Solana blockchain, are a concern.

    • GROTH16 is a specific variant of SNARKs that provides efficient proving and verification algorithms, making it ideal for use cases such as privacy-preserving transactions within the SLY ecosystem.

  4. Client-Side Proofs and On-Chain Confirmation:

    • In the SLY ecosystem, Zero Knowledge proofs are generated client-side by users or applications interacting with the protocol. These proofs encapsulate the necessary information to verify the validity of specific claims related to user transactions.

    • Once generated, these proofs are then submitted to the Solana blockchain, where they are confirmed by SLY smart contracts. The smart contracts execute the necessary verification processes to ensure the validity of the proofs and the associated transactions, enabling secure and private interactions within the SLY network.

By incorporating ZK circuits and the Zero Knowledge protocol, particularly SNARKs like GROTH16, SLY achieves robust privacy protections for its users while maintaining efficiency and scalability within the Solana blockchain. This sophisticated combination of cryptographic techniques and decentralized architecture positions SLY as a leading solution for privacy-preserving transactions and anonymity mining within the SPL ecosystem.

Last updated