Solana AI Agent Protection

Drop-in MEV protection for Solana AI agents. Replace your RPC URL with YoorQuezt's protected endpoint and every transaction your agent sends is automatically shielded from sandwich attacks, frontrunning, and other MEV extraction.

Integration

Replace your Solana RPC URL with:

https://rpc.yoorquezt.io/solana

That's it. No SDK changes, no code refactoring. Your agent's existing Solana calls work exactly as before, but every sendTransaction is now routed through YoorQuezt's protection pipeline.

How It Works

Under the hood, YoorQuezt's Solana protection pipeline performs five steps on every intercepted transaction:

StepDescription
InterceptionsendTransaction calls are intercepted at the RPC layer. All other methods are proxied directly to the underlying Solana RPC.
AnalysisThe transaction is decoded and analyzed for MEV exposure: swap detection, token flow analysis, slippage estimation, and mempool risk scoring.
Jito SubmissionProtected transactions are bundled and submitted via Jito block engine, ensuring they land in a bundle tip-paying slot without exposure to the public mempool.
Backrun CaptureIf a profitable backrun opportunity exists after your transaction, YoorQuezt constructs and appends a backrun transaction to the bundle.
90% Rebate90% of any MEV captured from backruns is rebated to the originating wallet. Rebates accumulate and are paid out automatically.

Compatible Frameworks

YoorQuezt works with any Solana framework that accepts a custom RPC URL:

FrameworkIntegration
Solana Agent KitPass RPC URL in constructor
ElizaOSSet SOLANA_RPC_URL in environment
RigConfigure RPC in provider setup
GoatSet RPC URL in Solana plugin config
JupiterPass custom connection to Jupiter API
AnchorSet --provider.cluster or configure in Anchor.toml
@solana/web3.jsPass URL to new Connection()

Supported Methods

MethodBehavior
sendTransactionIntercepted -- analyzed, protected, and submitted via Jito bundle
getLatestBlockhashProxied to upstream RPC
getBalanceProxied to upstream RPC
getAccountInfoProxied to upstream RPC
getTransactionProxied to upstream RPC
simulateTransactionProxied to upstream RPC
getSlotProxied to upstream RPC
All other methodsProxied to upstream RPC

Code Examples

Solana Agent Kit

import { SolanaAgentKit } from "solana-agent-kit";

const agent = new SolanaAgentKit(
  PRIVATE_KEY,
  "https://rpc.yoorquezt.io/solana", // protected RPC
  { OPENAI_API_KEY: process.env.OPENAI_API_KEY }
);

// All agent transactions are now MEV-protected
await agent.trade(outputMint, inputAmount, inputMint);

ElizaOS

# In your .env file
SOLANA_RPC_URL=https://rpc.yoorquezt.io/solana
// ElizaOS picks up the env var automatically
import { createAgent } from "@elizaos/core";

const agent = createAgent({
  // Solana plugin reads SOLANA_RPC_URL from environment
  plugins: ["@elizaos/plugin-solana"],
});

Rig

use rig::providers::solana::SolanaProvider;

let provider = SolanaProvider::new(
    "https://rpc.yoorquezt.io/solana",
    keypair,
);

// Transactions through this provider are MEV-protected
provider.send_transaction(tx).await?;

Goat

import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai";
import { solana } from "@goat-sdk/wallet-solana";
import { Connection, Keypair } from "@solana/web3.js";

const connection = new Connection("https://rpc.yoorquezt.io/solana");
const wallet = solana({ connection, keypair });

const tools = await getOnChainTools({
  wallet,
  plugins: [/* your plugins */],
});

Jupiter

import { Connection } from "@solana/web3.js";

const connection = new Connection("https://rpc.yoorquezt.io/solana");

// Fetch Jupiter quote
const quote = await fetch("https://quote-api.jup.ag/v6/quote?...").then(r => r.json());

// Execute swap through protected RPC
const { swapTransaction } = await fetch("https://quote-api.jup.ag/v6/swap", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    quoteResponse: quote,
    userPublicKey: wallet.publicKey.toString(),
  }),
}).then(r => r.json());

const tx = VersionedTransaction.deserialize(Buffer.from(swapTransaction, "base64"));
tx.sign([wallet]);

// Sent via YoorQuezt -- MEV protected
const sig = await connection.sendTransaction(tx);

Anchor

# Anchor.toml
[provider]
cluster = "https://rpc.yoorquezt.io/solana"
wallet = "~/.config/solana/id.json"
import * as anchor from "@coral-xyz/anchor";

const connection = new anchor.web3.Connection("https://rpc.yoorquezt.io/solana");
const provider = new anchor.AnchorProvider(connection, wallet, {});

// All program interactions are MEV-protected
const program = new anchor.Program(idl, programId, provider);
await program.methods.swap(amount).accounts({...}).rpc();

@solana/web3.js

import { Connection, Keypair, Transaction } from "@solana/web3.js";

const connection = new Connection("https://rpc.yoorquezt.io/solana");

const tx = new Transaction().add(/* your instructions */);
tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;
tx.sign(keypair);

// MEV-protected submission
const signature = await connection.sendRawTransaction(tx.serialize());
console.log("Protected tx:", signature);
Edit this page