Skip to main content

Cancel transactions

important

MEV Blocker provides a best-effort transaction cancellation feature. While we will notify all participating builders not to process the transaction, we cannot fully guarantee that the transaction won't be mined, particularly if the cancellation request is made close to the slot's end time.

Option 1: Set up free cancellations

This will stop MEV Blocker from broadcasting your previous transaction.

warning

The transaction may still be included if it has already been broadcast.

  1. Set softCancellations=true in the URL:

    https://rpc.mevblocker.io/noreverts?softCancellations=true
  2. Send a new transaction to self with the same nonce as the one you want to cancel.

    curl -X POST https://rpc.mevblocker.io/noreverts?softCancellations=true \
    -H "Content-Type: application/json" \
    -d '{
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransaction",
    "params": [
    "0x02f8..." // Signed transaction to self (to: your address) with same nonce as transaction to cancel
    ],
    "id": 1
    }'
    note

    This can be enabled only on /noreverts or /fullprivacy endpoints, soft cancellations won't work on /fast (the default).

Option 2: Cancel using eth_cancelTransaction

To cancel a transaction, use the eth_cancelTransaction method via your MEV Blocker RPC.

Use any MEV Blocker endpoint (for example, https://rpc.mevblocker.io/fast):

curl -X POST https://rpc.mevblocker.io/fast \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_cancelTransaction",
"params": ["0xb8101baf6bfd31243578e8847c12316f47318f567b02296fdf7fc783bef74826"]
}'

Next steps

Consider following these next steps: