WhitepaperExplanation Oasis
WhitepaperExplanation Oasis
Note: All words marked with the * symbol are featured in the Terminology section at the end.
1 Introduction
• The 1st generation of blockchain (Bitcoin) allowed token transfers, then 2nd generation (Ethereum) allowed
generic computation through smart contracts. The next generation will allow private computation.
• The Oasis Blockchain Platform is a PoS* layer 1 smart contract platform that provides scalability, extensibility,
and privacy. It allows the consensus layer to be modified, and uses a completely different mechanism for
achieving consensus, and follows any progress in the blockchain space. It describes how the consensus layer
can run parallel runtimes or ParaTimes.
• Each ParaTime is a separate computing environment that offers both verifiable and confidential techniques in
their environment. It verifies updated values (if correct) in the ParaTime before sending them over to the
consensus layer.
• This is currently done through replicated computation. Oasis calls this discrepancy detection. It utilizes a
smaller and fast path BFT* method for its execution. Due to its smaller and optimized size, the scalability for
smart contracts improves, and thus the computing cost is lowered dramatically. Since smart contract
executions are separated from the consensus layer in their environment, discrepancies are easier to detect
because of the replication* that is required is reduced. Oasis specifies that their discrepancy technique is not
rooted in their architecture, and those who wish to implement a ParaTime can use other forms of verifiable
computation, such as Multiparty Computation*, Fully Homomorphic Encryption*, Zero-knowledge Proof*,
and so on. The network was designed, however, with a working ParaTime that uses TEE* (Keystone*) for
efficient, cost-effective, confidential smart contract execution. It does not require the ParaTimes to provide
confidentiality or any particular confidential computing technique. Any ParaTime that doesn't use confidential
computing can co-exist with a TEE-based ParaTime. Implementations on the consensus layer are not
dependent on the ParaTimes; the same goes for the ParaTime implementations in that it's independent of
the consensus layer. New ParaTimes do not affect the existing Paratimes.
• 2.1 Goals
• The whitepaper states that the goal is to make the platform flexible, extensible, scalable, secure, and
fault-isolated.
• Flexible: Easy to modify the system parameters to accommodate deployment for the ParaTime
• Extensible: It should be easy to extend by allowing/adding new components and implementations for
the ParaTimes
• Scalable: The transaction system needs to scale with the amount of work it does in the period
through the total number of nodes. It allows the system to grow without huge costs.
• Secure: The system enforces security policies that allow for a broader application scope. The focus is
here on verifiable computations with the ability to perform confidential computations. The
architecture favors simplicity when feasible, allowing implementations and audits to be more
practical and effective.
• Fault-isolated: Oasis is focused on making faults happen in isolation inside each ParaTime so that one
fault doesn't affect the consensus network itself.
• The combination of these goals gives developers and users different choices they can build and
implement on the Oasis Blockchain.
• 2.2 Principles
• The system has been designed to keep a clear separation between the bare bones consensus layer
and the different independent ParaTime layers.
• Consensus layer: This layer handles transactions, staking, token balance, delegation, and debonding.
ParaTime committee scheduling and seeing whether the values of the ParaTime correspond with the
parameters set by the deployer.
• Independent ParaTimes: ParaTimes can be optimized, be they confidential smart contracts or
integrity-based smart contracts, where users can be confident that its content is wholly secured and
less importance is based on visibility.
• There's no exact concurrency* for smart contract executions. However, multiple instances can run at
the same time through separate ParaTimes. Later ParaTimes can be developed, for usage of more
advanced techniques. ParaTimes can also be set to only run on a particular set of nodes to fulfill legal
obligations.
• If one ParaTime fails, it won't get sent to the consensus layer, and it will not impact the rest of the
operations. The scheduling of the ParaTimes prevents it from spamming the consensus layer with too
many updates/values. So if one constantly spams the consensus layer, they'll have to pay for the
transaction fees each time it submits a value. Other ParaTimes are not affected by it as they are
considered separate entities.
• Because of this division, it does mean that the complexity increases and auditing become more
difficult. If any discrepancy is detected, meaning if a value doesn't add up with the different
ParaTimes, the nodes (randomly chosen) on the consensus layer try to replicate it. If even one node
fails to produce the exact result as the other nodes, it is treated as a discrepancy. Then a large
committee has to commit what is the correct answer. Because it gets verified on the random nodes
on the consensus layer, it becomes more cost-effective. Other verifiable methods, such as the popular
Arbitrum optimistic roll-up solution or a ZKP mechanism can be added as well.
3 Architecture
4 Discrepancy Detection
• Oasis dicrepancy detection is the verifiable computing technique used to verify its ParaTime executions as of
this moment. It allows the use of smaller ParaTime committee to increase effiency. It does this via a random
selection of compute nodes, and only requires that all randomly selected nodes agree on the result. If a
discrepancy is detected a seperate protocol is used; discrepancy resolution. Detection as the name implies,
finds it (detect) and the resolution is the slower, more expensive method that corrects the faults.
• How it functions in brief:
• Results of whatever is being computed is signed by a node, then sent to the discrepancy detectors
that uses a gossip network*. The process of detection starts with in the verification code that's
located within the validator node.
• The code checks the result, each computing node should only sign one result, anything else is double
signing and will result in slashing.
• Should all the results be free of discrepancy, they're submitted to the validators for consensus
to process and create a new block in the chain.
• If a discrepancy is detected however, the resolution phase begins to determine the correct
result. The nodes that have discrepancies are slashed, for whatever amount pays for the re-
execution cost.
• Unless there's a hardware failure, or errors in the ParaTime (a non-deterministic execution, or a non-adaptive
adversary*), the resolution mechanism should never be triggered.
• By calculating the probability of selecting a committee that are all bad actors, Oasis have set their parameters
to drive this probability as low as possible, so that the cost to attack would be unacceptable. The committee
needed for this is, on Oasis, much smaller than other conventional systems. And thus more cost effective and
easier to scale.
• Each confidential ParaTime has its own key manager, that is available to the TEE that's responsible for the
execution of the smart contract.
• 6.1 ParaTime Key Manager
• The design of the key managers is focused on simplicity, reliability, auditability, and easy
implementation. However due to the design of the ParaTime, developers can either use the key
management system of Oasis, or design their own key management system. The idea behind key
management system is to have a master key, where additional keys that are bound to the different
contracts can be derived.
• 6.1.1 Application Splitting
• The key management is split between the enclave and the enclave-external components
(smart contracts / blockchain). The enclave can not handle input/output of the information
processed, that is left to the external component side. The external component is trusted to
not attack any side channels on the TEE. It is not trusted to manage the keys. The keys
persists in operation through the enclave encryption key (the master key), but the encryption
key itself is only accessible inside the TEE which, the external component can not directly
access.
• Reasons for this:
• The external components, while trusted can not have full operational access in case of
errors that may compromise the key encryption data.
• The need to update the key material in the key manager is to ensure that contract
state gets re-encrypted and remains secure. Hence why the keys are split, since one
fetches the information, and the other secures it.
• 6.1.2 Replication
• To ensure fault tolerance all the key managers can be replicated and all the critical part it is
run inside an attested enclave (SGX*) The enclave relies on the external components for all
communication, but by using an SGX remote attestation, the identity of the replicated key, is
verified and authenticated, which allows selective sharing of the master key inside the
enclave with other keys. The key manager also decides which replica are authorised. This is
done to prevent attacks on sidechannels of the enclave on ones own machine.
• 6.2 Potential Future Key Manager Features
• What follows in 6.2 are as of the white paper's publishing, simply future proposals for additional
features regarding key management.
• 6.2.1 Access Controls and Rate Limiting
• Refer to the formal Whitepaper both at 6.2.1 and at section 5.1.2 for more details. There is a
concern of information leaks on nodes executing confidential ParaTimes. State encryption
keys could only be visible to the compute node running the confidential smart contract and
rate limited* so restarting a node would not give as much visibility to circumvent controls.
• 6.2.2 Proactive Secret Sharing
• Secret keys could be split using secret sharing techniques so that a compromise of a few key
managers will not result in the compromise of the secret key. The logic for this remaining
tentative here is because there will be more Paratime Confidential Compute nodes by the
nature of how they work as opposed to key managers. Due to how these nodes and key
managers pull data, it will be much easier to compromise via a side chain attack or other
means a Paratime Node than a key manager.
• 6.2.3 Smart Contract State Re-encryption
• Confidential contracts could require re-keying to avoid adversaries with an existing key from
observing traffic and understanding the result of new contract executions. This might
decrease throughput of the contract though, and so requiring smart contracts to use ORAM*
techniques may be preferable.
Terminology
Concurrency:
The simultaneous occurrence of events or circumstances
Gossip Network:
A gossip protocol or epidemic protocol is a procedure or process of computer peer-to-peer communication that is
based on the way epidemics spread.
https://en.wikipedia.org/wiki/Gossip_protocol
Key Managers:
A cryptographic key is defined as a string of data that is used to lock or unlock cryptographic functions. These
functions include authentication, authorization and encryption.
Cryptographic key management generally refers to key management. It is basically defined as management of
cryptographic keys that are used to deliver different purposes in a cryptographic network.
The basic cryptographic key management deals with the generation, exchange, storage, use, replacement and
destruction of keys. The process involves cryptographic protocol design, key servers, user procedures, and other
relevant protocols.
www.analyticssteps.com/blogs/what-cryptographic-key-management-and-how-it-done
Keystone:
An open sourced framework for building customizable TEE
https://arxiv.org/pdf/1907.10119.pdf
Modular:
Consisting of separate parts that, when combined, form a complete whole
https://dictionary.cambridge.org/us/dictionary/english/modular
Non-adaptive adversary:
The adversary can not take advantage of the information in the committee nodes to see if it controls the entire
committee. It has to instead constantly have the node it has compromised return the same answer over and over
again, but should the answer be correct, then it can deregister all the nodes in the system.
For more information see Appendix B in the whitepaper
ORAM (Oblivious Random Access Machine): a compiler that transforms algorithms in such a way that the resulting
algorithms preserve the input-output behavior of the original algorithm but the distribution of memory access pattern
of the transformed algorithm is independent of the memory access pattern of the original algorithm.
https://en.wikipedia.org/wiki/Oblivious_RAM
ParaTimes:
The Oasis Network is made up of two main layers: consensus layer and the ParaTime layer. These parts work together
to create a powerful yet versatile blockchain. The Consensus Layer is a scalable, proof-of-stake consensus run by a
decentralized set of validator nodes. ParaTimes connect to the Consensus Layer and periodically submit a record of
their transactions to be stored by the validator nodes on the Ledger.
Each ParaTime is made up of set of compute nodes , which provide a computing environment for smart contracts that
can be customized for a broad set of use cases. ParaTimes can be deployed by anyone on the Oasis Network.
This unique architecture allows transactions to be processed in parallel and for each ParaTime to be developed in
isolation — allowing the Network to grow and adapt as the needs of the ecosystem change.
https://medium.com/oasis-protocol-project/the-oasis-eth-paratime-is-live-on-mainnet-33d8713ec870
Proof of Stake:
A modification of PoW (Proof of Work) as a means to solve its perceived dependency on energy consumption as a
means to determine blockchain ordering.
Rather than rely on computers racing to generate the appropriate hash, the idea behind a PoS protocol is that
participation is determined by ownership of the coin supply.
Using a set of factors determined by the protocol, the PoS algorithm pseudo-randomly elects a node (anyone who
owns the coin) to propose the next block to the blockchain.
When a node gets elected, its role is to verify the validity of the transactions within the block, sign it and propose the
block to the network for validation.
https://www.kraken.com/en-us/learn/proof-of-work-vs-proof-of-stake
Rate limiting:
A strategy for limiting network traffic. It puts a cap on how often someone can repeat an action within a certain
timeframe – for instance, trying to log in to an account. Rate limiting can help stop certain kinds of malicious bot
activity. It can also reduce strain on web servers.
https://www.cloudflare.com/learning/bots/what-is-rate-limiting/
Replication:
Replication in computing involves sharing information so as to ensure consistency between redundant resources, such
as software or hardware components, to improve reliability, fault-tolerance, or accessibility.
• Computation replication, where the same computing task is executed many times. Computational tasks may
be:
• Replicated in space, where tasks are executed on separate devices
• Replicated in time, where tasks are executed repeatedly on a single device
https://en.wikipedia.org/wiki/Replication_(computing)
Verifiable Computing:
Verifiable computing (or verified computation or verified computing) enables a computer to offload the computation
of some function, to other perhaps untrusted clients, while maintaining verifiable results. The other clients evaluate
the function and return the result with a proof that the computation of the function was carried out correctly
en.wikipedia.org/wiki/Verifiable_computing