Privacy-Preserving Computations with ZK Wrappers
ZK wrappers are a key feature of the Application Layer, enabling privacy-preserving computations by leveraging zk-SNARKs and zk-STARKs. These wrappers allow dApps to verify computations without revealing the underlying data, addressing a critical need for applications that handle sensitive information, such as AI models, user data, or proprietary datasets. The mechanism is based on a two-step process: off-chain proof generation and on-chain verification, ensuring trust without compromising data privacy.


zk-SNARKs for On-Chain Verification:
zk-SNARKs are utilized for on-chain verification due to their compact proof size of approximately 288 bytes and fast verification times of around 2 milliseconds, which are essential for maintaining blockchain efficiency through Substrate's weight-based execution model. These properties make zk-SNARKs ideal for applications requiring frequent validations, such as smart contract execution, transaction processing, or AI model verification. For example, a dApp managing a decentralized marketplace can use a zk-SNARK to prove that a dataset meets specific criteria (e.g., size, quality) without revealing its contents, enabling secure and private trading through both EVM contracts and native Substrate pallets.

zk-STARKs for Off-Chain Computations:
zk-STARKs are employed for off-chain tasks where transparency and avoiding a trusted setup are prioritized. Despite their larger proof sizes of around 100KB and slower verification times of approximately 10 milliseconds, zk-STARKs offer post-quantum security, ensuring long-term robustness against emerging cryptographic threats. This makes them suitable for applications like large-scale AI model training, where proofs can be generated using Substrate's off-chain worker infrastructure and verified off-chain before being anchored on-chain through custom pallets.

