Offchain services powered by TEEs
Deploy your backends or extend your smart contracts on Oyster with minimal changes
Powerful Primitives
Designed for a secure and sovereign future
Built For Scale
Deliver a seamless web 2 experience with a decentralized backend

AI models
Run risk assessment algorithms for lending or margin protocols, develop recommendation systems for DeSoc or develop autonomous worlds with dynamic environments

Exchanges
Build low-latency high-throughput DEXes for spot, perps, options or futures with a verifiable matching and/or liquidation engine whose code can be compared against the executable

Oracles
Allow anyone to offer trustless price feeds secured by enclaves whether by simply querying web2 APIs and RPC endpoints or performing additional computation without fear of manipulation or data corruption

Gateways
Deploy decentralized web3 gateways for RPCs that bridge decentralized networks with native browsers, enabling seamless interaction between web3 apps and web2 environments

Games
Push quick updates to gaming servers with the familiarity of self-hosted infrastructure while leveraging low-latency geographical distribution, load balancing and auto-scaling benefits of a decentralized cloud network

Frontends
Decentralize your UI and relieve yourself of the stress of ensuring availability to your DApp while preventing phishing and ensuring HTTPS certificates are only issued to nodes serving the whitelisted codebase
Rent an Instance on Oyster Cloud
Scale With Serverless
Execute functions over a global pool of nodes
with zero DevOps overhead
import * as tfc from "@tensorflow/tfjs-core";
import * as tfl from "@tensorflow/tfjs-layers";
import '@tensorflow/tfjs-backend-cpu';
export default {
async fetch(request: Request): Promise
tfc.setBackend('cpu');
// Create a simple model.
const model = tfl.sequential();
model.add(tfl.layers.dense({ units: 1, inputShape: [1] }));
// Prepare the model for training: Specify the loss and the optimizer.
model.compile({ loss: 'meanSquaredError', optimizer: 'sgd' });
// Generate some synthetic data for training. (y = 2x - 1)
const xs = tfc.tensor2d([-1, 0, 1, 2, 3, 4], [6, 1]);
const ys = tfc.tensor2d([-3, -1, 1, 3, 5, 7], [6, 1]);
console.log(model);
// Train the model using the data.
await model.fit(xs, ys, { epochs: 250 });
await model.save({save: console.log});
let res = (model.predict(tfc.tensor2d([20], [1, 1])) as tfc.Tensor).dataSync()[0];
console.log(res);
return new Response(res.toString());
}, };Initialize TensorFlow.js for model building
Import core libraries and configure the CPU backend to support efficient model creation and computation.
Define a simple sequential neural model
Set up a foundational model architecture using a single dense layer for regression tasks.
Compile the model with optimizer settings
Configure the model with Stochastic Gradient Descent (SGD) optimizer and mean squared error loss function for training.
Prepare Input and Output training data
Define training tensors for a linear function, mapping x to y using y = 2x - 1.
Train the model and save results
Fit the model to training data for 250 epochs, then save and log the trained model output.
Predict values and return predictions
Use the trained model to predict new results and send predictions as a serverless response.
Questions?
We have answers
A trusted execution environment (TEE) is a secure area of a main processor. It helps code and data loaded inside it to be isolated from other processes usually at a hardware level in order to provide confidentiality and integrity. Data integrity prevents unauthorized entities from outside the TEE from altering data, while code integrity prevents code in the TEE from being replaced or modified by unauthorized entities, which may also be the computer owner itself.
Oyster is a sub-network of Marlin that specializes in offering TEE-based coprocessors. It is fast, cheap and secure. It allows instances to be rented individually for any stretch of time or for tasks to be delegated amongst a pool of nodes in a serverless way without individually renting instances and paying only for the duration of the task's execution. Nodes can be rented and tasks delegated using both smart contract calls and web 2 APIs. A set of auditors routinely query Oyster nodes to ensure uptime guarantees.
Oyster is very flexible and versatile. Developers can port existing web 2 applications on Oyster, write code in the programming language of their choice and use popular libraries and frameworks. Additional benefits include:
1. Secure: Hardware isolation ensures that programs run correctly as intended without exposing their contents and prohibiting interference from the host machine or its owner.
2. Fast: Oyster nodes are essentially like usual servers. There’s no redundancy in computation, complex protocol logic or cryptography. Thus, apart from a little TEE overhead for encrypted memory access, Oyster nodes are very performant and provide an experience similar to running programs on a normal machine.
3. Cheap: TEEs can be considered commoditized. While a little more expensive than vanilla servers, they are very cheap compared to blockchains, MPC, FHE or ZK proofs. Consequently, TEEs are a very affordable mode to carry out computations verifiably.
Oyster is a permissionless network. As such, programmers can contribute to its codebase, developers can build trustless web 3 applications by deploying their backends on Oyster nodes and infrastructure providers can run TEE-enabled Oyster nodes.
Features | Trusted Execution Environments (TEEs) | Zero-Knowledge Proofs (zk) |
---|---|---|
Main Purpose | Secure execution of code in an isolated environment | Prove knowledge without revealing it |
Scalability | Generally good, limited by hardware | Limited by computational overhead |
Performance | Faster as it leverages direct hardware support | Generally slower due to the cryptographic operations required |
Support for Complex Computations | Better suited for complex computations, given adequate TEE capabilities | Limited, best suited for simpler proofs |
Development Complexity | Medium, as it often involves utilizing existing hardware features | High, requires expertise in cryptography |
Integrity Verification | Verified by hardware and software measures internal to the TEE | Can be verified publicly without revealing underlying data |
Trust Model | Hardware-based trust; relies on the manufacturer and design of the TEE | Cryptographic trust; no need for trusted hardware |
Overhead | Low to medium, depending on the implementation | High, due to complex calculations |
Portability | Dependent on specific hardware and therefore less portable | Can be implemented in software across different platforms |
Data Privacy | Yes, data is protected within the TEE | Yes, no data is revealed |
Regulatory Acceptance | Subject to hardware security review and potential backdoor concerns | Subject to cryptographic review |
Attestation Capability | Hardware and software attestation mechanisms provide trust assurance | Mathematical proof provides attestation of correctness |
Finality | Instant execution within the TEE | Instant verification once proof is computed |
Maturity | Well-established with industry standards | Relatively new, rapidly evolving |