Soda Labs
Soda Labs Docs

MPC engine

Bubble's MPC engine delivers low-latency confidential computation using pre-garbled atomic circuits and a multi-evaluator online protocol.

Overview

Bubble’s MPC engine provides low-latency confidential computation by combining pre-garbled atomic circuits with a multi-evaluator online protocol.
Instead of compiling entire applications into one massive circuit, Bubble pre-produces small reusable building blocks such as ADD64, MUL64, LEQ, and MUX, and dynamically stitches them together at runtime.
This modular design enables predictable latency, efficient resource use, and burst-ready throughput on commodity hardware.

Roles and Responsibilities

Garblers deterministically generate garbled circuits for each atomic operation, bundle them in signed batches, and send them to storage through the GCManager. Garblers remain stateless apart from their keys and deterministic seeds.

Evaluators hold secret shares of wire labels and key material. They consume pre-garbled batches, securely execute user computations, and perform lightweight online soldering between circuits.

GCManager oversees orchestration. It tracks which batches are available, requests new ones when needed, and safely removes outdated batches once all evaluators have advanced beyond them.

MPC engine

Data Types and Flow

  • Inputtext™ is used when a user initially presents encrypted data to Bubble. It undergoes initial validation and subsequently gets transformed into "garbledtext" for subsequent computations.
  • Garbledtext™ is used either in operations or by passing secret data from contract to contract. This is actually a "handle" - an opaque reference pointing to encrypted data stored and managed off-chain by the MPC engine. This allows user data to remain private even while being actively used inside smart contract logic.

Soldering

Soldering connects outputs of one atomic circuit to inputs of another without revealing the underlying data. Soldering can also be auditable by using commitments over permutation bits so that an external verifier can confirm correct circuit stitching without learning any private data.

Inventory and Orchestration

Bubble’s MPC layer maintains a circulating inventory of garbled circuits. Evaluators cache ready-to-use circuits in memory, while the GCManager continuously monitors capacity, ensuring evaluators always have enough circuits available.
When evaluators signal that they are running low, the GCManager requests new batches from garblers and deletes older ones once all evaluators have confirmed progress.
This mechanism keeps the system responsive even under heavy load: garblers can run asynchronously, and evaluators can process transactions from cache without waiting for new garblings to complete.

Security and Integrity

Bubble’s MPC model supports multiple evaluators with threshold security. Privacy holds as long as fewer than the threshold number of evaluators collude, and correctness is enforced through:

  • Authenticated secret sharing that prevents evaluators from forging or altering label values.
  • Publicly auditable soldering that enables verification of correct input-to-output mappings without revealing sensitive data.

Summary

Bubble’s MPC engine turns confidential computation into a distributed inventory system. Garblers continuously supply verified garbled circuits, evaluators execute and solder them efficiently off-chain, and the GCManager coordinates capacity, recovery, and consistency.
The result is a scalable, auditable, and high-performance privacy engine that supports arbitrary confidential computations for users, securely and transparently.

On this page