Author: Mathilda Source: X, @Mathilda_Sun_ Translation: Shan Ouba, Golden Finance
Finally got around to writing this. The whole debate about zk vs. TEE made me realize that there are a lot of people who don't even bother to do basic research before expressing their opinions on CT.
It's absolutely stupid to say that one will replace the other, as if we live in a binary world. They are completely different technologies; one is hardware-based and the other is software-based. Both have existed and co-existed before the birth of the crypto industry. They each have their own advantages and trade-offs. It all depends on the use case and design requirements of the specific project.
How it works:
zk: One party (the prover) can prove to another party (the verifier) that a statement is true, without revealing any information beyond the validity of the statement itself.
TEE: A secure enclave within the processor that ensures that the code and data loaded into it are protected in terms of confidentiality and integrity.
Use Cases:
zk: (1) Privacy - e.g. @TornadoCash, @penumbrazone, @aztecnetwork; (2) Scalability - all zk rollups, e.g. @zkSync, @Starknet, @Scroll_ZKP. I would classify zk bridges, oracles, ML, etc as “scalability” because they are essentially expanding the blockchain ecosystem, but welcome to disagree.
TEE: Mostly privacy - private L1/L2, e.g. @SecretNetwork, @tenprotocol; Flashbots' encrypted mempool and block builder Suave; private federated learning in Web2 using TEEs.
Side note: In terms of privacy, with zk, the prover can see the program and data. Privacy protection is for any party other than the prover. With TEE, not even the computer running the TEE knows what is happening inside the secure enclave.
Advantages:
Disadvantages:
zk: computationally intensive
TEE: dependent on hardware vendors (e.g. Intel) and potential vulnerabilities in hardware; limited by the computing power and memory available within the TEE (e.g., some large ML models cannot run in a TEE)
TEE is not new. There are many in previous cycles, such as @OasisProtocol and some @Polkadot ecosystem projects. Some have become irrelevant due to the lack of ecosystem. It is a bit meaningless to discuss which technology is superior without actual use.
In addition, they can coexist in some cases. For example, @alignedlayer will build TEE proof, which is an important step in TEE that allows TEE nodes to prove to Aligned that the code running inside the TEE is authentic and has not been tampered with.