Definition
It is not a fee anyone charges: it is the order book's answer. An order larger than the size resting at the best price walks the next levels, and the fill is their average rather than the price first seen. The price can also move between the decision and the fill. Both show up as the same number, and both are paid by the side that was in a hurry.
On Hyperliquid a market order is bounded rather than unbounded. Through the API it goes out as an immediate-or-cancel order priced at the mid plus or minus a chosen slippage, so nothing fills past that price and an order can fill in part instead of at a price nobody expected. Our own commands take that bound as --max-slippage-bps, 300 basis points by default and anything from 1 to 5,000. The venue adds bounds of its own: a maximum market order value of $30,000,000 on markets whose maximum leverage is 25 or more, down to $500,000 under 10x, and TWAP suborders constrained to a maximum slippage of 3%.
What reduces it is depth, size and patience. A limit order resting on the book pays no slippage at all, but it may never fill. The agent counts the figure before it sends anything: the quote walks the levels its price bound can actually reach and gives the average it would fill at, and the distance from the mid is weighed with the fees and the funding against the gain aimed at. The simulation account fills the same way, at the average price of the live book it walks.
Formula
slippage = (fill_price - reference_price) / reference_price, signed against the trader (a buy fills higher, a sell lower), and multiplied by 10,000 to read it in basis points. In dollars it is size * (fill_price - reference_price).
Example
An example, in round figures. A market buy of 2 BTC meets a book showing 1 BTC at $100,000 and 1 BTC at $100,200. The fill averages $100,100: 10 basis points above the best ask, which is $200 on a notional of $200,200. Had the order been for 1 BTC, it would have filled at $100,000 with no slippage at all. Size is what turned the same book into a cost.