Skip to main content
Stake-Weighted Quality of Service (SWQoS) routes your transactions through Solami’s staked validator connections. Validators on Solana give priority to transactions forwarded from peers with stake — so your transactions land more reliably and confirm faster than when sent through an unstaked connection.

How it works

When you send a transaction through the standard RPC sendTransaction endpoint, it competes with all other traffic. With SWQoS:
  1. Your transaction is forwarded through Solami’s staked validator connections.
  2. Receiving validators recognize the stake-weighted source and prioritize the transaction.
  3. Your transaction lands with higher probability and lower latency.

Benefits

  • Better landing rates — validators prioritize transactions from staked peers, reducing drops
  • Faster confirmations — reduced time from submission to finality
  • Tip revenue share — earn up to 6% of SWQoS tip revenue generated by your transactions

Getting started

Before using SWQoS, create a dedicated SWQoS API key.
1

Create a SWQoS key

Go to Dashboard → API Keys → Create Key and select SWQoS Key as the key type.
2

Set your environment variable

Set SOLAMI_API_KEY to your SWQoS key. The solami crate reads this automatically.
export SOLAMI_API_KEY=your_swqos_key_here
3

Build a SWQoS client and send transactions

Use build_with_swqos() instead of build() to enable stake-weighted routing.

Usage example

This example builds a SWQoS client and lands a transaction using the solami Rust crate.
main.rs
#![allow(deprecated)]
use solami::system_instruction;
use solana_sdk::{
    pubkey::Pubkey,
    signer::{keypair::Keypair, Signer},
    transaction::Transaction,
};
use std::str::FromStr;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let _ = dotenvy::dotenv();

    // Build a client with SWQoS routing enabled
    let client = solami::from_env().build_with_swqos().await?;

    let payer = Keypair::from_base58_string(&std::env::var("SOLANA_KEYPAIR").unwrap());
    let recipient = Pubkey::from_str("11111111111111111111111111111112")?;

    println!("Payer: {}", payer.pubkey());
    println!("Recipient: {recipient}");

    let blockhash = client.get_latest_blockhash().await?;

    let ix = system_instruction::transfer(&payer.pubkey(), &recipient, 1);

    // Add a tip instruction to earn revenue share
    let tip_ix = solami::build_tip_ix(&payer.pubkey(), 0.0001);

    let tx = Transaction::new_signed_with_payer(
        &[ix, tip_ix],
        Some(&payer.pubkey()),
        &[&payer],
        blockhash,
    );

    let sig = client.land_transaction(&tx.into()).await?;
    println!("Transaction signature: {sig}");

    Ok(())
}
solami::from_env() reads SOLAMI_API_KEY from your environment. See API Keys for how to create a SWQoS key.
The build_tip_ix call adds a tip instruction to your transaction. Including a tip is required to participate in the tip revenue share program.

Next steps

Sending transactions guide

End-to-end guide to landing transactions with SWQoS.

API Keys

Create and manage SWQoS keys.

Plans

See which plans include SWQoS access.