Oasis launched the Oasis Privacy Layer (OPL) as a mechanism for developers to access simple and smart privacy solutions on any blockchain network for any Web3 dApp. OPL is a concise but powerful tool that redefines what privacy means for Web3 and how crypto applications, and their users, can integrate privacy and confidential compute into their normal on-chain activity. This overview explains what OPL does, how developers use it and example use cases that unleash its full potential.
The Power of Oasis Privacy Layer
On the surface, OPL is a framework of a few hundred lines of code that acts as a gateway to better privacy. By allowing access to the powerful confidentiality features of the Sapphire runtime built by Oasis, OPL acts as a cross-chain framework between whatever host network a developer chooses and the Oasis Sapphire network via messaging bridges and relaying infrastructure. Adding instant privacy to existing dApps on any EVM blockchain is a simple task.
Realizing the power of OPL also requires a basic understanding of the Sapphire parallel runtime. Sapphire is the first and only confidential EVM engineered by Oasis to bring Smart Privacy to developers, users and brands to Web3. Confidential contracts running on Sapphire are completely customisable – from full secrecy to complete openness, and anywhere in between.
OPL brings all of this flexibility and customization from Sapphire to any other EVM network.
OPL Technical Advantages and Utility
Transaction Signatures
Contracts deployed on the Sapphire runtime through OPL sign their own transactions. For any Web3 developers, this ability serves as an efficient, easily integrable alternative to Ethereum’s Gas Station Network (GSN), ERC 2771 and ERC 4337., In the future it will be possible for developers to deploy contracts to Sapphire using OPL that pay gas in the host network’s native token instead of paying gas fees wth the Oasis Network token. (Currently, OPL requires a lot of developer insight to accomplish this, but the Oasis engineering team is actively working on solutions for a seamless experience to be deployed in the future.) In short, OPL allows the privacy features of Sapphire to be accessed on any host chain while paying gas with the host chain token without migrating the dApp and its users to Oasis.
Compatible Confidentiality
Using OPL allows developers to generate and sign Ethereum-compatible addresses and signatures. Sapphire is the first and only EVM-compatible parallel runtime in Web3 with full confidentiality. Using OPL brings end-to-end encryption for all contracts, transaction and signatures
Even better, developers can customize the level of privacy used in their contracts. And, the privacy of Sapphire operates with the same simplicity and speed for simple tasks or data-heavy operations. Instead of architecting complex solutions for varying levels of data loads with zero knowledge-based privacy tools, OPL makes privacy simple for all types of contract data.
Portable Privacy
Even though OPL is a simple plug-and-play cross-chain privacy solution, the developer experience and integration potential are limitless. Any layer of any EVM network in Web3 can support a dApp that integrates OPL to access many of the privacy features of Sapphire. Every developer knows that native privacy features vary greatly across public blockchains. OPL is designed to be the privacy layer that solves these discrepancies for all of Web3 with portable privacy accessible wherever dApps are deployed.
Precompiled Contracts
Using OPL gives developers access to Sapphire contracts with private storage for their own secrets. Using the Encryption, Decryption and Key Derivation precompiles, builders can be assured that information passing through third-parties remains secure and tamper-free. Using these and other precompiled contracts can also massively reduce the development resources and execution inefficiencies of building and deploying a secret contract in the host EVM. OPL brings the fast, efficient and flexible privacy features of deploying on Sapphire to any network in Web3, saving countless hours and gas fees for any developer who chooses to use it.
Example OPL Use Cases
Secret Ballots
All voting has a traditional element of confidentiality and privacy, but the fully transparent nature of most public blockchains with this same secrecy is often not possible. All votes are public and real-time standing of in-progress votes are viewable. Not to mention unwanted bias or voter influence from this data can be present.
Using OPL to access the confidentiality of Sapphire enables fair voting and eliminates bias from DAO governance through secret ballots. Any voting scheme built on another EVM host network (e.g., token-balance weighted voting or a more complex scheme) can be quickly ported to Sapphire within minutes for exponentially greater and more flexible secrecy features. After deploying a secret ballot smart contract on Sapphire, the DAO contract on the host chain can initiate voting for a proposal by sending a message to the secret ballot contract over the OPL message-passing bridge.
Confidential Auctions
Popular NFT mints and actions can attract thousands of excited participants attempting to secure a collectible all at the same time. The ensuing “gas wars” lead to exorbitant fees without the guarantee of successfully minting or winning the desired collectible at all. Even the game authors or collection creators themselves manipulate the process to direct the most rare and valuable items to themselves because of a lack of inherent secrecy to the distribution mechanism. Adding confidentiality to the auction mechanisms can radically decrease congestion, reduce gas fees and streamline the fairness of the entire collectible disbursement process.
Using OPL to access privacy features on Sapphire, NFT creators can create sophisticated auction mechanisms that closely resemble traditional auctions, including sealed bid second price, VCG, candle auctions and more. The auction smart contract runs on Sapphire via OPL while the users on a separate host chain interact with the collectibles being minted or sold. The OPL via Sapphire effectively “seals the envelope” in an auction, but it allows collectibles, funds and users to never leave their home chain.
Private Game Logic
Privacy and confidentiality are often essential to any compelling game. Card games, strategy games, puzzles, quests and many other experiences require secrecy and hidden information. Most Web3 games are required to integrate off-chain solutions for their privacy requirements, even though a fully crypto-native experience is the goal. Avoiding the tradeoffs, complexity and unwanted trust that accompanies a blended Web2-Web3 game comes from using OPL to access the industry-leading confidentiality features of Sapphire.
Gaming projects can use OPL to support confidential gaming logic and keep everything on-chain. An example of this is Wordleish, a simple blockchain-based demo game inspired by the highly popular Wordle and deployed on Sapphire. Any game deployed on an EVM host network can deploy contracts that execute parts of the game requiring privacy on Sapphire through OPL without migrating the entire game away from its host chain. The hidden solution to an in-game riddle, for example, can be submitted by a user and bridged to Sapphire using the OPL messaging relay. If correct, a message will be sent back to the home chain where it can unlock whatever the reward might be.
Hack Web3 with Oasis
Unlock the full potential of Web3 privacy by joining the Privacy4Web3 hackathon.
A Radical Approach to Web3 Privacy
Sapphire was built to redefine the standards for flexible confidentiality and smart privacy. OPL was launched to bring these powerful features to any host network across the Web3 ecosystem. Together, both of these Oasis technologies are powerful tools that deliver Smart Privacy to any ecosystem in Web3.
Solving Web3 privacy should not be expensive, complex or rigid. Achieving mainstream adoption through a safer user experience requires empowered developers who can build on or port to the best privacy technology Web3 can offer. As showcased above, OPL unlocked the technical features and diverse use cases of Sapphire across any and all sectors of the crypto economy.
OPL is a doorway for effective privacy open to anyone.
Web3 privacy will never be the same.