Nomos Privacy Paper (internal - work in progress)
6.5.1 User-level privacy using ZK proofs
Private computation on a blockchain using zero-knowledge proofs (ZKPs) enables
secure and confidential processing of data without revealing the underlying infor-
mation. ZKPs allow a prover to demonstrate the validity of a statement without
disclosing any additional information, ensuring that sensitive data remains undis-
closed during on-chain computations. However, the use of ZKPs for privacy comes
with its own set of limitations.
One such limitation is the need for concurrent-access-to-state. In smart con-
tract chains like Ethereum and Solana, the state of an application is shared be-
tween all users, and any transaction can modify it. This shared state poses a
challenge for applications that require privacy. When users attempt to modify
the shared state on the client side, conflicts can arise between different users,
leading to race conditions.
To overcome this limitation, an intermediary agent, known as the prover, can
be introduced. Users can send transactions to the prover, who orders and exe-
cutes the transactions off-chain before advancing the state on-chain. While this
approach can address the concurrent access to state problem, it’s less than ideal
for privacy reasons, since the prover needs access to the cleartext, while also intro-
ducing a centralized point of failure. This is not an option that we can consider
for our purposes.
References: Aleo, Zexe?
Another, previously discussed, limitation of ZKPs is that they provide single-
user privacy. This means that the user must generate their own proof, if they
want to preserve full privacy, as opposed to delegating the task to a third party.
Additionally, the need for a user to know all private inputs relevant to the proof
to generate the proof further complicates matters.
To address these limitations, we need to design on-chain applications with
user-level privacy in mind. Instead of a shared global state that everyone can
modify, we can use a fragmented state model where individual state fragments
are owned by individual users. This approach ensures that users can execute
their transactions on the client side without conflict, as each fragment is owned
by a single user. The problem with this is that it limits the design space for
many applications. For example, it is possible to design decentralized AMMs
using only user-level privacy by bypassing the need for users to interact with
each other. Instead of transacting with each other, users can transmute one asset
type to another, which updates their private state in a provable manner without
interacting with other users’ private state. However, to achieve this, users burn
their input assets privately and encrypt the amounts to validators, which would
require additional mechanisms like threshold encryption. The validators then
aggregate the encrypted amounts, decrypt the batch total, compute the effective
24