Documentation index

TPU Submissions

Slipstream can submit transactions directly to the current leader validator's Transaction Processing Unit (TPU) via UDP. This is a fire-and-forget mode: no confirmation receipt and no retry logic, so nothing waits between you and the leader.

How It Works

When you enable tpu_submission, Slipstream bypasses its normal routing pipeline and:

  1. Resolves the current slot leader from the leader schedule
  2. Looks up the leader's TPU address (UDP port)
  3. Sends your serialized transaction directly to the leader's TPU via UDP
  4. Returns immediately — no confirmation, no status tracking

This mirrors what Solana validators do internally when forwarding transactions, but from the closest Slipstream worker to the leader.

When to Use TPU Submissions

Good for:

  • Latency-critical arbitrage where you need to get a transaction to the leader ASAP
  • High-frequency strategies where you're already monitoring confirmation via gRPC/websocket
  • Scenarios where you have your own confirmation pipeline and don't need Slipstream to track status
  • Spam-resistant strategies where you're sending many transactions and only need one to land

Not good for:

  • Transactions that need confirmed delivery guarantees
  • Bundles (TPU submission doesn't support atomic bundles)
  • Scenarios where you need routing metadata or status tracking

Pricing

TPU submissions cost 2 tokens (0.0001 SOL) per transaction, compared to 1 token for standard submission.

Usage

TPU Submit — Rust

Rust
use allenhark_slipstream::{Config, SlipstreamClient, SubmitOptions};

let config = Config::builder()
    .api_key("sk_live_...")
    .build()?;

let client = SlipstreamClient::connect(config).await?;

// Fire-and-forget TPU submission
let result = client.submit_transaction_with_options(&tx_bytes, &SubmitOptions {
    tpu_submission: true,
    ..Default::default()
}).await?;

// Result returns immediately — signature may or may not be available
println!("Request ID: {}", result.request_id);
println!("Status: {:?}", result.status); // Will be "sent" — no confirmation tracking

TPU Submit — TypeScript

TypeScript
import { SlipstreamClient, configBuilder } from "@allenhark/slipstream";

const config = configBuilder()
    .apiKey("sk_live_...")
    .build();

const client = await SlipstreamClient.connect(config);

// Fire-and-forget TPU submission
const result = await client.submitTransactionWithOptions(txBytes, {
    tpuSubmission: true,
});

console.log("Request ID:", result.requestId);
console.log("Status:", result.status); // "sent" — no confirmation

TPU Submit — Python

Python
from allenhark_slipstream import SlipstreamClient, config_builder, SubmitOptions

config = config_builder().api_key("sk_live_...").build()
client = await SlipstreamClient.connect(config)

# Fire-and-forget TPU submission
result = await client.submit_transaction_with_options(tx_bytes, SubmitOptions(
    tpu_submission=True,
))

print(f"Request ID: {result.request_id}")
print(f"Status: {result.status}")  # "sent" — no confirmation

Combining with Streams

For best results, combine TPU submission with leader hint streams. Wait until the leader is in a region where Slipstream has a nearby worker, then fire:

TPU with Leader Hints — Rust

Rust
// Subscribe to leader hints
let mut hints = client.subscribe_leader_hints().await?;

while let Some(hint) = hints.recv().await {
    // Only submit when confidence is high
    if hint.confidence >= 80 {
        let result = client.submit_transaction_with_options(&tx_bytes, &SubmitOptions {
            tpu_submission: true,
            ..Default::default()
        }).await?;
    }
}

TPU with Leader Hints — TypeScript

TypeScript
await client.subscribeLeaderHints();

client.on("leaderHint", async (hint) => {
    if (hint.confidence >= 80) {
        await client.submitTransactionWithOptions(txBytes, {
            tpuSubmission: true,
        });
    }
});

TPU vs Standard Submission

StandardTPU
Cost1 token (0.00005 SOL)2 tokens (0.0001 SOL)
ProtocolQUIC/gRPC/WS/HTTPUDP direct to leader
ConfirmationYes — tracked through confirmed/failedNo — fire-and-forget
RetriesConfigurableNone
BundlesSupportedNot supported
RoutingSmart sender selectionDirect to leader TPU
Best forReliable deliveryAbsolute minimum latency

Confirming TPU Submissions Externally

Since Slipstream doesn't track TPU submission status, you'll need your own confirmation pipeline. Common approaches:

  1. gRPC Subscription — Subscribe to transaction status updates via Solana gRPC (e.g., Yellowstone)
  2. WebSocket — Use signatureSubscribe on a Solana WebSocket RPC
  3. Polling — Call getSignatureStatuses periodically (higher latency)

Next Steps