Please describe your proposed solution.
ZKFold Symbolic is a Haskell DSL for writing zero-knowledge smart contracts on Cardano. It is a high-level language that abstracts zero-knowledge cryptographic protocols and lets developers build smart contracts in a familiar setting. The language syntax and semantics are not too different from other on-chain languages, particularly from PlutusTx.
Let us now discuss some technical details of the solution.
- A zkFold Symbolic smart contract is a pure function that takes a transaction body plus some redeemer data and returns a boolean value, thus acting as a specification for the transaction.
- ZKFold Symbolic smart contracts can be composed with one another without affecting the Cardano network fee or the number of bytes posted on-chain. A transaction can satisfy many zkFold Symbolic smart contracts at the same time, i.e., the user can interact with many different protocols simultaneously.
- The on-chain data footprint is significantly limited compared to regular Cardano smart contracts. In particular, the redeemer data in zkFold Symbolic smart contracts is private by default.
- The code written in zkFold Symbolic is directly compiled into arithmetic circuits that can be used in most ZK protocols.
- Our approach does not involve Virtual Machines (VMs), which has a significant positive impact on the efficiency of the protocol.
We believe there are at least four types of applications where the usage of zkFold Symbolic makes sense:
- Batching user requests in high-volume dapps. Due to the properties of zkFold Symbolic, creating big batched transactions significantly reduces the aggregate network fees.
- Simultaneous interactions with multiple protocols. As discussed above, multi-protocol transactions cost the same as single-protocol ones. This prompts developers to make truly composable protocols in zkFold Symbolic, reducing fees and elevating user experience in the process.
- Complex smart contracts that cannot be built otherwise. Examples:
- A contract for voting verification. It can verify the correctness of the whole DAO voting procedure in one single transaction, which helps with scaling DAOs to hundreds of thousands or even millions of members.
- An escrow contract for trustless P2P fiat-to-crypto on-ramp (see the corresponding proposal).
- Smart contracts with private data. Proving the knowledge of private information without revealing it is essentially trivialized with zkFold Symbolic.
You can check the demo of zkFold Symbolic and follow our progress on GitHub.