Stable Pair Fee
Summary
Direct port of the public Uniswap hook.
Stable Pair Fee plugin targets pools with stable-stable pairs. It facilitates the trades with the pre-defined spread around the specified target price using dynamic fees to adjust to AMM price movements.
Short explanation
- If the swap moves the pool price inside the spread boundary around the target price, the fee is set dynamically so that the result swap price plus fee fits the spread boundary
- If the swap moves the pool price away from target price outside the spread boundary, no fees is set
- If the swap moves pool price towards the target price while outside the spread boundary, the fee will be set high and will decay with every passing block, implicitly triggering the dutch auction with arbitrageurs
Features
- UI-less The plugin is configured via direct contract calls by the DEX owner or the Manager role.
- Low gas overhead ~35K gas per swap operation.