How do Private mempools work

May 21, 2024

We often get questions on how our private mempool works and how it extracts MEV while protecting users and not slowing down transactions.

Private mempools

Private mempool allowing backruns arose late in 2022 (we were the first one), as a way to protect users from frontrunning (also called sandwiching) while generating revenue from backrunning.

Since launching, merkle has expanded to Polygon and BSC, protecting millions of transactions per month.

How does it work?

Changing your regular RPC endpoint to a private mempool endpoint will automatically protect all transactions. For example, merkle has a public rpc if you need protection right now (eth.merkle.io), or you can sign up on our blockchain services platform to generate a private RPC endpoint.

merkle will automatically intercept eth_sendRawTransactions, and store them in our private mempool.

Once a transaction arrives in the private mempool the following happens:

  • If the transaction has a pending status, an auction is created. If not, we wait until the transaction is pending.

  • While the auction is open, merkle accepts backrun bids from searchers.

  • The auction closes after 500ms:

  • If there are no bids, the transaction is sent to all major block builders.

  • If there are bids, the best bid is picked, and merkle creates a bundle {user transaction, backrun tx} and sends it to all block builders. The transaction is also sent directly to block builders, in the case where the bundle is faulty, the transaction will still get mined in the next block.

Important: merkle runs auctions differently than other private mempoool, allowing us to leverage more block builders and get transaction mined faster.

Slippage protection

The main reason private mempool started is to protect traders against sandwiching, or front-running bots. Sandwiches happen when a bot finds a public transaction with a slippage high enough that it can make a profit by sandwiching the transaction with a buy and sell.

Using a private mempool fully protects traders from sandwiches, as the transaction is never public. In addition, backruns will re-balance pools used in the transaction, providing a better price to the next traders in the block.

What private mempool to choose

Disclaimer: You are currently on the merkle blog, so we are biased. We will try to be as objective as possible.

We put together a comparison of all major mempools that you can find on merkle.io

379 W Broadway, New York, NY, 10012.

© Merkle Software Inc. All rights reserved.