BUIDL with Smart Privacy
Better dApps require smarter privacy. Use cutting-edge tools from Oasis to add customizable confidentiality to any Web3 & AI application.
Why Build On Oasis?
Why Build On Oasis?
Bringing Privacy to Web3 & Ai
Oasis is the the industry leading network for on-chain privacy and confidential computation. Confidential ParaTimes on Oasis enable developers to build privacy-enabled dApps that bring more real-world use cases to blockchain and AI.
CUSTOMIZATION
Oasis' modular architecture enables multiple Parallel runtimes called Paratimes. Paratimes can be thought of as similar to rollups which coexist and process transactions in parallel with shared consensus. ParaTimes are entirely customizable, ensuring that the Oasis network will always be able to provide developers with the right tool for the job.
HIGH PERFORMANCE
Oasis Scales performance via its modular architecture separating consensus (L1) and Execution (L2). The Oasis Sapphire ParaTime achieves 6s block times with instant finality, meaning that there are no forks and blocks are final once they are mined
EASE OF DEVELOPMENT
Oasis offers privacy enabled EVM (Sapphire), WASM based (Cipher) and standard EVM (Emerald) to accommodate a diverse array of the brightest and boldest blockchain developers and applications. Solidity developers can get started building privacy-enabled dApps immediately!
The building blocks
of Smart Privacy
Sapphire is the first and only confidential EVM in production. Sapphire empowers developers to build EVM-based dApps using smart contracts with Smart Privacy – 100% confidential, 100% public, or anywhere in between.
The Oasis Privacy Layer (OPL) adds instant privacy to existing dApps running on any EVM network. As the industry-leading EVM-compatible Smart Privacy solution, OPL redefines how Web3 & AI developers engineer confidential smart contracts.
ROSE Wallet is the official non-custodial wallet for holding, sending and receiving digital assets on the Oasis Network. Through the ROSE Wallet, users also have access to industry-leading custody options and easy on-ramps that have integrated with the Oasis ecosystem.
The Oasis Explorer provides an easy-to-use frontend for diving deep into onchain activity. By surfacing powerful data and analytics across all Oasis runtime environments, the Explorer matches the versatility of the Oasis protocol with equivalent screeners, visualizations, and analytics for monitoring ecosystem growth and development.
Nexus is the premiere data-fetching backend for the Oasis ecosystem for explorers and wallets. Nexus is not just an indexer–it serves as a critical conduit for accessing onchain data for the Oasis Network.
Unlocking Smart Privacy Features on the Oasis Network
Smart Contacts
contract MessageBox {
string private _message;
address public author; function setMessage(string calldata in_message) external {
_message = in_message;
author = msg.sender;
} function message() external view returns (string memory) {
if (msg.sender!=author) {
revert("not allowed");
}
return _message;
}
}
bytes32 key = ... ;
bytes32 nonce = ... ;
bytes memory text = "plain text";
bytes memory ad = "additional data";
bytes memory encrypted = Sapphire.encrypt(key, nonce, text, ad);
bytes memory decrypted = Sapphire.decrypt(key, nonce, encrypted, ad);
bytes memory seed = hex"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
bytes memory publicKey;
bytes memory privateKey;
(publicKey, privateKey) = Sapphire.generateSigningKeyPair(Sapphire.SigningAlg.Ed25519Pure, seed);
function signTransaction(uint64 nonce, uint256 gasPrice)
internal returns (bytes memory)
{
(address signerAddr, bytes32 signerSecret) = EthereumUtils.generateKeypair();
payable(signerAddr).transfer(1 ether);
return EIP155Signer.sign(
signerAddr, signerSecret,
EIP155Signer.EthTx({
nonce: nonce,
gasPrice: gasPrice,
gasLimit: 250000,
to: address(this),
value: 0,
data: data,
chainId: block.chainid
}));
}
import {Host, Result} from "@oasisprotocol/sapphire-contracts/contracts/OPL.sol";
contract Sender is Host {
event HeardReply(string);
constructor(address _receiver) Host(_receiver) {
registerEndpoint("listenToReply", _listenToReply);
} function sendToListener(string memory _message) external payable {
postMessage("confirmMessage", abi.encode(_message));
} function _listenToReply(bytes calldata _args) internal returns (Result) {
(string memory reply) = abi.decode(_args, (string));
emit HeardReply(reply);
return Result.Success;
}
}
Client Integration
import '@oasisprotocol/sapphire-hardhat';functionn setMessage(addr: string, message: string) {
// Wrapped MessageBox instance.
let messageBox =
await hre.ethers.getContractAt('MessageBox', addr);
// Encrypted setMessage transaction.
await messageBox.setMessage(message);
);export default const config: HardhatUserConfig = {
networks: {
'sapphire': {
url: 'https://sapphire.oasis.io',
chainId: 0x5afe,
},
'sapphire-testnet': {
url: 'https://testnet.sapphire.oasis.dev',
chainId: 0x5aff,
},
},
};export default config;
import * as sapphire from '@oasisprotocol/sapphire-paratime';
import { type MessageBox__factory } from 'my-messagebox-backend';
const provider = sapphire.wrap(window.ethereum);
functionn setMessage(addr: string, message: string) {
// Wrapped MessageBox instance.
const messageBox =
MessageBox__factory.connect(addr, provider.getSigner());
// Encrypted setMessage transaction.
await messageBox.setMessage(message);
}
import { sapphireTestnet } from 'viem/chains';
import * as sapphire from '@oasisprotocol/sapphire-paratime';
const provider = sapphire.wrap(window.ethereum! as EIP1193Provider);
const walletClient = createWalletClient({
chain: sapphireTestnet,
transport: custom(provider),
})
import sapphire "github.com/oasisprotocol/sapphire-paratime/clients/go"
func main() {
privateKey, err := crypto.HexToECDSA("")
if err != nil {
log.Fatal(err)
}
c, err := ethclient.Dial("https://testnet.sapphire.oasis.dev")
if err != nil {
log.Fatal(err)
}
var client *sapphire.WrappedBackend
client, err = sapphire.WrapClient(*c, func(digest [32]byte) ([]byte, error) { return crypto.Sign(digest[:], privateKey) })
}
from sapphirepy import sapphirew3 = Web3(Web3.HTTPProvider('https://testnet.sapphire.oasis.dev'))
w3.middleware_onion.add(construct_sign_and_send_raw_middleware(account)from web3 import Web3
from web3.middleware import construct_sign_and_send_raw_middleware
from web3.contract.contract import Contract
from sapphirepy import sapphireaccount = Account.from_key("...")w3 = Web3(Web3.HTTPProvider('http://localhost:8545'))
w3.middleware_onion.add(
construct_sign_and_send_raw_middleware(account)
)
w3 = sapphire.wrap(w3) # Wrapped providerdef setMessage(addr, message):
# Wrapped MessageBox instance.
messageBox = w3.eth.contract(address=addr, abi=abi)
# Encrypted transaction.
messageBox.functions.set_message(message).transact({'gasPrice': w3.eth.gas_price})
Featured Highlights
Oasis Sapphire offers end-to-end encryption for executing confidential Smart Contracts which are able to hide specified parameters of the contract.Oasis Sapphire also simplifies the process of building dApps leveraging random number generation, dApps which sign or verify cryptographic signatures, and more.
Precompiled contracts for random number generation, keypair generation, signing and verification, and more encrypted processes are available for all developers running dApps on Sapphire.
There is no cost to use eth_call, and on Sapphire the contract has full access to its private state. Taking advantage of this gives your dApps the ability to do things that can't be done on on transparent EVM chain sand it won't cost a penny for your users.
Interested in exploring how Sapphire or OPL can fit your needs? Get in touch with the Oasis team to dive deeper.
Different dApps require different levels of privacy. From fully public to completely confidential. Features of a dApp that require privacy can run on Oasis Sapphire via OPL while users and assets remain on their host network.
Web3 user safety starts with versatile, cross-chain privacy. The message-passing bridge built into OPL offers easy synchronization between dApp state and the host network using Sapphire’s secure runtime.
Requiring all on-chain activity to be completely transparent. Instead of relying on basic smart contracts which offer little flexibility, Oasis Sapphire empowers solidity developers to fine-tune discretionary transparency to level which best suits there application needs.
OPL brings the power of Sapphire, the first and only confidential EVM, to all of Web3 with interoperable on-chain privacy compatible with every EVM network.
Oasis
Playground
Oasis Authenticator
Confidential Voting
Password manager
Sealed Auctions
Understanding the Oasis Privacy Layer and Smart Privacy in Web3
A Workshop with Harry Roberts
What can you build?
Decentralized AI — built on the three principles of fairness, privacy, and transparency — ensures that AI technology is used in a way that respects individual data rights. Ocean Predictoor demonstrates the powerful security of AI dApps with fair, private data security using our confidentiality to protect crowd-sourced, on-chain prediction markets.
AI projects can use on-chain confidentiality to store AI agent private keys and sign message cross-chain. Also to verify off-chain compute with teeML powered by Oasis Sapphire.
We bring confidential smart contracts with flexible privacy features to DeFi. Our ecosystem partner (illumineX) accelerates this mission through building the first confidential EVM DEX.
A lot of what makes a great game is the asymmetry of information or confidential logic. In card games players can not know what cards their opponents have. In strategy games there are often hidden areas of the map or fog-of-war. In RPGs there is often puzzles, riddles, or quests with unknown solutions. On most blockchain networks this is not achievable as state is entirely transparent. With Oasis Sapphire, web3 Gaming developers can build completely on-chain games leveraging these features for the first time.
By design, contracts on Oasis Sapphire can create and manage private keys, encrypt and decrypt data, generate cryptographically secure random numbers, and sign or verify signatures. By combining its confidential state with native support for contract managed accounts, Sapphire offers tremendous potential to the future Web3 utility of account abstraction.
In web 2 social networks users have the ability to curate which friends and connections have access to content that they share. In web 3 this has been difficult as networks are transparent and all information was available for everyone to see. Leveraging Sapphire's confidentiality features such as the key manager and selective disclosure, DApps can now create these web 2 functions in web3 with ability to grant/revoke access to both on-chain and off-chain data.
All forms of voting and governance have historically demanded a degree of privacy. Confidentiality for these processes are important to ensure fairness and unbiased participation. Fostering honest and authentic governance practices starts with shielding participants from transparency-by-default networks and avoiding distorted elections from the influence of personal onchain data.
The Celer IM bridge is secured by the ‘State Guardian Network’ and has additional dApp safeguards with the Celer IM app guardian. See docs for more.
Sapphire is secured by Trusted Execution Environments (TEE) and the Oasis Layer1 BFT Proof-of-Stake consensus system, see the WhitePaper.
Every NFT collector wants to protect the metadata associated with their assets, and gamers need certain things to be unpredictable, hidden from other players, or otherwise unknown and secret in a strategic way. From onchain player-versus-everyone games to decentralized poker applications, games and NFTs need secrets.
Discover dApps Powered by Oasis Smart Privacy
Want to discuss your use case?
Smart Privacyin action
Oasis Sapphire enabling Secure Prediction Feeds on Ocean Protocol
Grants
The Oasis Grants Program is here to support builders, teams and creators committed to help drive the adoption of Oasis privacy technology through out the whole Web3 ecosystem. If you have an idea, a dApp or a way of how to use our Smart Privacy solutions, apply now!
Security & TEEs
We combine trusted hardware (TEEs) with strong cryptography, light client verification, VRFs, MPC protocols and distributed consensus to achieve industry-leading confidentiality.
By leveraging TEEs, our confidential EVM Oasis Sapphire provides enormous flexibility to developers who can build smart contracts that are fully private, fully public, or anywhere in between.
Bug Bounty
Security is a top priority at Oasis. Work with us to identify security vulnerabilities and keep Oasis developers and users safe.
If you discover a vulnerability, please submit it to our bug bounty program, so that we may respond to and verify the vulnerability as fast as possible.
FAQs
Better dApps require smarter privacy. This is why Oasis focuses on delivering Smart Privacy to Web3 in the form of a flexible, fully customizable confidentiality framework that replaces the rigid, complex and inefficient tools of the status quo. With technologies like the Sapphire runtime and its accompanying Oasis Privacy Layer (OPL) for EVM-based chains, Oasis brings cutting edge confidentiality to any Web3 developer, even ones that don’t build directly on the Oasis network. For applications running on a separate host chain, OPL allows the powerful privacy features of Sapphire to be integrated on any layer of Web3. By creating a spectrum of confidentiality with unlimited customizability, Oasis is redefining how developers think about integrating privacy and reshaping the toolset available for prioritizing privacy in Web3.
On Oasis Sapphire it is easy to build confidential dApps with customisable privacy and confidentiality. When the EVM is run inside a Trusted Execution Environment (TEE) - in the case of Oasis Sapphire this is Intel SGX hardware isolation - the node operators cannot see transaction inputs, return values or smart contract state because all memory used by the enclave is encrypted. The EVM runs at nearly full speed in comparison to other privacy solutions such as ZK or FHE which are very computationally expensive.
Sapphire is a foundational Oasis ParaTime designed for building dApps with inherent privacy, leveraging advanced encryption. The Oasis Privacy Layer (OPL) is a message passing bridge and suite of utilities that enable one to easily access the confidentiality features of Sapphire from other EVM-compatible chains, without dApp users needing to worry about how to pay for gas.
Contracts pay for gas on the chain where the message is sent from.
The Oasis Privacy Layer (OPL) is an EVM-compatible privacy solution that empowers developers to add new functionality to smart contracts on the most popular EVM networks like Ethereum, BNB Chain, and Polygon with encrypted transactions and confidential state.
By using a Solidity library that integrates Sapphire into your existing and future Web3 applications, developers on any supported network can seamlessly add confidential state and selective disclosures to their dApps when using contract a deployed on Sapphire without leaving their existing networks.
Every blockchain has its own native gas token, which can create cross-chain friction. But, by using OPL, dApps can pay gas with their own native token while still leveraging the confidentiality features of the Sapphire runtime. Messages are passed through and executed on Sapphire. Users can directly interact with confidential contracts. Gas is then paid with whatever token fuels their native network.
Have questions about Oasis Smart Privacy?
Let's get in touch
Fill out the form and we’ll get back to you as soon as possible.
Latest Blogs
Oasis provides key insights into the Web3 privacy landscape, updates for the Oasis ecosystem, community, and more.