deepbookv3-ewma

Installation
SKILL.md

DeepBook V3: EWMA Gas Price Penalty

DeepBook V3 implements an Exponentially Weighted Moving Average (EWMA) gas price tracking system to protect liquidity makers from toxic taker transactions during gas price spikes (e.g., front-running or arbitrage during network congestion).


1. Key Concepts

Purpose of EWMA

  • During periods of high network congestion, sophisticated traders might pay abnormally high gas fees to front-run or take stale maker limit orders before makers can update or cancel them.
  • To disincentivize this, DeepBook V3 tracks historical network gas prices and applies an additional taker fee penalty when the current transaction's gas price is exceptionally high.

Trigger Conditions

The gas penalty is only applied when all of the following conditions are met:

  1. EWMA tracking is enabled for the specific pool.
  2. The current transaction's gas price is above the historical average: $\text{Current Gas Price} \ge \text{Mean}$.
  3. The volatility-adjusted deviation is above the threshold: $\text{Z-Score} > \text{Z-Score Threshold}$.

Installs
1
First Seen
Sep 4, 2026
deepbookv3-ewma — nickthelegend/sui-deepbook-skills