Popular Articles

No articles found.

Exploring the Utility of the Sapphire Parallel Runtime on Oasis

Community Translations: Hindi | Indonesian | Filipino | German | Russian | Serbian | French | Korean | Turkish

Sapphire is a groundbreaking advance for Solidity developers wanting to build privacy dApps. Now, it can also be used to add confidentiality to existing dApps on popular EVM networks as a privacy layer.

When we launched Sapphire on testnet in Q3, we opened the door for EVM developers to build confidential dApps in a language they already knew well. Sapphire offers a solution to the blockchain privacy paradox and showcases the flexibility of the Oasis Network and its customizable ParaTime layer with the creation of a confidential EVM developer environment.

But a confidential EVM ParaTime is only the beginning. Sapphire is the key building block of a privacy layer for Web3, including all EVM chains and dApps– this is the Oasis Privacy Layer.

With the Oasis Privacy Layer, popular dApps, on all familiar EVM chains, can utilize Oasis’ privacy technology without having to migrate their entire application and user base to a different chain.

Let’s see how Sapphire makes this possible.

Sapphire in action

The Oasis Network was created for builders. For Web3, the tools of the trade are Solidity, EVM and the wealth of related tools developed by the community for building robust and secure dApps on EVM-compatible chains. So what’s missing? While smart contracts provide the benefits of transparent and auditable application logic and state, the fact that all on-chain state and transactions are completely public makes it impossible to move critically important parts of many applications on-chain.

Let’s see how Sapphire eliminates these limitations with a fun game!

Ever played Wordle? The addictive word game that went viral and was later purchased by the New York Times? We invite you to try out Wordleish: a simple blockchain-based game with a similar principle: https://wordleish.pages.dev/games/2

The objective of Wordle (and Wordleish) is to guess the five-letter secret word using feedback from successive guesses–colored tiles indicate when letters and their locations match the solution. Wordleish adds another dimension by enabling players to compete to solve these puzzles on-chain. The puzzles are stored in a smart contract, and the first player to solve each puzzle is immortalized on-chain.

What happens if we try to build Wordleish on a traditional EVM network? Two important limitations take all the fun out of the competition. First, if we store the solution to the puzzle in on-chain storage, it’s not actually secret–anyone can spoil the game by simply querying the contract’s public storage. In addition, because transactions are completely public, when a player submits a transaction containing the correct answer, they are vulnerable to getting “frontrun” by other players.

Sapphire solves both of these problems through private smart contract state and encrypted transactions. This is why Sapphire shines for Web3 builders wanting to create new privacy-enabled dApps.

But what about existing dApps that could also benefit from on-chain privacy? What about dApps that would like to conduct secret ballots in their DAOs, or private NFT lotteries, or Decentralized ID systems that manage sensitive personal information?

Sapphire is still the answer, thanks to the Oasis Privacy Layer.

Build with Oasis

Curious about Oasis developer tools? Want to build with Oasis?

How does the Oasis Privacy Layer work?

We just saw how a novel application like Wordleish can be built on Sapphire, but how can existing dApps on other networks access on-chain privacy? Through the Oasis Privacy Layer, which is a gateway to Sapphire’s privacy features for dApps on other EVM chains.

To understand how the Oasis Privacy Layer makes this possible, let’s consider another example of a privacy feature that we could add to existing dApps. Imagine we have a DAO hosted on another EVM network, and we want to add an option for “secret ballot” proposals. We still want a “trustless” on-chain vote, but we want to allow votes to be submitted in secret, with only the final outcome being revealed.

The first step is to deploy a secret ballot smart contract on the EVM-compatible Sapphire runtime. Then, the DAO contract on the home chain can initiate voting for a proposal by sending a message to the secret ballot contract over a message-passing bridge. DAO members submit their votes in secret as encrypted messages, and when voting ends, the final result is reported back to the DAO on the home chain via the bridge.

The figure above shows how the Oasis Privacy Layer works as a privacy-enabled side chain.

Note that transactions on Sapphire require gas fees to be paid in Oasis’s native token (ROSE). To ensure a seamless user experience, a gas relayer can be used to forward users’ signed messages to Sapphire and avoid the need for end users to acquire ROSE to pay for gas. The entire flow is completed with only a single extra click by the user to approve payment to the gas relayer in ETH/USDT/etc!

Why a privacy layer?

The blockchain ecosystem is at a critical point in its evolution. When Bitcoin was created, Web2 was at its peak, and the introduction of this new technology was seemingly light years ahead. Bitcoin offered decentralization, transparency, community, ownership, and user-centric approaches to finance. However, blockchain technology is lacking in a few areas.

The lack of privacy is often spoken about when it comes to blockchain being an underlying technology for our lives in the future. No one wants to put their credit scores, health information, private-identifiable data, or sensitive information on a transparent public network.

Because of this, Oasis’ mission is to scale blockchain to Web3 and provide that robust, configurable, functional privacy that is so needed. We want blockchain to be part of it, to be usable, and foundational for Web3 — but we want people to be sure that their privacy is protected too.

The Oasis Privacy Layer is our next step in ensuring our mission happens. We built Sapphire so that any Solidity developer could have access to privacy and build confidential dApps for Web3. We created the Oasis Privacy Layer so that the hard work already done on other chains with other established dApps can access Sapphire’s unique privacy capabilities without sacrificing anything.

The Oasis Network is not out to be another siloed Layer 1 chain that sets yet another blockchain standard, fracturing the ecosystem further. We want to work with what has been created and empower developers to take it to the next level. Solidity developers, EVM chains, and major dApps are starting to hit a Web3 ceiling because of a lack of privacy, and with the Oasis Privacy Layer, we’re forging a path forward.

Build and be part of it today

Sapphire will soon be launched on mainnet, and following a successful Hackathon, we are looking for more projects to experience building confidential dApps in Solidity. We would also like to offer grants for building on Sapphire. If interested, please apply here.

If you would like to find out more about utilizing the Oasis Privacy Layer for your dApps, please get in contact with us through Discord.

OPL-landing

Build with Oasis

Curious about Oasis developer tools? Want to build with Oasis?

Build with Oasis

Curious about Oasis developer tools? Want to build with Oasis?

Hack Web3 with Oasis

Unlock the full potential of Web3 privacy by joining the Privacy4Web3 hackathon.

Get Involved

How we use cookies?

At Oasis Foundation we believe in your privacy, so you can choose to browse our site without any tracking or by clicking “Accept”, you help us to improve our site and help us grow our ecosystem. View our Privacy Policy for more information.