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

# Transaction Speed

> Sub-second execution optimized for Solana

Bookie is optimized for Solana's high-throughput architecture, delivering transaction execution without UI latency.

## Performance Breakdown

| Stage                 | Latency (p50) | Latency (p99) |
| --------------------- | ------------- | ------------- |
| Intent Parsing        | 42ms          | 78ms          |
| Route Calculation     | 110ms         | 245ms         |
| Transaction Build     | 8ms           | 15ms          |
| Pre-Flight Simulation | 12ms          | 28ms          |
| Broadcast             | 3ms           | 8ms           |
| **Total Pipeline**    | **175ms**     | **374ms**     |

## Solana Network Speed

Once broadcast, transactions are processed by Solana validators:

| Metric                   | Value                |
| ------------------------ | -------------------- |
| Block Time               | \~400ms              |
| Confirmation (Processed) | 1-2 blocks (\~800ms) |
| Confirmation (Confirmed) | 32 blocks (\~13s)    |
| Finality                 | 32 blocks (\~13s)    |

## Commitment Levels

Bookie monitors transactions at different commitment levels:

<Steps>
  <Step title="Processed">
    Transaction included in a block by a validator (not yet confirmed by cluster)
  </Step>

  <Step title="Confirmed">
    Transaction confirmed by supermajority of cluster (66%+ stake)
  </Step>

  <Step title="Finalized">
    Transaction finalized and cannot be rolled back
  </Step>
</Steps>

**Default Monitoring:** Confirmed (balance of speed and security)

## Optimization Techniques

### 1. Direct RPC Connection

Bookie connects directly to Solana RPC nodes without intermediary APIs:

```typescript theme={null}
const connection = new Connection(
  'https://mainnet.helius-rpc.com',
  'confirmed'
);
```

### 2. WebSocket Monitoring

Real-time transaction updates via WebSocket subscriptions:

```typescript theme={null}
connection.onSignature(
  signature,
  (result) => {
    if (result.err) {
      handleError(result.err);
    } else {
      handleSuccess();
    }
  },
  'confirmed'
);
```

### 3. Parallel Processing

Intent parsing and route calculation happen concurrently when possible.

### 4. Compute Unit Optimization

Transactions include optimal compute unit limits to prevent failures:

```typescript theme={null}
const computeUnitLimit = ComputeBudgetProgram.setComputeUnitLimit({
  units: 200_000
});

const computeUnitPrice = ComputeBudgetProgram.setComputeUnitPrice({
  microLamports: 1_000
});
```

## Network Congestion Handling

During high network load, Bookie automatically:

* Increases compute unit price for priority
* Retries failed transactions with exponential backoff
* Warns users of potential delays

<Warning>
  During extreme congestion, transaction confirmation may take 30+ seconds. Bookie will notify you of network conditions before execution.
</Warning>

## RPC Provider Selection

Bookie uses premium RPC providers for reliability:

| Provider  | Uptime | Latency |
| --------- | ------ | ------- |
| Helius    | 99.9%  | \~50ms  |
| Triton    | 99.8%  | \~60ms  |
| QuickNode | 99.7%  | \~70ms  |

## Transaction Priority

Bookie calculates optimal priority fees based on:

* Current network congestion
* Transaction complexity
* User urgency preference

**Default Priority:** Medium (50th percentile)

## Comparison to Other Chains

| Chain    | Block Time | Finality |
| -------- | ---------- | -------- |
| Solana   | 400ms      | \~13s    |
| Ethereum | 12s        | \~13min  |
| Polygon  | 2s         | \~30s    |
| Arbitrum | 250ms      | \~13min  |

Solana's architecture enables Bookie to deliver near-instant transaction execution.

<Note>
  Actual transaction speed depends on network conditions, RPC provider performance, and wallet approval time.
</Note>
