> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Earn SOL Rebates from Your Transactions

> Earn automatic SOL rebates via post-trade backruns with no additional risk of toxic MEV.

> [!NOTE]
>
> **This is an optional feature.** Helius will never participate in backrun
> rebates without your explicit permission. You must opt in by adding the
> `rebate-address` parameter to your transaction requests.

## What are Backrun Rebates?

Helius Backrun Rebates let you earn a share of the MEV (Maximum Extractable Value) your transactions create. When your trade generates profitable arbitrage opportunities you get paid a portion of the profits in SOL.

> [card] No Additional MEV Risk
>
> Your transaction executes first in bundles and MEV is extracted after
> execution

> [card] One Parameter
>
> Add `rebate-address` to your RPC URL - no code changes or contract
> modifications needed

## How It Works

### 1. Opt In

Add `rebate-address=<YOUR_SOL_ADDRESS>` query parameter to any `sendTransaction` call on mainnet. This feature is entirely optional - Helius only participates when you explicitly opt in.

### 2. Parallel Submission

Your transaction is submitted immediately, along with a bundle containing an arbitrage transaction. Because of this, no additional latency is incurred.

### 3. Automatic Payout

If the bundle lands on-chain, Helius automatically pays the agreed rebate directly to your specified address in SOL

### Understanding Backruns

Backrunning is a beneficial form of arbitrage that helps keep prices consistent across different exchanges. Unlike malicious MEV attacks, backrunning improves the network by correcting price imbalances created by large trades.

**Example**: When you buy BONK on Raydium, the price goes up on that exchange but stays the same on Orca. A searcher then buys BONK on Orca (cheaper) and sells on Raydium (higher price), capturing the difference as profit. With Helius rebates, you earn from this profit your trade created.

> [!TIP]
>
> **Bundle Execution**: Your transaction always executes first in the bundle
> before any searcher transactions.

> [card] How much can I earn?
>
> **You earn 50% of the MEV your trade creates** - Contact Helius if you have
> high volume to discuss custom terms.

> [!NOTE]
>
> **MEV Protection**: Your transaction executes first in bundles and MEV is
> extracted after execution, letting you profit from arbitrage opportunities you
> create.

## Quickstart Guide

Ready to start earning rebates from your trades? Get started in under 5 minutes with your existing transaction code.

> [tab] JavaScript/TypeScript
>
> ```javascript theme={"system"}
> // Create and serialize your transaction first
> const serializedTransaction = transaction.serialize().toString('base64');
>
> // Send transaction with rebate-address parameter
> const response = await fetch(`https://mainnet.helius-rpc.com/?api-key=${API_KEY}&rebate-address=${REBATE_ADDRESS}`, {
>   method: 'POST',
>   headers: {
>     'Content-Type': 'application/json',
>   },
>   body: JSON.stringify({
>     jsonrpc: '2.0',
>     id: 1,
>     method: 'sendTransaction',
>     params: [
>       serializedTransaction,
>       {
>         skipPreflight: true,
>         preflightCommitment: 'processed'
>       }
>     ]
>   })
> });
>
> const result = await response.json();
> console.log('Transaction sent:', result.result);
> console.log('Rebates will be paid to:', REBATE_ADDRESS);
> ```

> [tab] Python
>
> ```python theme={"system"}
> import requests
> import json
>
> # Serialize your transaction first
> serialized_transaction = transaction.serialize().decode('utf-8')
>
> # Send transaction with rebate-address parameter
> url = f"https://mainnet.helius-rpc.com/?api-key={API_KEY}&rebate-address={REBATE_ADDRESS}"
>
> payload = {
>     "jsonrpc": "2.0",
>     "id": 1,
>     "method": "sendTransaction",
>     "params": [
>         serialized_transaction,
>         {
>             "skipPreflight": true,
>             "preflightCommitment": "processed"
>         }
>     ]
> }
>
> response = requests.post(url, json=payload)
> result = response.json()
> print(f"Transaction sent: {result['result']}")
> print(f"Rebates will be paid to: {REBATE_ADDRESS}")
> ```

> [tab] Rust
>
> ```rust theme={"system"}
> use reqwest::Client;
> use serde_json::json;
>
> // Serialize your transaction first
> let serialized_transaction = bs58::encode(&transaction.serialize()).into_string();
>
> // Send transaction with rebate-address parameter
> let url = format!(
>     "https://mainnet.helius-rpc.com/?api-key={}&rebate-address={}", 
>     api_key, rebate_address
> );
>
> let client = Client::new();
> let payload = json!({
>     "jsonrpc": "2.0",
>     "id": 1,
>     "method": "sendTransaction",
>     "params": [
>         serialized_transaction,
>         {
>             "skipPreflight": true,
>             "preflightCommitment": "processed"
>         }
>     ]
> });
>
> let response = client.post(&url)
>     .json(&payload)
>     .send()
>     .await?;
>
> let result: serde_json::Value = response.json().await?;
> println!("Transaction sent: {}", result["result"]);
> println!("Rebates will be paid to: {}", rebate_address);
> ```

> [tab] cURL
>
> ```bash theme={"system"}
> # Send transaction with rebate-address parameter
> curl -X POST \
>   "https://mainnet.helius-rpc.com/?api-key=${API_KEY}&rebate-address=${REBATE_ADDRESS}" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "jsonrpc": "2.0",
>     "id": 1,
>     "method": "sendTransaction",
>     "params": [
>       "YOUR_SERIALIZED_TRANSACTION_BASE64",
>       {
>         "skipPreflight": false,
>         "preflightCommitment": "processed"
>       }
>     ]
>   }'
> ```

> [!NOTE]
>
> **Important**: Only single-transaction requests on **mainnet** qualify for
> rebates. Batch RPC calls and devnet transactions are automatically skipped.

## How Helius Protects You

Unlike other validators who could engage in malicious forms of MEV, Helius only permits post-trade backruns.

> [card] Post-Trade Only
>
> Helius only permits **post-trade backruns** - no frontrunning allowed

> [card] Fully Verifiable
>
> All bundle activity visible **on-chain** for complete transparency

## FAQs

> [accordion] What is MEV?
>
> MEV is Maximal Extractable Value. It's the profit validators can make by
> reordering transactions in blocks.

> [accordion] How much will I earn?
>
> You earn 50% of the MEV your transaction creates. Contact Helius if you have
> high volume to discuss custom terms.

> [accordion] When do I get paid?
>
> Rebates are paid automatically in SOL in the same block as your transaction.

> [accordion] Is this safe?
>
> Yes. Your transaction executes first in bundles with pre-approved searchers
> who can only perform post-trade backruns.

## Support

Have questions or need help getting started? Reach out to our support team:

> [card] [Developer Community](https://discord.com/invite/6GXdee3gBj)
>
> Join thousands of developers building on Solana. Share knowledge, get help,
> and connect with peers.

> [card] [Direct Support](https://dashboard.helius.dev/support)
>
> Get help directly from the Helius team. Available to Developer plan
> subscribers and above.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.