Skip to main content

What is Marlin?

Marlin is a verifiable computing protocol leveraging TEEs to allow complex workloads (like DeFi strategies, automation tasks or AI models) to be deployed over a decentralized cloud. It allows both smart contract calls and web2 APIs to be used to rent instances or execute serverless functions. As a result, Marlin can be used as a coprocessor to scale blockchain applications. The compute network is also referred to as Oyster (named after the protocol upgrade that introduced TEE-based general purpose computing).

Kalypso, an illustrative app built on Oyster, is a circuit-agnostic ZK proof marketplace. It connects users who wish to delegate the compute, power and time-intensive task of ZK proof generation to specialized hardware operators who wish to increase resource efficiency. The matching engine for Kalypso is deployed on an Oyster node. This not only enables the matching and cancellation of orders with very low-latency, but also provides Kalypso the unique ability to support use cases involving private inputs.

More information on the Oyster and Kalypso protocols can be found at the links below:

Advantages

Marlin enhances the capabilities of blockchains in various ways:

  1. Performance scaling: Marlin boosts the effective throughput of blockchains by allowing computations to happen off-chain in dedicated nodes. The computations are still verifiable on-chain ensuring correctness.
  2. Off-chain data access and relay: Marlin allows programs to reliably access off-chain data using APIs, expose HTTPS endpoints to operate web 2 services and invoke smart contract transactions upon defined events.
  3. Chain abstraction: The middleware is compatible with any blockchain provided the relay and verification contracts are deployed on that chain. As it can support code written in any language and can also host backends, Marlin makes the blockchain transparent for users and developers alike.

Developer Guides

Smart contracts can delegate computations to Marlin by posting jobs on to a relay contract. Results are posted back on-chain along with an enclave attestation or ZK proof to prove that computations were carried out correctly. The Developer Guides for Oyster Serverless and Kalypso contain detailed steps and tutorials on how to use Marlin as a TEE or ZK coprocessor.

Oyster Serverless uses a common pool of nodes to execute jobs. It saves developers/protocols the hassle of leasing an exclusive instance, allowing them to only pay for the time it takes to perform the operation. While it provides a range of Instance Types, there can exist use cases where the standardized nodes or time limits made available by Serverless are insufficient. In such cases, developers can rent one or more Isolated Instances.

AI on Marlin

Isolated Instances provide the same TEE-based isolation and confidentiality guarantess as Serverless, and can be used in conjuction with relay contracts or web2 APIs for similar interactive experiences.

The Tutorials section under Developer Guides provides examples on how to deploy LLMs in an Oyster Isolated Instance.

Join the Network

The Marlin network consists of different kinds of hardware:

  1. Servers (like Amazon EC2)
  2. Servers with confidential computing support (like Intel SGX, AWS Nitro Enclaves)
  3. GPUs (like NVIDIA H100s)
  4. GPUs with confidential computing support (like NVIDIA H100s)

While Kalypso accepts any hardware suitable to generate ZK proofs for a given circuit, Oyster only accepts confidential computing instances. As a permissionless network, anyone can join as a node operator on Marlin. More information on the requirements and steps to join Oyster or Kalypso is available in the Run Nodes section.

Distinctive Features

Broadly speaking, some advantages of Marlin over alternate decentralized cloud or ZK coprocessing solutions include:

  1. Tamper resistance: Many decentralized cloud solutions offer vanilla servers which technically allow malicious node operators to manipulate the execution of programs and deliver incorrect results. Marlin’s confidential computing and ZK solution makes the execution tamper resistant.
  2. Data confidentiality: Similar to the point above, many decentralized cloud and ZK coprocessing solutions allow node operators to view data inputs. This prevents users from sending data or outsourcing programs they wouldn’t like to publicly share. Marlin’s confidential computing solution prevents node operators from snooping into programs or any data sent to them by users.
  3. Circuit agnostic: Most ZK coprocessors are designed for certain environments, RISC-V, WASM or MIPS and can only process programs written in compatible languages. Yet others are designed for specific use cases like accessing blockchain history. Marlin’s ZK proof marketplace is circuit and thus language-agnostic, allowing nodes to choose which circuits they would like to support.

Summary

Users can access Marlin through one of the following sub-networks:

  1. Oyster Isolated Instances - Allows confidential computing instances to be rented individually for any amount of time like one would on AWS or GCP. It comes with monitoring and uptime guarantees, provides developers a dedicated instance and is billed for the entire time it is rented.
  2. Oyster Serverless - Allows jobs to be transparently outsourced to the sub-network without having to bother with picking an instance, renting and paying for it any longer than each execution of the job. It comes with monitoring and uptime guarantees and the sub-network’s nodes are shared amongst all the sub-network’s users. The protocol pays for the nodes to be on standby and is compensated upon every task delegated by users.
  3. Kalypso - Allows ZK proofs to be generated for any circuit listed on the marketplace. The protocol pays for the nodes to be on standby and is compensated for every proof delegated by users.

Each of these sub-networks have their own sub-protocol, use cases and set of guarantees. Open-source contributions towards the specs of protocol upgrades, implementation of new features and tooling, or documentation are welcome!