To protect both makers and takers from user or algorithmic errors, orders and RFQ quotes on derive are subject to price protections. These vary between orderbook, RFQs, as well as instrument types as described below.
Orderbook
Derive calculates "reasonable" minimum and maximum prices for each instrument based on the current mark price and potential shocks in the spot prices and implied volatility (only for options). Maker and taker orders cannot cross outside of the minimum and maximum price range.
Spot
min_price = mark / (1 + spot_shock)
max_price = mark * (1 + spot_shock)
Perps
Recall that perp mark prices are determined via a spot price feed plus a perp_diff feed which is a time-weighted average difference between the spot index and the perp mid price. The bands then are calculated as follows.
min_price = spot / (1 + spot_shock) + perp_diff
max_price = spot * (1 + spot_shock) + perp_diff
Options
For options, we consider both a potential shock to the underlying spot price, as well as to the mark volatility.
spot_down = spot / (1 + spot_shock)
spot_up = spot * (1 + spot_shock)
iv_down = iv / (1 + vol_shock)
iv_up = iv * (1 + vol_shock)
Then, for calls we have:
min_price = Black76(spot_down, iv_down)
max_price = Black76(spot_up, iv_up)
And for puts:
min_price = Black76(spot_up, iv_down)
max_price = Black76(spot_down, iv_up)
The full table of shock values by currency is provided below. Note that "spot shock" differs between instrument types. The calculated minimum and maximum prices can be found in the Get Tickers endpoint.
RFQs
For RFQs, taker and maker protections differ. Takers cannot accept a quote if the quote is worse than an equivalent orderbook quote (unless they choose to explicitly opt out of the taker protections). For makers, RFQ price banding is in place instead.
Maker RFQ bands work similarly to orderbook ones, except all assets in a multi-leg RFQ share the same spot shock value, and options don't consider volatility shocks. To find the maximum total cost of an RFQ, we first determine the maximum cost of each leg, and then add up the costs together.
For example, an RFQ consisting of a long call spread + short perp might have it's total cost calculated as follows:
long_leg_max_cost = leg_amount * Black76(spot_up)short_leg_max_cost = leg_amount * Black76(spot_down)(note this will be a negative number because leg amount is negative)short_perp_max_cost = leg_amount * (spot_down + perp_diff)
With max_cost = long_leg_max_cost + short_leg_max_cost + short_perp_max_cost
Shock Values
| Currency | Spot Shock (RFQ) | Spot Shock (Spot) | Spot Shock (Perps) | Spot Shock (Options) | Vol Shock |
|---|---|---|---|---|---|
| ETH | 1.5% | 2% | 2% | 1.5% | 20% |
| BTC | 1.5% | 2% | 2% | 1.5% | 20% |
| SOL | 2.5% | 3% | 2.5% | 30% | |
| HYPE | 3% | 3% | 3% | 2.5% | 30% |
| ADA | 2.5% | 3% | 2.5% | 30% | |
| AAVE | 3% | ||||
| BNB | 3% | ||||
| DOGE | 3% | ||||
| ENA | 3% | ||||
| XRP | 3% | ||||
| SUI | 3% | ||||
| LINK | 3% | ||||
| OP | 3% | 3% |