# Neon Zero

> sendTransaction gated on each region's distance to the current slot leader.

Source: https://docs.constant-k.com/neon-zero/

Neon Zero gates `sendTransaction` on its own URLs by each region's distance to the current slot leader. It is built for automated traders that send many attempts, such as arbitrage bots.

## How the gate works

The Solana leader changes every four slots and moves between validators around the world. Each constant-k RPC region runs its own gate and measures its own distance to the current leader. The gate is open while the current leader is close to that region and its slot has just begun; otherwise it is closed.

While the gate is open, the transaction is sent. Up to 50 sends per second per API key per region go through the staked path; above that rate, sends go through the network path. While the gate is closed, the transaction is not sent to the network. If the gate cannot decide, for example while it restarts, it counts as closed: nothing is sent ungated.

Every send counts toward the API key's regular `sendTransaction` rate limit and request rate limit, whether the gate is open or closed, as on the other RPC URLs. Only sends that pass the gate use the 50 per second staked allowance.

## Endpoints

| Region                                | URL                                                               |
| :------------------------------------ | :---------------------------------------------------------------- |
| <Flag region="newyork" /> New York    | `https://neon-rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY`   |
| <Flag region="frankfurt" /> Frankfurt | `https://neon-rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` |
| <Flag region="amsterdam" /> Amsterdam | `https://neon-rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` |

Authentication is the same as on the other RPC URLs: the `api-key` query parameter or the `x-api-key` header. Existing URLs are unchanged.

## Plans

| Capability                                                                  | Free | Operator | Blade Runner | Nexus |
| :-------------------------------------------------------------------------- | :--: | :------: | :----------: | :---: |
| Neon Zero URLs                                                              |   —  |     —    |       —      |   ✓   |
| Staked sends through Neon Zero (50/s per key per region, then network path) |   —  |     —    |       —      |   ✓   |

## Responses

| Situation                                  | What happens                                                                   | Reply                                                                                      |
| :----------------------------------------- | :----------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |
| Gate open                                  | The transaction is sent.                                                       | The transaction's signature.                                                               |
| Gate closed                                | The transaction is not sent to the network, and constant-k does not resend it. | A normal success reply carrying the transaction's signature. The signature never confirms. |
| Gate unavailable                           | Handled as a closed gate: the transaction is not sent to the network.          | Same as a closed gate.                                                                     |
| Batch containing `sendTransaction`         | Refused.                                                                       | Error `-32600`: "sendTransaction cannot be batched on neon-rpc".                           |
| API key on another plan                    | Refused.                                                                       | HTTP `403` with error `-32600`: "neon-rpc is available on the Nexus plan".                 |
| Gate closed, transaction cannot be decoded | Not sent.                                                                      | Error `-32602`: "could not decode transaction".                                            |

Version 1 transactions (SIMD-0385) cannot be decoded while the gate is closed. Every other RPC method behaves as it does on the staked RPC URL.

> **A closed-gate reply is not delivery:** A closed gate returns the transaction's signature, but the transaction is never sent, so that signature never confirms. constant-k does not resend it. Whether to send it again is your client's choice; `getSignatureStatuses` shows which sends landed.

## Sending with Neon Zero

1. Point the client at the region's Neon Zero URL.
2. Send as usual.
3. Check the transaction's status by signature.

**TypeScript**

```ts title="neon-zero.ts"
import { Connection } from "@solana/web3.js";

const connection = new Connection(
  "https://neon-rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY",
);

// signedTx: a signed transaction, serialized
// lastValidBlockHeight: from the blockhash signedTx was built with
const opts = { skipPreflight: true, maxRetries: 0 };
const signature = await connection.sendRawTransaction(signedTx, opts);

while (true) {
  await new Promise((r) => setTimeout(r, 400));
  const { value: [status] } = await connection.getSignatureStatuses([signature]);
  if (status?.confirmationStatus) break;
  if ((await connection.getBlockHeight()) > lastValidBlockHeight) throw new Error("blockhash expired");
  // optional, your client's choice: send it again while it is unconfirmed
  await connection.sendRawTransaction(signedTx, opts);
}
```

**cURL**

```bash
curl "https://neon-rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"sendTransaction","params":["BASE64_SIGNED_TRANSACTION",{"encoding":"base64","skipPreflight":true,"maxRetries":0}]}'
```

## Measured landing rate

| Path      | Lands in the slot it was sent |
| :-------- | :---------------------------: |
| Network   |             \~39%             |
| Staked    |             \~46%             |
| Neon Zero |             \~77%             |

Measured in Frankfurt in October 2026, as the share of transactions that landed in the slot they were sent (slot+0). About 25% of sends pass the gate.

## Related

- [Sending Transactions](https://docs.constant-k.com/rpc/sending-transactions/)

- [sendTransaction](https://docs.constant-k.com/rpc/http/sendtransaction/)

- [Plans & Limits](https://docs.constant-k.com/get-started/plans-and-limits/)
