Running the Exchange · Part 5Engineering · Operations

Transaction Prioritization: The Race From Request to Broadcast

When restores, sweeps, retail withdrawals, and institutional transactions all compete for the same queue simultaneously, how does the platform decide what goes first and what happens when the wrong decision blocks thousands of customers waiting behind it.

7 min read📅June 26, 2026⚙️Engineering🕐Operations
Raajeev Reddy
Raajeev Reddy

Engineering leader with 15 years leading engineering organizations across blockchain, digital health, and media platforms.

Earlier posts covered how funds move between cold and hot wallets, how per-asset limits are balanced, how address pools and coin selection work, and how dust accumulates and gets recovered. This post covers what happens the moment a customer hits withdraw: the race from request to broadcast, and every engineering decision that determines whether that race is won in milliseconds or lost for minutes.

The full cycle: from request to broadcast

When a customer submits a withdrawal request, four things must happen in sequence before that transaction reaches the blockchain. The platform controls the speed of the first three. The network controls the fourth.

Diagram 1 — Full Cycle: What the Platform Controls vs What the Network Controls
1. RequestCustomer submitswithdrawal2. Find liquiditySelect address.Check balance.3. SignKey management.Custody approval.4. BroadcastSent to network.Awaits confirm.Platform controls speedNetwork controls confirmationTime to liquidity (step 2 — the platform's most controllable lever)

Time to liquidity covers step 2 only: finding an available address with sufficient balance to serve the withdrawal. This is the portion the platform engineering team controls most directly. It must be fast enough that it never becomes the bottleneck.

Signingis step 3: authorizing the transaction through the platform’s key management and custody infrastructure. This step has its own latency depending on the custody architecture, which the upcoming custody series will cover in depth.

Broadcast is step 4: sending the signed transaction to the network. The platform controls when and how it broadcasts. It does not control confirmation time, but it does control the fee strategy that determines how quickly validators or miners pick up the transaction.

The cost of broadcast has come a long way. In earlier market cycles, a single Ethereum transaction could cost several dollars in gas during peak congestion. Today most chains have brought that to cents. At a platform processing one million withdrawals per day, the difference between a $2 average broadcast cost and a $0.02 cost is $1.98 million per day in operational savings. That is not a marginal efficiency. It is a structural cost advantage. The direction the industry is heading next is fractions of a cent per transaction, driven by Layer 2 adoption, improved fee markets, and next-generation chain design.

The restore-first problem

Here is a scenario that shows why transaction prioritization is not a performance optimization. It is a customer experience requirement.

It is 2pm. The hot wallet for ETH has drained below its threshold. A restore is triggered: 500 ETH needs to move from cold storage to the hot wallet. That restore transaction is now queued and waiting to be signed and broadcast.

At the same moment, 1,000 customer withdrawal requests for ETH are sitting in the queue behind it. Every single one is waiting for the same hot wallet the restore is replenishing. If the restore transaction is treated as just another item in the queue, it waits its turn. While it waits, all 1,000 withdrawals behind it are frozen. Customers see nothing for minutes or longer, with no explanation.

The correct design gives the restore transaction the highest possible priority. It is processed and broadcast first, ahead of every pending withdrawal. The moment the restore confirms and the ETH lands in the hot wallet, the 1,000 withdrawals behind it can be processed immediately. The customer-visible delay shrinks from the restore window plus the full queue length to the restore window only.

Diagram 2 — Restore-First Queue: Customer Wait Time in Each Scenario
Wrong: restore buried in queueWithdrawal 1 (processing)Withdrawal 2 (waiting)Withdrawal 3 (waiting)RESTORE (buried, waiting)Withdrawals 4-1,000 (all blocked)Customer waits: restore window + full queue lengthHot wallet empties. 1,000 customers blocked until restore confirms.Right: restore prioritized firstRESTORE (first in queue)Withdrawal 1 (ready to process)Withdrawal 2 (ready to process)Withdrawal 3 (ready to process)Withdrawals 4-1,000 (ready)Customer waits: restore window onlyRestore confirms. 1,000 withdrawals process immediately after.Priority design converts restore-window + queue-length wait into restore-window-only wait.

The same principle applies to sweeps. When the hot wallet is over its limit and a sweep must happen to reduce risk exposure, that sweep competes with customer withdrawals. A sweep delayed because it sits behind hundreds of retail withdrawals leaves the platform in an elevated risk state for longer than necessary. Sweeps must also carry high priority, though slightly below restores: a delayed sweep creates risk exposure while a delayed restore blocks customer funds directly.

The priority hierarchy that makes sense: Restores that unblock customer withdrawals sit at the top. Sweeps that reduce risk exposure sit next. Institutional withdrawals sit below that, given their lower volume and higher individual value. Retail withdrawals fill the remaining queue. Internal operations like dust consolidations run at the lowest priority during low-traffic windows.
Diagram 3 — Priority Stack: How the Queue Should Be Ordered
P1RestoresUnblock customer withdrawals. Highest urgency.P2SweepsReduce risk exposure. Time-sensitive but not blocking.P3InstitutionalLow volume, high value. Dedicated capacity reserved.P4Retail withdrawalsHigh volume. Parallel processing. Fills remaining queue.P5Dust / InternalConsolidations and sweeps. Runs during off-peak windows.Items lower in the stack are served only after higher-priority items are cleared or batched separately.

The architectural mistake that costs you twice

Many platforms, especially early in their development, build sends and receives as a single service. One service reads blocks to detect incoming deposits and handles outgoing withdrawal transactions. It seems efficient. The two costs it creates are less obvious.

The first cost: deposit surge delays withdrawals. When deposit volume spikes, the service spends most of its resources reading and processing incoming blocks. The outgoing send queue slows down. Customer withdrawals start to lag even though nothing is wrong with the hot wallet or the liquidity. The bottleneck is a shared resource that cannot prioritize both directions simultaneously.

The second cost: withdrawal surge delays deposit crediting. When withdrawal volume spikes and the send service is processing thousands of outgoing transactions, the block-reading logic that detects incoming deposits falls behind. Deposits are credited late. Customer balances do not update promptly. The platform appears to be malfunctioning when the underlying funds are perfectly safe.

This is not hypothetical. When the TRUMP token launched on Solana in January 2025, transaction volume spiked to tens of billions of dollars in a single day, the largest single-day DEX volume in crypto history at the time. The Solana blockchain maintained 100% uptime throughout the event. What customers experienced were exchange-level delays of up to 21 hours on Solana sends and receives. The infrastructure bottleneck was not the chain. It was the exchanges. Platforms that had not separated their send and receive services found both directions degrading simultaneously under load, while the underlying blockchain processed blocks normally. The lesson was not about Solana’s capacity. It was about what happens when exchange-level send and receive architecture is not designed to scale independently.

🚫Monolithic send and receive

One service handles both inbound block reading and outbound transaction signing and broadcasting. High deposit volume starves withdrawals. High withdrawal volume delays deposit detection. Both problems are invisible to the customer until the lag becomes severe enough to notice.

Separated send and receive

Dedicated services for inbound block scanning and outbound transaction processing. Each scales independently. Deposit volume spikes do not affect withdrawal throughput. Withdrawal surges do not delay deposit crediting. Failures in one do not cascade into the other.

Diagram 4 — Monolithic vs Separated Send and Receive Architecture
Monolithic: shared resourceBlockchainDeposit surgeSingle serviceBlock readingSigning + BroadcastingDeposits(credited late)Withdrawals(delayed)Deposit surge delays withdrawals.Withdrawal surge delays deposit crediting.Separated: independent scalingBlockchainReceive serviceBlock scanningDeposit detectionSend serviceSigningBroadcastingDeposits(credited promptly)Withdrawals(processed on time)scales independentlyscales independentlyDeposit surge cannot starve withdrawals.Failures stay isolated. Each side scales to demand.

The separation principle extends further. The send service itself can be decomposed into separate queues for institutional transactions, retail transactions, restores, and sweeps. Each queue carries its own priority level and scaling characteristics. Institutional transactions, being low volume and high value, can afford slightly more latency but require dedicated capacity so a retail surge never delays a large settlement. Retail transactions, being high volume and low value, require high throughput and parallel processing. Restores and sweeps carry the highest system priority and bypass the customer-facing queues entirely when triggered.

Accelerating stuck transactions on chain

Even with a well-designed internal queue, transactions sometimes get stuck after broadcast. Network congestion, gas price spikes, or a mempool that has moved against your fee estimate can all leave a transaction pending when the customer is waiting. Three mechanisms exist to address this, each chain-specific.

Child Pays For Parent (CPFP) on Bitcoin.When a transaction is stuck in the mempool with a fee that is no longer competitive, you create a new transaction that spends the unconfirmed output of the stuck one, attaching a high fee to the child. Bitcoin miners evaluate the combined fee rate of parent and child together. If the combined rate is attractive enough, they include both in the same block. The parent gets pulled through by the child’s fee. This is particularly useful when the platform is the recipient of a stuck transaction and needs the funds confirmed to serve a downstream withdrawal.

Replace By Fee (RBF) on Bitcoin. If the original transaction was flagged as replaceable at submission time, you can rebroadcast it with a higher fee rate. Nodes replace the lower-fee version in their mempools with the higher-fee version. Miners pick up the new one. The original is discarded once the replacement confirms. RBF is the faster and more direct mechanism when the platform is the sender and wants to accelerate its own stuck transaction.

Nonce replacement on Ethereum. Every Ethereum transaction carries a sequentially incrementing nonce. If a transaction with nonce 47 is stuck, you resubmit a new transaction with the same nonce 47 but a higher priority fee tip. Validators see both in the mempool and pick the higher-paying one. One critical constraint: if nonce 47 is stuck, nonce 48 and every transaction after it are also blocked. The entire account queue is frozen until the stuck nonce is resolved. Since EIP-1559, the replacement must increase both the max fee and the priority fee tip by at least 10% above the stuck transaction to be accepted by most nodes. At exchange scale, where hundreds of transactions may be in flight from the same address, nonce management is a core operational discipline, not an edge case.

Diagram 5 — Transaction Acceleration Mechanisms by Chain
Bitcoin: CPFPParent tx (low fee, stuck)+ Child tx (high fee, spends parent output)Miner confirms both for combined fee rateUseful when platform receives a stuck tx and n…eeds funds downstream.Bitcoin: RBFOriginal tx (flagged RBF, stuck)Rebroadcast: same tx, higher fee rateOriginal replaced. Replacement confirms.Fastest path when platform is the sender and w…ants to accelerate.Ethereum: Nonce replacementTx nonce 47 stuck (nonces 48+ frozen)Resubmit nonce 47 with higher priority feeReplacement confirms. Nonces 48+ unblock.Must increase max fee and priority tip by 10%+… or nodes reject it.

Customer experience SLAs and operational risk

Everything covered in this post ultimately serves two commitments the platform makes to its customers, whether explicitly or implicitly.

The first is a speed commitment. A customer who submits a withdrawal expects it to be broadcast promptly. The time from request to broadcast should be short enough that the customer never notices the internal machinery. When it is not, the platform erodes trust in a way that is hard to recover. Customers who experience delays during market volatility, which is exactly when they most need to move funds, do not forget. The SLA on time to broadcast is not a technical target. It is a trust target.

The second is a risk commitment. The platform has decided on a maximum hot wallet exposure. Every moment a sweep is delayed because it lost its priority in a crowded queue is a moment the platform is operating above its stated risk tolerance. Every moment a restore is queued behind retail withdrawals is a moment customer funds are at risk of being unserviceable. The priority queue is not just a performance mechanism. It is a risk management mechanism.

These two commitments pull in opposite directions at times. A restore that needs to jump the queue to unblock 1,000 withdrawals may temporarily delay a large institutional transaction waiting for the same signing infrastructure. A sweep that must happen immediately to reduce risk exposure may push a retail withdrawal batch to the next processing window. The platform cannot eliminate this tension. It can only design the priority system deliberately enough that tradeoffs are made by the system according to a coherent policy, rather than arbitrarily by whatever happens to be at the front of a shared queue.

The operational risk that compounds silently: A poorly prioritized queue does not announce itself. Customers experience delays. Operations teams see metrics drift. But the connection between queue design and customer experience is often invisible until a high-volatility event exposes it under load. By then, the fix is urgent and the damage is done. Queue architecture is one of those decisions that needs to be right before the stress test, not after it.
Next in this series: Bridging. When a customer wants to move funds from an L2 back to Ethereum mainnet, the exchange faces a seven-day optimistic rollup challenge window that neither it nor the customer wants to wait for. How exchanges absorb that risk, what it costs, and why L2s have little incentive to solve this problem faster.
Raajeev Reddy
Raajeev Reddy

Engineering leader with 15 years leading engineering organizations across blockchain, digital health, and media platforms.

← All writing