Next-Generation Smart Contracts: Confidential vs Transparent EVM
Explore a comparison of standard versus confidential EVM chains and how better privacy redefines the next generation of smart contracts.
Finding an equilibrium between transparency and confidentiality is an essential task for the crypto ecosystem. Transparent blockchains are a long-standing feature of crypto, but new tools help to mitigate a complete lack of privacy and find the right balance for these tradeoffs. But fully transparent systems like the original Ethereum Virtual Machine (EVM), which was built with a total lack of privacy by default, are now competing in a landscape with increasingly sophisticated and interoperable networks that preserve user privacy, protect sensitive data, and enable use cases like private transactions and secure data monetization.
Instead of relying on a patchwork of workarounds and other tools (e.g., mixers or stealth addresses), it is useful to explore a direct comparison of transparent versus confidential EVMs. And that is the purpose of this blog post. As crypto adoption grows, the need for on-chain privacy becomes more pressing, and confidential EVMs are the solution.
What Are Standard, Transparent EVMs?
The solution to the transparency problem lies in blockchain architecture. Specifically, the virtual machine, which, in a Web3 context, serves as the state machine, executes smart contract code and helps maintain consensus across a network. The EVM is the pioneering example, but, as mentioned above, the transactions that flow through it are transparent.
This is because, with a standard EVM, calldata is not encrypted, so anyone can see the transaction parameters being put onchain. Even if the calldata were encrypted, it couldn't be decrypted without exposing the key, and then, because it's all verifiable and replicated, everyone can see the internal state of the contract.
What Are Confidential EVMs?
To address this shortcoming, Oasis built Sapphire, a confidential EVM network that enables private smart contract execution. The idea was to create a confidential EVM that’s cheap, fast, and simple to use with familiar Solidity programming.
The result is an Ethereum-compatible network featuring calldata, storage, and runtime encryption that provides an end-to-end encrypted channel between the dApp and the smart contract. So, if a developer marks a variable as private or internal in Solidity, only the contract can access it, as users can only run public methods and access public variables.
In this scenario, node operators cannot see the runtime state or calldata being processed.
Behind the scenes, Sapphire uses Intel SGX, a hardware-based security solution for privacy and confidentiality, eliminating proving time and avoiding complicated multi-party computation. Importantly, because it operates within a trusted execution environment, instant onchain randomness is also available inside Sapphire Solidity contracts.
Here’s a quick breakdown:
Looking Ahead
Smart contracts could be smarter. Smart contracts should even have their own secrets. And crypto is quickly reaching the limit of what can be built with transparent contracts. The dangers of fully transparent chains are also becoming more prominent. It is not hard to imagine a future where entire wallet histories are leveraged against users to exploit, deny, or manipulate in various ways, and a confidential EVM is a guardrail against this future.
Attempting to provide instant visibility of everything by everybody for anything that happens onchain might not be the best default network design for onboarding billions of new users and trillions of dollars from legacy systems that heavily rely on selective privacy and customizable confidentiality for all sorts of data.
Oasis has built the only production-ready EVM that offers confidential smart contracts, and that’s a game changer for what use cases and functionalities are unlocked for crypto developers. Customizable confidentiality for smart contracts redefines the future of onchain data management, monetization, and security. If the speed and programmability of these confidential systems like Sapphire are sufficient, developers will instinctively choose privacy, and users will win by default.
Learn more about Sapphire here.