Skip to content
LATENS

§04Documentation

Build against sealed state.

What exists today: the devnet SDK, the encrypted account layout, and the parameters the network runs on.

Architecture

A confidential instruction crosses four boundaries. Exactly one of them can turn ciphertext back into a value, and it needs 64 independent parties to agree to do it.

ClientencryptctSolanaorder + settlectEvaluatorscompute blindctCommitteet-of-n revealplaintext result - visible to the owner only

01

Client keyring

Keys never leave the device. The client encrypts inputs and holds the only path to a plaintext result.

02

Solana settlement

Ordering, fees and account ownership stay on Solana. Latens adds a ciphertext field, not a new chain.

03

Evaluator mesh

Stateless workers that apply homomorphic circuits to ciphertext. They can compute; they cannot read.

04

Threshold committee

A t-of-n committee holds shares of the decryption key. Output is revealed only to the address that owns it.

Quickstart

The client SDK handles keygen, encryption and the re-keying dance for private outputs. Programs declare their circuit in Rust and are compiled to a homomorphic instruction set.

TypeScript · client

transfer.ts

import { Latens, seal } from "@latens/sdk";

const latens = await Latens.connect("devnet");
const keyring = await latens.keyring();          // stays in the browser

// balances are sealed under the committee key
const amount = seal(75n, keyring.publicKey);

const sig = await latens.invoke("transfer", {
  from: wallet.publicKey,
  to: recipient,
  amount,                                        // ciphertext, 3.1 KB
});

// only the owner can open the resulting balance
const balance = await latens.reveal(sig, keyring);
console.log(balance);                            // 337n

Rust · program

lib.rs

use latens_sdk::prelude::*;

#[latens::program(depth = 3)]
pub mod vault {
    use super::*;

    pub fn transfer(ctx: Context<Transfer>, amount: Enc<u64>) -> Result<()> {
        let from = &mut ctx.accounts.from.sealed;
        let to   = &mut ctx.accounts.to.sealed;

        // evaluated on ciphertext; no branch observes a value
        let ok = fhe::ge(from, &amount);
        *from  = fhe::sub(from, &fhe::mul(&amount, &ok));
        *to    = fhe::add(to,   &fhe::mul(&amount, &ok));

        Ok(())
    }
}

Shell

install

npm i @latens/sdk
cargo add latens-sdk
latens dev --cluster devnet

Network parameters

SchemeTFHE (CGGI)torus-based, programmable bootstrapping
LWE dimensionn = 1024128-bit classical security
Ciphertext3,128 Bpacked 64-bit integer
Noise budget128 bitsfresh ciphertext
Bootstrap cost~170 mssingle-threaded evaluator, devnet
Committeet = 64, n = 128proactive re-sharing per epoch
Epoch8 hourscommittee rotation interval
SettlementSolanaordering, fees, account ownership

Roadmap

  1. P0DevnetTFHE evaluator, 32-node threshold committee, encrypted SPL-compatible transfers.shipped
  2. P1Sealed programsRust SDK for encrypted account state; homomorphic ALU exposed as a Solana CPI target.active
  3. P2Encrypted inferenceQuantised transformer blocks over ciphertext; model weights sealed to the committee.next
  4. P3Mainnet-beta128-node committee, hardware acceleration, permissionless evaluator onboarding.planned

Questions

Is this a new chain?
No. Latens is an execution layer attached to Solana. Accounts, signatures, fees and ordering are Solana’s; Latens adds an encrypted data path and the machinery to compute on it.
Who can decrypt my state?
Only the key holder for private outputs. Public outputs are opened by a threshold committee where no member holds a complete key and at least 64 of 128 must cooperate.
What happens if the noise budget runs out?
The plaintext is unrecoverable. Programs declare their circuit depth statically, and the runtime inserts bootstraps so this cannot happen in a deployed program.
Can I run an evaluator?
On devnet, by request. Permissionless onboarding is gated on the P3 milestone, together with the slashing conditions for circuit-proof failures.