Velocity ProtocolDevelopers
Trading

Auctions

Why a market order walks its price instead of taking the book, and what the program does to the parameters an order carries.

Every market order on Velocity, and every crossing limit order that is not post-only, carries a short Dutch auction: the price starts somewhere favorable to the taker and walks toward the order's limit over a fixed window, and anyone can fill it at whatever the price is when they get there.

Why an order is not filled instantly

Taking whatever rests on a book works when the book is deep, continuous, and updated faster than anyone can react. On a chain with block times in the hundreds of milliseconds, none of those hold: whoever lands a transaction first takes the order at the worst price its slippage tolerance allows, and a maker who would have quoted tighter never gets the chance.

The mechanism

The auction reverses the incentive. The price starts good for the taker and bad for a filler, and walks toward the limit price over the auction's duration. A maker who wants the flow has to take it early, while it is still favorable to the taker, or wait and risk losing it. Waiting only pays if nobody wants the order at all.

How the auction price moves

Auction, 10 units (4s)0510400ms units since the auction starts100.00100.05100.10Auction price, USDOracle, $100.00Auction price, a straight line from $100.00 at unit 0 to $100.10 at unit 10After unit 10 the auction is over and the rest of the order can fill at the $100.10 limit until it expiresMaker fills at $100.05Maker fills at $100.05
A long market order with the oracle at $100.00, an auction start price of $100.00, an end price of $100.10 (the taker's limit), and an auctionDuration of 10 (10 x 400ms = 4 seconds). The auction price moves in a straight line from start to end, so a maker quoting $100.05 can fill from 2 seconds in onward. After 4 seconds the auction is over and any size still unfilled can fill at the limit price until the order expires, drawn as the dashed line. The numbers are the worked example on this site, not live market data. The unit is wall clock, not a live slot, and the program can raise a requested duration, so a real auction may run longer than 4 seconds.

An order might start 0.05% better than the estimated fill price and end at the worst acceptable fill plus a 0.05% buffer. Anyone can fill it anywhere along that line, and afterwards the remainder can still fill at the end price until the order expires. Prices can also be set as offsets from the oracle, so the ramp tracks it instead of stranding at a stale level.

The requested duration is a floor, not a fixed value. The program can lengthen it, and it can move the start and end prices. What it will not do is let the auction fill worse than the order's own limit price. See How the program sanitizes an auction.

Auctions on limit orders

A crossing limit order without the post-only flag carries its own auction as part of the same order, not a separate one. Its end price defaults to the order's own limit price rather than to a slippage setting.

Filling against resting liquidity atomically

With "fill against resting liquidity first" enabled, makers passed in alongside the order match immediately where the auction price crosses their limits, at the auction's end price by default. Whatever is left runs the ordinary auction, or is cancelled if immediate-or-cancel is set.

Setting one up

From the gear icon and "More Settings" in the top right of any page, then "Custom" on the Trade tab.

Customizing auction parameters is for traders who have read the sanitization rules below. The defaults are derived from live market conditions and are usually better than a hand-set value.

Start price fieldWhat it uses
Oracle PriceThe market's current oracle price.
Mark PriceThe current mark price, from the AMM's curve and its spread.
Best Bid/AskThe best bid or ask on the orderbook.
Est. Entry PriceIncludes the estimated price impact of the order's size on the orderbook and the AMM.
Best Overall PriceThe best of the above.
Market BasedDerived from live market conditions, weighting liquidity and execution quality.

For large size: set a longer duration, use oracle offsets rather than fixed prices, and widen both the start and end buffers. A wide auction on a long duration is what gives makers time to source the other side.

The orderbook server exposes the same derivation over HTTP at /auctionParams, including the marketBased start price, so a client can request the derivation rather than reimplement it. See Auction params for its full query surface.

How the program sanitizes an auction

The submitted parameters are a request. The program rewrites them before storing the order, so the auction that runs can differ from the one that was sent.

How the program rewrites your auction params

Submitted params to Fill in missing pricesFill in missing prices to Clamp to your limitClamp to your limit to Is the market start price better?nonoyesyesKeep your start price to Duration floor from spread and tierUse the market start to Duration floor from spread and tierDuration floor from spread and tier to Signed message within 4s of the floor?yesyesnonoKeep your duration to Auction runsStore the longer one to Auction runsSubmitted paramsFill in missing pricesoracle, or your limit priceClamp to your limitnever worse than itIs the market start pricebetter?signed order: 0.1% deadbandKeep your start priceUse the market startDuration floor from spreadand tierSigned message within 4sof the floor?Keep your durationStore the longer oneyours or the floorAuction runs
Shows the order the program applies these rules in, on every perp order placement. Source: the rules listed in this section. The steps follow the order the section lists them, and the prose does not settle whether the limit clamp runs before or after the market start price is picked. Signed message (swift) orders are the only ones given a tolerance, and the section does not describe oracle offset auctions separately.

Start and end prices

  • Missing prices are filled in from live conditions: the oracle price, or the order's own limit price for the end of a crossing limit order.
  • Neither price may be worse than the order's own limit price, which remains the worst price it can fill at.
  • A better start price wins. If the market-derived start is better for the taker than the one requested, the program uses it.

The duration floor

The program computes its own minimum from the auction's price spread and the market's contract tier, and stores the larger of that and the requested duration. A wide ramp crossed in one slot is just a market order at the end price, so wider auctions get more time. The floor is denominated in 400ms units, and per 1% of spread the tier decides how many are granted:

Market contract tierUnits granted per 1% of auction price spreadWall clock per 1% of spread
A or B10040s
C, Speculative, Highly Speculative, Isolated6024s

The count is clamped to 1 to 180, so the floor is never shorter than 400ms and never longer than 72 seconds. On top of it sits an exchange-wide minimum of 10 units, 4 seconds.

An auction's stored duration is wall-clock time, in units of 400ms. It is not a slot count and it is never converted into one. Solana's slot time is falling from 400ms toward 200ms through a series of feature gates, and none of that changes an auction: a 50 unit auction is 20 seconds of wall clock at every slot duration. What changes is how many slots fit inside those 20 seconds, which the program handles by converting elapsed slots to elapsed milliseconds at fill time.

How long the order stays alive

The auction ending does not cancel the order; its maximum timestamp does. Without one set, market and oracle orders get a default of at least 30 seconds, longer when the auction itself is long. Trigger orders and plain limit orders get no default expiry.

What this means in practice

A short requested duration on a wide auction will be lengthened, sometimes substantially, so the floor rather than the requested number is what governs. Tail-tier markets grant fewer units per 1% of spread but usually run wider spreads, so their floors are often the longer ones. Spread and duration are not independent: a fast fill wants a narrow spread, and a good fill on size wants a wide one and a wait.