SkewScale
This section explains how the SkewScale parameter is calibrated in the price impact model and the funding rate model.
SkewScale in the Price Impact Model
Parameter Calibration Rationale
The parameter calibration aims to align price slippage in perp trading with that of underlying asset spot trading on external markets under balanced market conditions (zero skew). This ensures appealing trading execution when the market exhibits no directional bias.
Depending on the prevailing skew and the direction of the order, the actual slippage may be less than or exceed the slippage on the global market.
Calculation
where
is the token-denominated global market depth. The final skewScale is rounded to a specific power of 10 depending on number' magnitude.
Formal proof is provided in the Appendix.
Input Data
Coingecko
90-day median
Transform to tokens
Key Assumptions
Linear price impact model is used.
SkewScale in the Funding Rate Model
The same SkewScale parameter is utilized in the funding rate model through a mathematical transformation that establishes the relationship between funding velocity and market skew.
In the funding rate model, the rate is designed to be proportional to the skew relative to the maximum allowable skew:
We can rewrite this equation as follows:
Let's define the following notation:
Then we have the following model (which is used in production):
Therefore, the same skewScale parameter is used in the funding rate model, given that maxFundingVelocity is determined using the aforementioned transformation.
Appendix. Proof for the skewScale formula
The price model with the market impact is the following:
where is the order execution price, is the oracle price, is the position size (positive or negative), is the current skew (positive or negative), is the model parameter.
Let the current skew is zero (the market is perfectly balanced).
According to the price model, when a user opens a position of size , the percentage price slippage is the following:
where is positive when and negative otherwise.
When the slippage is known, the parameter can be found as follows:
We use global slippage as a benchmark to calibrate the parameter. When opening a long position of size the slippage should be . Then we have the parameter value for longs:
When opening the short position of size the slippage should be . Then we have the parameter value for shorts:
The minimum is taken to get the final parameter:
where
This completes the proof.
Last updated