Jump to content
Onchain Report

Crypto news from every chain

Private swap relays hide trades from public bots before a block

Private swap relays keep pending trades out of the public mempool, which can limit copycat bots, but they still rely on intermediaries and block builders.

Onchain Report Newsroom#cd7e492 min read

Private swap relays hide trades from public bots before a block

Private swap relays send a trade to block builders without first showing it in the public mempool, the shared waiting area for pending transactions. That can make it harder for bots to copy or trade ahead of a swap before it lands in a block. It does not make the trade secret or guarantee a better price.

A swap often reveals its token pair, size and slippage limit while it waits to be included. Bots can use that information to try to profit from the trade, including by placing transactions around it. For a closer look at how route choice shapes a trade, see fermi swap. A private route changes who can see the pending transaction and when; it does not change the swap itself.

How does a private swap relay work?

A private swap relay forwards a signed transaction to selected block builders or validators instead of broadcasting it across the public network. A block builder assembles transactions into a proposed block and chooses their order. The relay may send the trade to one or more builders, depending on how the service works.

The wallet still signs the transaction, and the swap contract still checks its rules when it runs. Those rules may include a minimum amount to receive or a deadline. If the trade cannot meet them, it can fail. The relay’s role is to carry the signed transaction toward block inclusion while keeping it out of public view beforehand.

What does the relay hide before a block?

It hides the pending transaction from people and bots watching the public mempool. That can reduce the chance that a bot sees the trade early and tries to move the price around it, a tactic called a sandwich attack.

But “private” describes the route, not secrecy from every party. The relay and the builders it contacts can see the transaction’s contents unless the service uses a separate privacy method. Once included, the transaction and its details are visible on the public blockchain. Private routing also does not prevent ordinary price changes or ensure that a trade gets included quickly.

What should traders check before using one?

Check how the route handles delays, failed trades and fallback to public broadcasting. A fallback can improve the chance of inclusion, but it may expose a still-pending trade to public bots. Also check what the relay shares with builders and whether the wallet clearly shows which route it uses.

  • Slippage: Set a limit that reflects how much price movement you can accept. A private route does not stop the market moving.
  • Fees: Compare the quoted network fee and swap price. Privacy alone does not make the trade cheaper.
  • Inclusion: Check whether the transaction can remain pending or be sent through another route if builders do not pick it up.
  • Failure: Confirm what happens if the swap reverts, including whether you still pay a network fee.

For most traders, a private route is most useful when a visible swap could attract copycat activity and the wallet makes the routing and failure behavior clear. Treat it as one layer of protection. A sensible slippage limit and a route you understand still matter.