A crypto exchange differs from most financial venues in one respect: when its front door stops opening, its market does not stop.
The matching engine keeps matching. The liquidation engine keeps reading a price assembled from other venues. The same asset keeps trading elsewhere, around the clock, with no closing bell to wait for.
So a customer who cannot log in for six minutes during a sharp move does not lose six minutes. They lose whatever the price did in that time, and sometimes the position itself.
What DDoS testing for a crypto exchange covers
DDoS testing for crypto exchanges is an authorised exercise that measures how a digital-asset trading venue behaves under denial-of-service load in the conditions attackers choose: volatility, new listings and withdrawal rushes. It covers the order-entry and market-data paths that market makers depend on, the login, margin and close paths that traders need in a fast market, the external price feeds the venue consumes, and the withdrawal pipeline from request to signed transaction.
The pass mark is not uptime. It is who could still act while the price moved.
If you want the sector-neutral parts first (scoping, authorisation, reading results), the complete guide to DDoS testing has them. Banks, brokers and payment firms on traditional rails have their own deadlines, set out in DDoS testing for financial services. This post is about venues that never close.
The market keeps moving while the door is shut
No closing bell, and no one else halts either
Equity markets have volatility interruptions and limit bands that pause trading when prices move too fast. Few crypto venues halt as a matter of rule, and none of them can halt the others.
If your venue is unreachable, price discovery simply carries on somewhere else. Your customers come back to a market that moved without them.
Attackers and crowds pick the same minutes
The busiest legitimate minutes on an exchange are the ones nobody scheduled: a liquidation cascade, a large hack at another venue, a macro headline in the middle of a weekend night. Logins, order placement, depth requests and app opens all jump together.
Those are also the minutes an attacker gains most from, whether the motive is extortion or plain disruption. A flood sitting on top of a volatility spike needs far less traffic to tip the system than one arriving on a quiet afternoon.
The record, with and without attackers
In April 2013, during a sharp bitcoin rally, the biggest bitcoin exchange of the day blamed DDoS attacks for severe trading lag, and days later suspended trading for about twelve hours to let the market cool down (reported by PCWorld and The Next Web, April 2013). Another large exchange reported DDoS attacks that took its platform offline more than once in 2017, a year of record volume (reported by SiliconANGLE, December 2017).
Volume alone does similar damage. On 19 May 2021, during a steep sell-off, several large exchanges slowed or became unreachable for some users, and the largest of them later said it would compensate some futures users who were affected (reported by CNBC, August 2021). That was not a DDoS. It shows what an attacker only has to add a little to.
Volatility moves every baseline at once
Detection tuned on a calm week sees a sell-off as an attack: request rates, new sessions and error rates all leave their usual bands together. Tuned loose enough to ignore a sell-off, it lets a flood arrive inside the crowd.
The useful number is your false positive rate on a replay of your worst legitimate day, not on an average one.
Locked-out traders still get liquidated
The engine runs on someone else's price
Perpetual futures and margin positions are marked against an index price built from spot prices on several other venues. That design is deliberate: it stops a thin moment in one venue's own book from triggering liquidations.
It also means a flood on your web and API tier does not pause the mark price. Liquidations keep firing on schedule. The only thing the flood removes is the customer's ability to respond: add margin, reduce the position, or close it.
The arithmetic of a margin call
Take a simplified isolated-margin position with a maintenance margin of 0.5%. At 10x leverage the initial margin is 10% of the position, so it is liquidated after an adverse move of about 9.5%. At 20x that falls to 4.5%, at 50x to 1.5%, and at 100x to half a percent.
Now let the price move 1% a minute against the position, which is fast but not unheard of in a cascade. The 10x trader has about nine and a half minutes to act. The 20x trader has four and a half. The 100x trader has thirty seconds.
A five-minute lockout is short by most industries' standards. It is longer than the whole margin of every position above about 20x in that model.
Why five minutes is a realistic lockout
On-demand mitigation that diverts traffic through a scrubbing provider typically takes minutes to engage, and the cutover itself can drop sessions. An exchange that relies on it has chosen to accept a lockout of roughly that length at the start of every attack. Always-on mitigation removes the diversion delay but not the question of whether your own gateways survive what reaches them.
Who pays for the lockout is a policy question
When customers cannot act and lose positions, the venue ends up deciding whether to compensate, and the decision gets made in public. The test should give it a number before that happens: for each leverage tier, how long login, margin top-up and close stayed unusable under a given flood.
The test
Run the flood during a replayed volatile session on a production-like environment, not a quiet one. Measure the time to a successful close and a successful margin top-up from a logged-in session, from a fresh login, and through the API, every thirty seconds for the length of the attack.
Market makers leave when the connection does
Cancel-on-disconnect empties the book
Market makers quote both sides of the book over persistent sessions, FIX or WebSocket. Many use cancel-on-disconnect, or a timer that cancels all their orders unless it is refreshed, so that a lost connection never leaves stale quotes standing in a moving market.
That is prudent for them. Under a flood that drops or delays their sessions, it means liquidity leaves the book at the moment it is needed most. Their own risk systems add to it: a market-data feed from you that goes stale for a few seconds is a reason to pull quotes everywhere on your venue.
A thin book makes every forced order worse
Liquidation orders do not wait for the book to recover. They fill into whatever depth is left, at worse prices than a full book would give.
When a liquidated position closes below its bankruptcy price, the loss comes out of the venue's insurance fund. When the fund cannot cover it, auto-deleveraging closes profitable positions on the other side. A flood aimed only at the gateways can reach the insurance fund without the matching engine ever slowing down.
A limiter that disconnects your liquidity
The general argument for keying limits on the API key rather than the source address is made in API DDoS testing. On an exchange the cost of getting it wrong is specific: market makers often run from the same few cloud regions and colocation sites, so a per-address limit tuned against a flood can disconnect several liquidity providers sharing an egress range.
Published limits are read by both sides
Exchanges publish their API rate limits, often with a weight per endpoint, because market makers need them to build compliant clients. An attacker reads the same page.
The heaviest unauthenticated request is usually a full-depth order-book snapshot. Cap the depth parameter, serve snapshots at fixed depths from a cache refreshed many times a second, and push clients who need more toward the incremental feed. Holding the feed itself open at scale is its own problem, covered in WebSocket DDoS testing.
The test
With the market makers' agreement, run their real or replayed sessions through the test environment while the gateways are flooded. Record session drops per firm, the time from a drop to their quotes leaving the book, and the depth within 1% of mid every second. Depth is the number that tells you what a forced order would have cost.
One sequencer, many doors
The matching engine cannot be spread out
A central limit order book needs one agreed order of events for each market. So each market's matching engine is a single sequenced process, usually with a hot standby, rather than a fleet you can scale out.
Everything in front of it can scale: web and app servers, REST and WebSocket gateways, FIX gateways, the pre-trade risk checks. The sequencer can only be protected, and the protection is admission at the gateways.
Refuse early, and keep a lane for risk-reducing orders
A gateway that accepts everything and lets the queue to the sequencer grow has turned a flood into latency for every order on the venue. Bound that queue, and refuse at the gateway once it is full.
What you refuse matters. Cancels, position closes and margin top-ups reduce risk for the customer and for the venue; new orders add it. Several venues have a documented cancel-only or post-only mode for incidents, and it is a better place to degrade to than offline. Under load, those lanes should be the last to be shed, not shed in arrival order.
The venue is a client too
The index that drives the mark price is built from other venues' public APIs. Your connectors to them are clients like any other, subject to those venues' rate limits, and those venues may be under attack at the same moment you are.
Know what your index rule does when constituents go stale: drop them, reweight, or freeze. Then confirm the alarm fires when fewer than your minimum remain. If the connectors share a saturated link with an inbound flood, their replies arrive on that link too.
The test
Flood the gateways and measure acknowledgement latency at the gateway and at the sequencer input separately; if the second climbs, admission is not working. Separately, in a test environment, cut index constituents one at a time and check that the mark price behaves as your published methodology says.
Withdrawals are irreversible, so the controls stay on
A withdrawal is a pipeline with people in it
A withdrawal passes through authentication and confirmation, address checks such as a hold on newly added addresses, screening, sometimes human review, signing from a hot wallet, and broadcast through the exchange's own nodes. Each stage has a cap: analysts on shift, the hot wallet's balance until someone tops it up from cold storage, the health of the nodes.
A flood does not need to break any of them. It only needs to fill the queue in front of the slowest one.
A flood can be cover
Using a flood as a distraction while accounts are taken over is a long-documented pattern in banking fraud. On an exchange the payoff is irreversible once a transaction is signed.
So an attack window is the worst time to relax a withdrawal control to clear a backlog. The test should prove the opposite: that screening and holds stay on under load, that review queues are visible, and that the people who approve exceptions are reachable.
An outage here is read as insolvency
Two large exchanges halted withdrawals shortly before they collapsed: one in February 2014, reported by Bloomberg, and one in November 2022, reported by Reuters. Crypto users remember both. "Withdrawals delayed" reads to them as a solvency warning, whatever the cause.
A flood that slows withdrawals for an hour can start a genuine withdrawal run: real customers, real outflows, legitimate load arriving on a pipeline that was already queuing.
Say what is happening from somewhere the flood cannot reach
The status page belongs on separate infrastructure and a separate provider. Prepare messages that separate "access is degraded" from anything about funds, and keep any reserves page static and cached. Who signs those messages off, and how fast, is worth arguing about in a DDoS tabletop exercise rather than during the run.
Keep the test off the chain
Never send test transactions on a public network, and never generate load that leaves your environment toward other nodes. Use testnets or a private chain for withdrawal-path tests. What you are testing is your own side: whether node loss or lag pauses deposit crediting safely, and whether the withdrawal queue drains in order once the flood stops.
Regulation now expects the evidence
In the EU, the Markets in Crypto-Assets Regulation (Regulation (EU) 2023/1114) brought exchanges under authorisation as crypto-asset service providers, with its provisions for them applying from 30 December 2024 and national transitional periods after that. DORA (Regulation (EU) 2022/2554) lists those authorised providers among the entities it covers, so its ICT resilience and testing duties apply to them. The DORA side is covered on DORA DDoS testing.
In the UK, crypto firms currently register with the FCA for anti-money-laundering purposes while a fuller regime is built; check its status before scoping. None of this is legal advice. A record of what you tested, at what load, and what you changed is useful under any of them, and also when a ransom DDoS note arrives timed to a listing.
What the test report should show the risk committee
| Measurement | Why it matters on an exchange |
|---|---|
| Minutes until close and margin top-up worked again, per leverage tier | the lockout compared with the margin customers had |
| Market maker sessions dropped, and seconds to quotes leaving the book | how fast liquidity left |
| Depth within 1% of mid, per second, through the attack | what a forced order would have paid |
| Insurance fund draw in a replay of the run | the cost that did not appear on any availability graph |
| Gateway versus sequencer-input latency | whether admission held at the edge |
| Cancel and close success rate against new-order success rate | whether risk-reducing orders kept their lane |
| Withdrawal queue depth and age per stage | where the pipeline filled first |
| Time to the first status message, and what it said | whether customers heard "access", not "funds" |
Abort criteria and production ceilings come before any of this, and testing without disrupting production sets them out; on an exchange, add a named contact at each participating market maker.
FAQ
Does DDoS mitigation stop liquidations during an attack?
No. Liquidation engines run inside the venue against an index price built from other venues, so they keep working while the web and API tier is flooded. What mitigation decides is whether customers can still reach the venue to add margin or close.
Should an exchange switch to cancel-only mode under a DDoS?
It is often a better degraded state than going offline, because customers can still reduce risk while new orders stop adding load. Decide the trigger, who can invoke it and how it is announced in advance, and test that cancels actually get through when the gateways are under load.
Why do market makers withdraw liquidity when an exchange is attacked?
Their sessions drop or their market data goes stale, and cancel-on-disconnect or their own risk limits pull every quote. It is the correct behaviour for them. The venue's job is to keep their sessions alive, by keying limits on API keys and protecting order-entry gateways separately from public traffic.
Can a DDoS test include blockchain nodes?
Only your own, in a test network. Never send test transactions on a public chain or generate load toward other operators' nodes. Test what your platform does when its own node is slow or lost: whether deposit crediting pauses safely and withdrawals queue in order.
Does MiCA require DDoS testing?
MiCA does not name DDoS testing. It requires authorised crypto-asset service providers to keep their services running, and DORA, which covers those providers, requires ICT resilience to be tested and evidenced. A DDoS test is one way to produce that evidence for availability.
Availability is measured in the customer's margin
Every serious exchange already knows its matching engine latency to the microsecond. It is the most measured component on the venue, and in most attacks it is the one that never slows down.
The numbers an attacker works with are different. How many minutes a 20x trader has in a fast market. How quickly market makers leave once their sessions wobble. How long withdrawals can queue before the community decides the cause is insolvency.
None of those appear on an uptime graph, and all of them can be measured before the next volatile weekend.
