02 · The hooks
Band fee
The pool fee starts at the opening sqrt price and rises as sqrt price moves away.
Band fee makes the pool more expensive to trade as the price leaves the price it opened at.
What a trader sees
At the anchor, the fee is the base fee. The anchor is the price at initialization. As the pool's sqrt price moves away, in either direction, the fee climbs in a straight line toward the max fee. Once the distance reaches the width you set, the fee stays at the max. The width is in basis points of the anchor. 100 means the fee saturates when the sqrt price has moved 1%.
Base 0.30%, max 10%, width 100 bps. At the open, traders pay 0.30%. Halfway to the width they pay about 5.15%. At the width, and beyond it, they pay 10%.
What you set
- The base fee, the max fee, and the width.
The pool must use a dynamic fee. This hook overrides the fee on each swap. If another hook in the hub also overrides the fee, the higher number is the one the swap uses.
NextMilestone unlockSells turn on after the first volume target. The fee drops twice.