A blockchain gateway is one layer that sits between your product and every blockchain it talks to. Every read and every transaction goes through it. The gateway picks which RPC provider answers, moves the request when a provider fails, checks that the answer is current, and keeps a record of what happened.
(RPC, short for remote procedure call, is how software asks a blockchain node a question or hands it a transaction.)
Most teams already have one, by accident
A team starts with one RPC provider and one URL per chain. That works until the provider has a bad hour. So they add a second provider, and someone writes retry logic. Then a new chain arrives with a different interface, and the retry logic gets a special case. Two years on there is an internal RPC service that nobody planned and one engineer understands.
That service is a gateway. It was never named or designed as one, which is why it is usually missing half the jobs below.
The five jobs
- Connect. One endpoint for every network, each over its own interface: JSON-RPC, REST, gRPC or Tendermint.
- Route. Send each request to the provider most likely to answer it well right now.
- Recover. When a provider fails or falls behind the chain, send the request to another provider that can serve it.
- Verify. Check that an answer is current before the product acts on it.
- Record. Keep who answered, how long it took, what failed and why.
How it differs from things that sound similar
| What it is | Where it stops | |
|---|---|---|
| RPC provider | Runs nodes and sells access to them | Cannot protect you from its own outage |
| Load balancer | Spreads requests across endpoints | Treats any HTTP 200 as healthy, even from a node 200 blocks behind |
| RPC proxy | Forwards requests, often with retries and a cache | Often built for one interface family or one team's needs |
| General API gateway | Handles auth, rate limits and routing for web APIs | Knows nothing about block height, finality or duplicate transactions |
| Blockchain gateway | Carries all traffic to all chains, with routing, recovery, checks and records that understand the chain | Does not hold keys, sign, or decide what your product does with the answer |
The last row is the point. A node can answer quickly, with a clean HTTP 200, and still hand you a block from five minutes ago. A generic load balancer calls that a success. A blockchain gateway knows the chain has moved on. We cover the two neighbours in more detail in What is an RPC proxy? and RPC load balancing beyond round-robin.
When you need one
You probably need a gateway if any of these is true:
- You owe your own customers an SLA, so a provider's outage becomes your outage.
- You use two or more providers, or your own nodes next to a provider.
- You support more than a handful of chains, especially outside the EVM family.
- After an incident, nobody can say which provider answered a given request.
If none of them is true, one provider and one URL is fine. Come back when the second provider shows up.
Build or buy
Teams build this more often than they buy it. The first version takes a few weeks. The upkeep never ends: every new chain, every provider API change and every hard fork lands on the same small team. We wrote about that trade in Building an RPC router: maintenance tradeoffs.
Where Magma fits
Magma is a blockchain gateway. It supports 284 networks at the time of writing. You can run it with our providers, with yours, or with both, on our dedicated servers or inside your own network. Magma holds SOC 2 Type II and ISO 27001 certifications.
One honest limit applies to every gateway, ours included. It can only recover onto a provider you have configured. Two providers per chain gives you a fallback. One does not.
How exposed is your RPC stack?
Take the 2-minute Secure RPC Assessment and get a personalized risk report.
Run the assessment

