Self-Trade Prevention on Hyperliquid
Self-trade prevention stops orders from the same address from trading against each other, reducing accidental wash-like fills and unnecessary fees in multi-order strategies.
Hyperliquid's self-trade prevention protects an address from matching its own incoming order against its own resting liquidity. The documented behavior cancels the resting maker order when the conflict occurs, with no trade and no trading fee for that prevented self-match. This is important for market makers running many independent order decisions against one account.
Why self-trades happen
A strategy may quote both sides of a book, run several symbols, or have separate processes managing inventory and execution. Network delays and asynchronous state can cause one process to submit an order that would cross another order from the same address.
Without prevention, the account could create a meaningless trade with itself, pay fees, pollute fill statistics, and complicate accounting.
What Hyperliquid prevents
The protection is address-based. When the incoming order would match a resting order from the same address, the resting maker order is cancelled rather than filled.
Because no trade occurs, the event should not be treated as a market fill. Trading systems need to process the cancellation correctly or they may think the resting order is still active.
What it does not solve
Self-trade prevention is not a complete multi-strategy coordination system. Separate addresses can still trade with each other. Subaccounts, delegated structures, or independent entities can create interactions that an address-level rule cannot infer.
It also does not remove the need for order-state reconciliation. A bot that ignores cancellation updates can continue using incorrect inventory or quote assumptions.
Design implication for bots
Centralize order identifiers and maintain an authoritative view of resting orders. If multiple processes share one address, define which process owns each order and how cancellation events propagate.
For sophisticated market makers, avoiding self-crosses before submission is still preferable. Exchange-side prevention should be the backstop, not the strategy's primary coordination mechanism.