SBCJuly 31Flashbots

dstack Private Inference Gateway and Attestation Interoperability_

Private inference is two problems at once: prompts and outputs must stay protected, and users need proof that the claimed model ran inside protected hardware. I build from that requirement toward an attestation-aware gateway that aggregates scarce confidential-compute capacity. The client should be able to verify a continuous encrypted path through a gateway to a GPU, even when providers use different evidence formats.

speaker Hang Yinruntime 27:14format talk + Q&Areading time ~11 min

Watch on Youtube

tl;dr

›
Private inference needs privacy plus proof.

Encrypting prompts and outputs protects the data path, while attestation gives a client evidence about the model, software, and trusted execution environment that handled the request instead of asking the client to accept an operator’s promise.

›
Confidential capacity has a bootstrap problem.

Small pools produce retries and poor user experience, which suppress demand and reinvestment; a TEE-native aggregator can combine providers only if it routes requests without breaking the private, verifiable path to the serving GPU.

›
Trust has to compose across every hop.

A gateway verifies its providers, can treat another gateway as an upstream, and presents one client-facing verification point; channel binding and attestation receipts are the connective tissue for a recursively extensible confidential-inference network.

If you're new to any of this

Private inference is useful only if a user can verify more than a promise. This talk treats privacy, capacity, and routing as one system: protected model providers pool supply behind a gateway while evidence follows the encrypted request path. The gateway should simplify a fragmented market without becoming an opaque point of trust. The central question is what must be proved at every hop.[6][3][4]

›A bit more background

Remote attestation is evidence, not a verdict. A TEE can report measurements of the hardware and software state it is running, while endorsements and freshness information help a verifier assess that report. The verifier must still choose which measurements and platform assumptions it accepts. Channel binding then connects an accepted attestation to the encrypted session that carries the request, reducing the risk that valid evidence is presented for one workload while traffic reaches another.[6][3]

A gateway adds another trust boundary because it selects an upstream inference service. Recursive verification means each gateway checks its direct upstream and returns the relevant evidence toward the client; an attestation receipt records what was checked for later inspection. This can simplify a heterogeneous provider network without making TEEs interchangeable. Hardware, firmware, gateway code, application bugs, side channels, denial of service, and verifier policy remain separate parts of the threat model.[3][4]

Show slides
01

Private inference needs proof

Private inference asks two questions at once: can a service keep prompts and outputs private, and can it prove that it did?

The proof can also answer which model served the request: someone paying for one model should not silently receive another. Without evidence, a provider may promise that it will never inspect your data, but that remains a promise. A backend engineer with access to the data and hardware can technically inspect an ordinary deployment. Organizational policy matters; it is different from isolating the data from the operator.

Running a model on-premise removes the cloud exposure, but replaces it with the cost and delay of owning scarce GPUs.

A conventional cloud provider restores capacity and convenience, but then you essentially hand it the data. Confidential computing tries to combine protected hardware with rented cloud compute instead. The user encrypts the request and sends ciphertext to a trusted execution environment; the TEE decrypts it, runs the model inside the protected boundary, and returns the result through the protected path. The user gets remote compute without owning the machine.

I describe the TEE as a black box that keeps the working data from the hardware administrator through encryption and isolation. That description has assumptions: I explicitly set aside extreme cases where an attacker compromises the hardware itself. The claim is protected execution under a threat model, not invulnerability.

Private inference diagram separates encrypted prompts and outputs from the provider operating the hardware.
slide 02Private inference needs protected data and evidence of protected execution.
02

Confidential capacity has a bootstrap problem

The appeal is obvious: rent confidential compute by the token without owning the GPU. The biggest obstacle is not the idea but capacity.

Confidential-computing providers may have a few protected GPUs, not thousands or tens of thousands. An AI agent makes that shortage visible immediately: it can spin up several sub-agents and send parallel requests, saturating a small pool all at once. Capacity that feels adequate for one human conversation can fail as soon as several branches arrive together, even when the privacy mechanism itself works as intended.

When that pool fills, users retry. A capacity error feels like a slow or unreliable TEE service even when the protected hardware is not the bottleneck.

That misdiagnosis drives the loop backward. Failed requests create a bad experience; a bad experience loses users; fewer users mean less revenue to buy more GPUs. No single provider wants to finance a huge confidential fleet before demand exists, yet demand cannot mature while requests regularly fail. The result is a supply problem that looks, from the outside, like a performance problem.

The desired flywheel reverses every arrow: more capacity improves the experience, which attracts users and revenue, which funds more GPUs. The bootstrap question is how to assemble enough supply without asking one operator to own the entire fleet first.

Capacity flywheel links available confidential GPUs, user experience, demand, revenue, and reinvestment.
slide 03The capacity flywheel stalls when weak service prevents demand and reinvestment.
03

Aggregate capacity without losing privacy

That is the chicken-and-egg problem: how do we assemble capacity before there are enough users to pay for it? My answer begins with aggregation.

Ordinary model routers already combine providers. OpenRouter is the familiar pattern: it finds an upstream with capacity and an acceptable result, then routes the request there. The user benefits from the group's inventory instead of waiting on one operator's machines. Confidential inference needs the same pooling effect because several small providers can collectively absorb traffic that would overwhelm each of them alone.

But the aggregator must be confidential-computing native. Pooling supply cannot solve fragmentation by terminating privacy at an ordinary load balancer.

The user should not have to manage which provider happens to serve each request, yet the request still has to arrive on the selected GPU privately and securely. Free capacity is not enough; the upstream must preserve the protected path. If it does, bursty traffic can move toward the GPUs that are ready while several small providers behave like one larger confidential pool.

Aggregation breaks the supply deadlock only if it does not recreate the trust problem in the middle. The gateway is part of the security model, not plumbing outside it.

Aggregator routes requests among confidential inference providers while retaining a protected client connection.
slide 04A confidential aggregator routes requests while preserving the protected client path.
04

Verify the full request path

A load balancer cannot find an arbitrary provider and send your request out, because in confidential computing, serving must come with proof.

“We don’t just serve, we also prove.”

— Hang Yin

The problem is that we need to make sure from the user to the aggregator to the GPU, this whole process is secure and private. The GPU can prove it is private, but it is not enough. We still want to make sure the router itself can prove the entire link is private. Proofs from Phala, NEAR, or another provider combine to show that your prompt will never get out of trusted execution environments.

The Private AI Gateway is the project proposed for that job. Its backend tracks the available private-inference providers, whether an upstream is a GPU or another service.

The gateway routes only when that upstream can prove it is secure and private enough. On the client side, the user still talks to one endpoint but wants evidence for the whole system. We combine the upstream proofs with proof for the gateway itself, so provider selection is not an invisible capacity check. The selected route and the evidence returned to the client have to agree.

The deck marks those protected links in purple. Each is end-to-end encrypted, and the client can verify what is running on the server side of the channel carrying the prompt and response.

Client, gateway, and GPU nodes form one encrypted chain with attestations at each boundary.
slide 05Client, gateway, and GPU attestations cover the complete encrypted request path.
05

Gateways become recursive trust building blocks

The architecture need not stop at one gateway. A narrow load balancer might route among several GPU TEEs, while another gateway treats it as one upstream beside direct providers.

The same verify-before-routing relationship can repeat at each layer. This is where each gateway becomes a composable building block: every gateway verifies the next layer, preserves the protected connection, and contributes proof back toward the client. Composition is useful because it avoids asking the client to inspect every machine directly, without letting an intermediate router disappear from the evidence chain.

“From the user side, you don’t need to verify everything. You just trust your counterparty.”

— Hang Yin

The user connects to one gateway, verifies it, and relies on that gateway to verify every upstream in the chain.

That recursion combines a network of TEEs and, in my description, lets the network extend almost without limit. It also keeps the edge interface small: a client connects in one place while each gateway verifies its direct upstream and passes the combined proof back toward the client.

That common edge matters because NEAR AI, Tinfoil, Phala, and other providers each prove their systems differently. The gateway offers one API while still understanding and checking the evidence underneath it.

Nested gateways recursively verify upstream providers while exposing one verification point to the client.
slide 06Recursive gateways verify upstream providers and expose one client-facing proof point.
06

The event-time implementation makes the proposal concrete

At the event, I described this as already operating through RedPill: with its TEE option enabled, protected models could come from our infrastructure or another provider.

That is an event-time deployment statement, not a timeless claim about every later release or route. The demonstration then opened the Private AI Gateway implementation in the dstack organization, making the architecture inspectable instead of leaving the gateway, route selection, and proof chain as boxes on a slide.

“It’s fully open source, and you can run that in any supported TEE environment.”

— Hang Yin, on deploying the gateway

The accompanying specification invites feedback on a common interface: trust model, workload identity, presentation of attestation evidence, and protocol-level end-to-end encryption.

For every provider, we have a table to make sure its implementation actually meets our standard before it can be included. The checklist verifies what is running in the confidential computing environment, how we make sure there is no backdoor, how we make sure it is end-to-end encrypted, and whether TLS terminates within the TEE. A new provider can simply make a pull request, and then we can include it in the gateway.

Once included, an upstream can serve RedPill or another gateway user. The demo showed multiple providers for one model and a monitor around those routes—closing the loop from reviewed proof to pooled capacity.

Project slide links the dstack gateway, provider review checklist, specification, and RedPill deployment.
slide 07The event demo links implementation, specification, provider reviews, and deployment.
T

Current repository status and security boundaries

›Current repository status and security boundaries

Repository check, retrieved September 2, 2026: the Private AI Gateway README calls v0.1.0 a developer preview. It describes attestation-bound channels, fail-closed upstream verification, and per-request receipts, but says receipts remain in memory and no public transparency log exists. dstack’s security model excludes side channels, application bugs, denial of service, and storage rollback; it also trusts selected hardware, firmware, and infrastructure. None of that contradicts Hang’s event-time statement that a gateway-backed offering was live. Deployment and release maturity answer different questions. Keep both time-scoped: the talk establishes what was running at the event, while the later repository snapshot records how maintainers described the software and its boundaries.[3][4]

08

What changes when providers are not fungible?

Audience

Do your usage stats come mostly from people using a ChatGPT-like interface in a TEE, or from agents?

Hang Yin

Measured by total tokens, agents consume far more than humans—perhaps 90 percent of usage. Some downstream services use our API to build private, ChatGPT-like products, but most usage still comes from agents and agentic code.

Audience

TEE providers are not fungible: their threat models, deployments, and model variants differ. Through the router API, how can a user know what they are buying?

Hang Yin

We apply two kinds of requirement. On security, if a provider cannot prove the user's prompt stays inside the TEE—or can upgrade the workload later and add a backdoor—we do not list it. On proof, an attestation can be traced to launch parameters, including where the model was downloaded and whether it is FP4 or FP8. The gateway stores the evidence so a user can request it, and users can restrict requests to a provider they accept.

Audience

Different TEE implementations provide different grades of security. How should a consumer reason about that through the gateway?

Hang Yin

We are not dealing with that yet. The routing layer could add customized logic such as quality benchmarks or business rules, but the Private AI Gateway currently provides the primitives. A user can specify one provider and exclude another.

Glossary

trusted execution environment (TEE) — A hardware-backed isolated environment that protects code and data from the surrounding host, including privileged host software. Its guarantees depend on measured software, trusted components, verification policy, and an explicit threat model. Isolation scope differs across implementations.[6]

remote attestation — Cryptographic evidence about the hardware and software state of a remote TEE. A verifier checks its measurements, endorsements, and freshness against an acceptance policy before trusting the protected workload or channel. It reports state; it does not guarantee application intent.[6][3]

channel binding — A link between an encrypted connection and verified attestation evidence. It helps ensure the channel carrying a request terminates at the workload whose measurements were accepted, rather than at an unverified intermediary. The verifier still needs a policy for acceptable endpoints.[3]

attestation receipt — A request-associated record of evidence and verification results. It lets a client inspect what a gateway accepted, retain an audit trail, and avoid treating the gateway’s bare assertion as sufficient by itself.[3]

References

  1. [01]Flashbots at SBC 2026 — Flashbots CollectiveFlashbots’ event recap lists the Agentic MEV agenda, speakers, and recordings.
  2. [02]About Phala — PhalaPhala’s team page lists Hang Yin as co-founder and CTO.
  3. [03]Private AI Gateway README — Dstack-TEEOpenAI-compatible gateway that verifies confidential providers and signs request receipts.
  4. [04]dstack Security Model — Dstack-TEEdstack’s security model defines trusted components, attestation checks, and excluded threats.
  5. [05]dstack — Dstack-TEEdstack is an open framework for verifiable AI applications in confidential virtual machines.
  6. [06]A Technical Analysis of Confidential Computing — Confidential Computing ConsortiumTechnical overview of hardware-attested trusted execution environments.