> Agents can also search and read this documentation through its [MCP server](https://docs.quasar.win/~gitbook/mcp).

# Getting Started

#### Endpoint <a href="#endpoint" id="endpoint"></a>

`https://rpc.quasar.win`

Send your bundles to our endpoint. No authentication required, but it can [help with bundle inclusion](https://docs.quasar.win/authentication).

Send those tips to our **Coinbase** address at:

[quasarbuilder.eth](https://etherscan.io/address/0x396343362be2A4dA1cE0C1C210945346fb82Aa49) : `0x396343362be2A4dA1cE0C1C210945346fb82Aa49`

Please visit the [API](https://docs.quasar.win/api/eth_sendbundle) documentation for commands.


# eth\_sendBundle

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBundle",
  "params": [
    {
      txs,                  // Array[String], A list of signed transactions to execute in an atomic bundle
      blockNumber,          // (Optional) String, a hex-encoded block number for which this bundle is valid. Default, current block number
      minTimestamp,         // (Optional) Number, the minimum timestamp for which this bundle is valid, in seconds since the unix epoch
      maxTimestamp,         // (Optional) Number, the maximum timestamp for which this bundle is valid, in seconds since the unix epoch
      revertingTxHashes,    // (Optional) Array[String], A list of tx hashes that are allowed to revert
      droppingTxHashes,     // (Optional) Array[String], A list of tx hashes that are allowed to be discarded, but may not revert
      replacementUuid,      // (Optional) String, UUID that can be used to cancel/replace this bundle
      replacementSeqNumber, // (Optional) Number, monotonically increasing sequence for bundles sharing the same replacementUuid. Later bundles must have a higher sequence or they are dropped. If 0 or omitted, ordering falls back to builder receive time
      refundPercent,        // (Optional) Number, The percent(from 0 to 99) of full bundle ETH reward that should be passed back to the user(refundRecipient) at the end of the bundle.
      refundRecipient,      // (Optional) String, Address of the wallet that will receive the ETH reward refund from this bundle, default value = EOA of the first transaction inside the bundle.
      refundTxHashes        // (Optional) Array[String], Maximum length of 1 tx hash from which the refund is calculated. Defaults to final transaction in the bundle if list is not specified/empty.
    }
  ]
}
```

#### Sponsored Bundles

Quasar Builder now supports sponsored bundles. If you send a bundle with a transaction that fails with `LackOfFundForGasLimit`, we will send the ETH required to cover the gas fees.

The bundle must increase the builder balance in order to cover the cost of sponsoring the bundle.

### Example:

```json
{
  "jsonrpc": "2.0",
  "id": 123,
  "method": "eth_sendBundle",
  "params": [
    {
      "txs": ["0x123abc...", "0x456def..."],
      "blockNumber": "0xb63dcd",
      "minTimestamp": 0,
      "maxTimestamp": 1615920932
    }
  ]
}
```

### Example Response:

```json
{
  "jsonrpc": "2.0",
  "id": "123",
  "result": {
    {
    "bundleHash": "0x1234567890abcdef..."
    }
  }
}
```


# eth\_cancelBundle

`eth_cancelBundle` is used to prevent a submitted bundle from being included on-chain.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_cancelBundle",
  "params": [
    {
      replacementUuid // String, to uniquely identify submission
    }
  ]
}
```

{% hint style="info" %}
`replacementUuid` must have been set when bundle was submitted.
{% endhint %}

Example Response:

```json
{"result":200,"error":null,"id":1}
```


# eth\_sendRawTransaction

Send a single private transaction

```json
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "eth_sendRawTransaction”,
  "params": ["0x…4b"],  // Signed raw tx hex
}
```

Example Response:

```json
{"result":200,"error":null,"id":1}
```


# eth\_sendEndOfBlockBundle

This endpoint requires a valid X-Flashbots-Signature header to be included.

After building a block, any end-of-block bundle that contains a target pool that has been modified will be simulated at the end-of-block state. Successfully simulated bundles are then added to the block.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendEndOfBlockBundle",
  "params": [
    {
      txs,                  // Array[String], A list of signed transactions to execute in an atomic bundle, list can be empty for bundle cancellations
      blockNumber,          // (Optional) String, a hex-encoded block number for which this bundle is valid. Default, current block number
      revertingTxHashes,    // (Optional) Array[String], A list of tx hashes that are allowed to revert or be discarded
      targetPools,          // Array[String], A list of pool addresses that this bundle is targeting
      replacementUuid,      // (Optional) String, UUID that can be used to cancel/replace this bundle
      replacementSeqNumber, // (Optional) Number, monotonically increasing sequence for bundles sharing the same replacementUuid. Later bundles must have a higher sequence or they are dropped. If 0 or omitted, ordering falls back to builder receive time
    }
  ]
}
```

Example response

```json
{"jsonrpc":"2.0","result":null,"id":1}
```


# mev\_sendBundle

```json5
/*
    NOTE: optional fields are marked with a ?
    example: {
        privacy?: { ... } // privacy is optional
    }
 */
{
    jsonrpc: "2.0",
    id: string | number,
    method: "mev_sendBundle",
    params: [{ /* MevSendBundleParams */
        version: "v0.1",
        inclusion: {
            block: string,     // hex-encoded number
            maxBlock?: string, // hex-encoded number
        },
        body: Array<
            { tx: string, canRevert: boolean } |
            { bundle: MevSendBundleParams }
        >,
        validity?: {
            refund?: Array<{
                bodyIdx: number,
                percent: number,
            }>,
            refundConfig?: Array<{
                address: string,
                percent: number,
            }>
        },
        metadata?: {
            signer?: string,
            replacementNonce?: number, // Replace the bundle if higher
            cancelled: bool // Used for canceling
        },
        replacementUuid?: string
    }]
}
```

Example request:

```json
{
  "params": [
    {
      "version": "v0.1",
      "inclusion": {
        "block": "0x8b8da8",
        "maxBlock": "0x8b8dab"
      },
      "bundle": {
        "version": "v0.1",
        "inclusion": {
        "block": "0x8b8dab"
        },
        "body": [
          {
            "tx": "0x02f8730180843b9aca00852ecc889a008288b894c10000000000000000000000000000000000000088016345785d8a000080c001a07c8890151fed9a826f241d5a37c84062ebc55ca7f5caef4683dcda6ac99dbffba069108de72e4051a764f69c51a6b718afeff4299107963a5d84d5207b2d6932a4",
            "revertMode": "drop"
          },
          {
            "tx": "0x02f880058201d685e9103fda0085e9103fda368255f0940000c335bc9d5d1af0402cad63fa7f258363d71a8092696d206261636b72756e6e69696969696e67c080a0c5058ccf5759e29d4ad28e038f632a9b6269bbb0644c61447e0f14d56c453d73a048e877ee621c4b6be1234a8ad84379e80d45b288a7271e2b1aede7a04f06fd98",
            "canRevert": false
          }
        }
      ],
      "validity": {
        "refund": [],
        "refundConfig": []
      }
    }
  ],
  "method": "mev_sendBundle",
  "id": 1,
  "jsonrpc": "2.0"
}
```


# Makers

Titan compatible pAMM websocket.

### Endpoint

We currently have a single endpoint in us-east-1. Multi-region endpoints will be released shortly.

```
wss://rpc.quasar.win/ws/sendquoteupdate
```

### Submit quote (`ws/sendquoteupdate`)

```proto
message PWebsocketQuoteUpdateV1Args {
  // RLP-encoded quote-update tx bytes. Empty = cancel the replacement_uuid.
  bytes tx = 1;
  // single block this quote is valid for
  uint64 block_number = 2;
  // 16-byte quote identifier (raw UUID bytes).
  bytes replacement_uuid = 3;
  // Strictly increasing per replacement_uuid within a single block_number; must be > 0.
  // An update or cancel whose seq is not strictly greater than the highest
  // already seen for that (uuid, block) is dropped. The sequence resets each
  // block: seq=1 on a new block is valid regardless of the prior block's value.
  uint64 replacement_seq_number = 4;
  // when true, this quote is not shared between builder regions
  bool disable_cross_region_sharing = 5;
  // Pair keys this update writes. A given replacement_uuid is bound to one
  // pair set for the life of the connection — reusing a uuid for a different
  // pair set is rejected. Use a distinct replacement_uuid per pair.
  repeated bytes asset_pairs = 6;
  // Quote address taker has to touch (20-byte address) in order to receive a quote. 
  bytes quote_address = 7;
  // Pool addresses (20-byte address) for which this quote is needed if takers want to swap
  repeated bytes pool_addresses = 8;
}
```

### Response

```proto
message PWebsocketQuoteUpdateV1Response {
    // echoes the request's replacement_uuid
    bytes replacement_uuid = 1;
    // echoes the request's replacement_seq_number
    uint64 replacement_seq_number = 2;
    // server receive time, UNIX nanoseconds
    uint64 timestamp = 3;
    // empty on success; error detail on ingest failure
    string error = 4;
  }
```

### Pricing

Quote updates submitted through this endpoint do not pay priority fees.\
\
Currently makers will be charged on a per filled trade volume basis. Please contact us via telegram / discord, etc. for details.&#x20;

### Authentication

To authenticate your requests, include your API key in the `Authorization` header of each request.

```http
Authorization: <your-api-key>
```

### Configuration Options

We currently support the same configuration options as Titan, including conditional vs unconditional price quote updates, and a taker freshness buffer. These will be configured on setup.\
\
Please consult Titans documents for details: <https://docs.titanbuilder.xyz/propamms/makers>


# Authentication

We support authentication via [`X-Flashbots-Signature`](https://docs.flashbots.net/flashbots-auction/advanced/rpc-endpoint#authentication) Authentication is optional but will prioritize your bundles for inclusion during the block building process.

Our block building process involves multiple competing algorithms that find the most profitable block possible. By default, all bundles received go into our low priority queue.&#x20;

Sending a ***valid*** signature header will bump your bundle into the next highest queue as long as you consistently use that header.&#x20;

IMPORTANT: Sending an invalid header that does not correctly implement an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signature will result in a 401 error and the bundle being dropped. Also, sending headers using unique public keys on each request will cause you to be dropped into the low priority queue.&#x20;

Once an authenticated public key lands bundles, we further prioritize authenticated bundles based on your reputation score, which is a combination of your inclusion rate (how often your bundle increases our block value), and your average bundle value (max priority fees, coinbase tip).&#x20;

During the block building process, our algorithms will prioritize selecting bundles for inclusion based on your reputation. Maintaining a high inclusion rate and sending high-value bundles will get you selected sooner during the build process.

A basic outline of the priority system is as follows:

* **High** Priority: Valid signature header + high reputation
* **Medium** Priority: Valid signature header with successful simulations
* **Low** Priority: No signature header or new valid signature header
* **Dropped**: Invalid header

&#x20;&#x20;


# Bundle Tracing

Bundle tracing allows searchers to understand bundle behavior after submission, and why bundles did or did not get included in blocks.&#x20;

Bundle tracing will be delayed until at least 2 slots from the target block or maxTimestamp, and data will be available up to 24 hours after bundle submission.

When submitting a bundle, the response will include a bundle hash, which can be used to query your bundle status as follows. You must submit all bundle tracing queries to `stats.quasar.win.`

#### Request

```bash
curl -X POST https://stats.quasar.win \
  -H 'content-type: application/json' \
  -d '{
    "method": "quasar_getBundleStats",
    "params": [
      {
        "bundle_hash": "0x..123"
      }
    ],
    "jsonrpc": "2.0",
    "id": 1
  }'
```

#### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "status": "submitted",
    "builderPayment": "12934799399930",
    "error": null,
    "revertingHash": null,
    "receivedAt": 1753977388,
    "simulatedAt": 1753977388,
    "submittedAt": 1753977409,
    "blockNumber": 23040121,
    "targetBlock": 23040121,
    "minTimestamp": null,
    "maxTimestamp": null
  }
}
```

## Bundle States

The flow of bundles through the system is as follows

```
Received
    |
    +---> Invalid
    |
    +---> SimulationFail
    |
    +---> SimulationPass
    |         |
    |         +---> ExcludedFromBlock
    |         |
    |         +---> IncludedInBlock
    |                   |
    |                   +---> Submitted
    |                             |
    |                             +---> Landed
```

***

* Received&#x20;
  * Your bundle was received by the endpoint. If the bundle remains in this state, most likely the bundle was received too late into the block to be processed.
* Invalid
  * We were unable to parse your bundle. This indicates you need to troubleshoot your bundle formatting
* SimulationFail
  * If transactions revert that you have not listed in reverting or dropping hashes, the bundle will fail with this status. Another cause is when a bundle's value will not cover the refund payout. The response will list the specific error causing the simulation failure.
* SimulationPass
  * The bundle passed simulation, but was submitted too late to be considered for build inclusion.
* ExcludedFromBlock
  * Your bundle was successfully simulated, however, none of our block building algorithms chose it for inclusion in a block. This is typically because the value of the bundle, including priority fees wasn't enough to add to the block value.&#x20;
* IncludedInBlock
  * Your bundle was included by at least one of our algorithms in a block it assembled, but it wasn't selected for submission to the relay. This is likely because another algorithm produced a more valuable block that excluded your bundle.
* Submitted
  * Your bundle was included in a block that was sent to relays, and may have landed on chain.
* Landed
  * Congratulations! Your bundle landed in the block on chain.


# Builder Public Keys

Our builder will submit only using the following public keys. Blocks built from different public keys are not from our builder. Please be aware, that Extra Data can be set arbitrarily and we have seen instances of our builder being spoofed in the Extra Data field.

{% code overflow="wrap" fullWidth="false" %}

```rust
0x8db2a99d06eb076ab83049c2dfed5725ed5cf35772071f43365399ad32e505f0e3ff1e14b9686cd74562dc50c282be26
```

{% endcode %}

{% code overflow="wrap" fullWidth="false" %}

```rust
0x82c466b9b409277c24a6cd0973069fce0f1f7ef3c8d250f6503da5a22830b5c436e47ce0dc20e902b009875809328c49
```

{% endcode %}

{% code overflow="wrap" fullWidth="false" %}

```rust
0x88510a78794b69e07f73b2f3ee309f78fc372dcb2ed85d5f80bbe7ebc579778f2a7d6aafbb8b00c00cb7241e1c800d65
```

{% endcode %}

{% code overflow="wrap" fullWidth="false" %}

```rust
0x823e0146b1a5bfc5d4391f7f4391b4f170693369a2350c676238fb1bef4b2dc99bb99307f77e084920cdc7721c80b8df
```

{% endcode %}

{% code overflow="wrap" fullWidth="false" %}

```rust
0x91b123d8d788268e82a6b9bcc168061bf6f2b25e669feadb8c55b30c718473273e4e6f428c8b9e84074ea587a95ebce6
```

{% endcode %}

{% code overflow="wrap" fullWidth="false" %}

```rust
0xac23f8cca1198d05204b5de1931268b55dd647419fa1a8814d807adc58d86d464d8bae94c4c7b7793a716cfe2045ff04
```

{% endcode %}

{% code overflow="wrap" %}

```rust
0x8e7f955e0db90068d2910d673eee7f2a5473018bfe008583f9d55ce3ffbf726cfe9d749985aa6585abc4f1415c2c8602
```

{% endcode %}

{% code overflow="wrap" %}

```rust
0xb8ac8859f430d7422e70a0f000710624bc9cf68e0f4cf668acd34a3162da13e846135fe12469eafe4953d4abb10309ff
```

{% endcode %}


