Peer-to-peer GPU compute · Freivalds-verified · Lightning-settled

Multiply giant matrices on other people's GPUs — and trust every result.

Matrix Compute splits your GEMM across a global pool of GPU workers. Each tile you receive is checked locally in O(n²) with Freivalds' algorithm before a Lightning HODL invoice settles — so you only pay for math that's correct.

Connecting… — workers online median —
$ pip install matrix-compute-sdk

import numpy as np
from matrix_compute import distributed_matmul

A = np.random.randn(16384, 16384).astype(np.float32)
B = np.random.randn(16384, 16384).astype(np.float32)
C = distributed_matmul(A, B)  # tiled → P2P GPUs → Freivalds-verified → paid
How it works

Trust the math, not the worker.

No reputation scores, no KYC'd data centres. Correctness is enforced cryptographically and economically.

01

Discover

Workers announce GPU model, VRAM, price and bond as Nostr Kind 30000 events. The SDK ranks them by price, VRAM and reputation.

02

Tile & stream

Your matrices are split with a bandwidth-aware strategy (OUTPUT_GRID_2D, OUTER_PRODUCT_1D, BLOCK_3D) and streamed over gRPC.

03

Verify in O(n²)

Each tile is checked with Freivalds (A(Br) = Cr, error ≤ 2−k) using a Higham floating-point bound. Cheaters get a signed fraud proof.

04

Settle per GFLOP

Lightning HODL invoices only settle after verification passes. Fraud slashes the worker's staked bond instead.

Live network

Workers online right now

Streamed directly from the matrix-compute-relay WebSocket (NIP-01, Kind 30000 WORKER_ANNOUNCE). Nothing here is cached or curated.

Connecting… relay — last event —
Workers online
—
— distinct operators
GPU workers
—
— total VRAM
Confidential CPU enclaves
—
AMD SEV-SNP · Intel TDX
TEE-attested workers
—
— peak FP32

By device type

peak FP32 · sats/GFLOP
DeviceOnlineVRAMComputeFloorMedian
No worker announcements received yet.

Relay health

—
Uptime
—
Announcements processed
—
Matchmaking success
—
Query latency (p50)
—

From GET /health and GET /telemetry/summary. Query the relay yourself — see the relay API docs.

Live pricing

Transparent, per-GFLOP market rates

Workers set their own sats_per_gflop. You set a ceiling (max_price_per_gflop) and only pay for verified tiles. No subscriptions, no minimum spend.

Network floor
—
sats / GFLOP
Median price
—
sats / GFLOP
Average price
—
sats / GFLOP
Staked bond liquidity
—
slashable on fraud

USD comparison vs. cloud GPUs

BTC/USD —
ProviderUSD / PFLOPUSD / TFLOP-hour
Cloud rows assume on-demand list price per GPU and 100% utilisation at peak dense FP32 — a best case for the cloud that ignores egress fees and queue time. 1 PFLOP = 106 GFLOP. Estimate a specific job with the MCP estimate_job_cost tool.
Example uses

Built for high compute-to-bandwidth workloads

Matrix multiplication is O(n³) compute over O(n²) data — the bigger the matrix, the more the WAN round-trip disappears into GPU time.

All guides →
LLM

Batched offline LLM inference & embedding search

Score millions of queries against a corpus with exact cosine similarity. OUTPUT_GRID_2D downloads every output element exactly once — zero reduction on your machine.

from matrix_compute_mcp.ai import distributed_cosine_similarity
scores, idx = distributed_cosine_similarity(queries, corpus, top_k=10)

Read the guide →

Aᵏx

Iterative scientific solvers

Power iteration, PageRank, spectral clustering. Lease remote VRAM so A uploads once, then stream only vectors — with probabilistic Freivalds spot checks each step.

from matrix_compute import distributed_power_iteration
v = distributed_power_iteration(A, iterations=200)

Read the guide →

L402

Autonomous agents that pay their own way

Agents call the MCP server, pay per matrix batch with an L402 macaroon and never need a credit card or cloud account.

See the MCP server →

Edge

Edge & constrained-device offloading

A Raspberry Pi or edge camera ships batched photogrammetry / neural-field matrices to remote GPUs and verifies the answer locally in O(n²).

Read the guide →

For AI agents · Model Context Protocol

Give your agent a verified GPU supercomputer

matrix-compute-mcp exposes the network to Claude Desktop, Cursor, Antigravity, LangChain and any MCP client over stdio JSON-RPC 2.0 — with L402 macaroon or trial-key auth.

MCP docs →

Exposed tools

5 tools
get_network_statusLive worker count, VRAM, TEE enclaves and sats_per_gflop from the relay.
estimate_job_costExact upload/download MB, task count, GFLOPs and sat cost before you run.
execute_distributed_matmulVerified C = A × B from .npy, .npz, .safetensors or inline arrays.
batch_similarity_searchExact top-k cosine similarity with zero-reduction OUTPUT_GRID_2D tiling.
compute_pca_svdVerified top-k randomized SVD or stateful power-iteration PCA.
# Try it instantly — hermetic mock network, no wallet needed
$ uvx matrix-compute-mcp --mock-mode

# Real network with your L402 macaroon (or a trial key)
$ uvx matrix-compute-mcp --live-mode \
    --l402-macaroon "$MATRIX_L402_MACAROON"
# Same verified primitives, straight from Python
from matrix_compute_mcp.ai import DistributedLinear, distributed_pca_svd

layer = DistributedLinear(in_features=4096, out_features=4096)
U, S, Vt = distributed_pca_svd(embeddings, k=32, method="randomized")
For GPU owners

Your idle GPU, paid per GFLOP in sats

Current network median: — sats/GFLOP. You set your own price; payouts stream to your Lightning node as tiles verify.

Operator guide →
  1. Run the installer

    Auto-detects NVIDIA / AMD GPUs, AMD SEV-SNP and Intel TDX enclaves, checks Docker and generates your worker Nostr keypair.

  2. Point it at your Lightning wallet

    Paste your payout address or node pubkey. The operator dashboard shows a QR code for funding your bond.

  3. Stake a bond, go live

    Your bond backs your results — it's only slashed if a consumer proves fraud with a signed Freivalds fraud proof. Auto-bond can sweep a share of early earnings for you.

  4. Watch it appear above

    Your announcement shows up in the live dashboard within seconds. No port forwarding — outbound-only reverse tunnels handle NAT.

curl -sSL https://matrix-compute.com/worker.sh | bash

# or with explicit pricing
curl -sSL https://matrix-compute.com/worker.sh | bash -s -- \
  --sats-per-gflop 0.0005 --min-task-sats 10

Technical paper

Trustless Distributed Matrix Multiplication: Verifying O(n³) GPU Compute in O(n²) with Freivalds' Algorithm, Zero-Reduction Spatial Tiling, and Lightning L402.

The complete engineering paper — dynamic Higham verification bounds, WAN spatial rooflines for 1D/2D/iterative tiling, multi-vendor confidential computing (AMD SEV-SNP/NVIDIA CCA), sub-millisecond L402 batch settlement, and NAT reverse tunneling — is published in full with empirical benchmarks.

Support hub

Get help, report bugs, meet other operators

Troubleshooting FAQ

My worker is running but doesn't appear on the dashboard.

Check that MATRIX_WORKER_NOSTR_RELAYS includes wss://relay.matrix-compute.net and that the node logs show an OK (NIP-20) response for its Kind 30000 announcement. Announcements older than the relay TTL (1 hour by default) are pruned, so the daemon must stay up to keep re-announcing.

Do I need to open ports / configure NAT?

No. The installer defaults to nat_mode=reverse_tunnel: your node opens an outbound gRPC tunnel to the relay, which proxies consumer traffic. If you have a public IP, set MATRIX_NAT_MODE=direct and expose port 50051 for lower latency.

My L402 payment fails with a macaroon / preimage error.

L402 tokens are macaroon:preimage pairs. Make sure the macaroon was minted by the same settlement service your client points at (MATRIX_SETTLEMENT_API_URL) and hasn't expired. With a local LND wallet, enable MATRIX_LND_PAYER_ENABLED=true and set CONSUMER_LND_REST_URL plus the macaroon/TLS paths.

How do I verify a worker's TEE attestation?

The SDK does it for you: with require_confidential_compute=True (the default) it verifies the hardware attestation chain and encrypts tiles end-to-end with AES-256-GCM. Pin a specific architecture with required_tee_type="amd-sev-snp", "intel-tdx" or "nvidia-cca". See Confidential computing.

How are fraudulent results handled? Can my bond be slashed unfairly?

A consumer can only slash a bond with a signed FreivaldsFraudProof containing the SHA-256 hashes of A, B and your signed result C, the random vector r, the vectors Br, A(Br), Cr and your signature over the result. The settlement oracle independently re-checks those vectors, so honest results can't be slashed. Floating-point noise is covered by a Higham error bound scaled to the matrix norms.

What precisions are supported?

fp32, fp16 and bf16. Verification tolerances scale with the unit roundoff of the chosen dtype.