Getting started for developers
What Bubble is, how confidential computation works end to end, and what you need before writing your first private contract.
Overview
Bubble is a service designed to enhance blockchain functionality.
It supports secure multi-party computation (MPC) over encrypted data, allowing smart contracts to operate on values without revealing them to validators, sequencers, or other participants.
Bubble enables Solidity developers to use encrypted values in their contracts, with a secure off-chain MPC layer handling computations.
The outcome: privacy-preserving smart contracts that work seamlessly with existing EVM chains.
It does this by combining:
- MPC protocols,
- Custom Solidity precompiles and libraries, and
- Off-chain secure nodes coordinated with on-chain contracts.
⚙️ Core Idea
Normally, blockchain can only handle plaintext values (numbers, addresses, etc.).
Bubble adds support for encrypted types, like gtUint8, gtUint64, gtUbool, etc., that can still be computed on deterministically.
When you write:
gtUint64 a = MPCCore.setPublic64(10);
gtUint64 b = MPCCore.setPublic64(20);
gtUint64 c = MPCCore.add(a, b);this doesn’t happen inside the chain directly, instead:
- The on-chain smart contract emits events describing the requested operation.
- The Bubble network (connector) picks up the request and forwarded it to the MPC Engine.
- The MPC engine (garblers, evaluators) performs the actual encrypted computation off-chain and return them to the connector.
- The connector saves all results.
- Decryption result (unencrypted and signed) is posted back on-chain.
- Optionally, the user can request encryption of their data via the User Interactor interface.
Architecture
At a high level, Bubble has these main entities:
- Solidity SDK - Developer library that exposes encrypted types, arithmetic, comparison, and OPRF functions.
- Connector - Bridges between the chain and the MPC network; listens to contract events and dispatches jobs.
- MPC Engine - Executes encrypted operations over ciphertexts in MPC.
Data types
Bubble introduces new encrypted data types compatible with Solidity:
- Booleans:
gtBool - Unsigned Integers:
gtUint8, gtUint16, gtUint32, gtUint64, gtUint182, gtUint256 - Input:
itBool, itUint8, itUint16, itUint32, itUint64, itUint182, itUint256for handling encrypted input data
Detailed explanation can be found at Supported types section.
Secure Operations
Bubble’s supports arithmetic, logical, and comparison operations, all performed securely off-chain through MPC while remaining encrypted on-chain.
- Arithmetic operations: addition, subtraction, multiplication, division, remainder.
- Comparison - equal, not equal, less than, less that or equal, greater than, greater that or equal.
- Bitwise operation - and, or, xor, not.
- Conditional operation - mux.
- Random generation.
- Utility operations - encrypt public value, validate inputtexttm, request decryption, max, min.
- Transfer operations.
Detailed explanation can be found at Operations on encrypted types section.
Access control list (ACL)
Bubble manages an ACL contract that securely defines and enforces which users or contracts are authorized to access, compute on, or decrypt specific encrypted data handles within the network.
A smart contract developer can grant two types of permissions:
- Persistent access:
MPCCore.permit,MPCCore.permitThisgrants permanent permissions for handles. - Transient access:
MPCCore.permitTransientprovides temporary access for specific transactions.
The developer can also validate user permission for a specific handle using the functions: MPCCore.isSenderPermitted(handle), MPCCore.isPermitted(handle, account), MPCCore.isPermittedTransient(handle, account), MPCCore.isPermittedPersistant(handle, account)
Detailed explanation can be found at Access Control List section.