Cat kinds and parameters

A cat is a kind (0 to 3) and a bytes32 of parameters. Field i is uint24(params >> (24 * i)). Fees are in pips: 1 pip is 0.0001%, 3000 pips are 0.30%.

FieldAll kinds
p0Base fee
p1Pips added per 1% of average move per block
p2Cap (0.01% to 3.00%)

Every kind starts from v = p0 + p1 * ewma / 10000, then:

Calm (0)

The fee follows the volatility average: min(v, p2). p3 and p4 are zero. A calm pool pays the base; a jumpy one pays more, one block later.

Stalker (1)

p3 and p4 are multipliers in basis points (1000 = 0.1x, 30000 = 3x). A swap that goes the same way as the pool's last move pays v * p3 / 10000; a swap that reverts it pays v * p4 / 10000. Flow that chases a move is usually the flow that costs LPs; Stalker prices it higher and makes the way back cheaper.

Heavy (2)

p3 is pips added per 1% of price impact: v + p3 * impactPpm / 10000, capped by p2. Impact is 2 * Δ√P / √P for the specified amount at the current price and in-range liquidity.

Clock (3)

p3 is the base fee while NYSE is closed (it replaces p0 then). Made for ETH pairs of tokenized stocks, whose reference price stops moving outside regular hours while the pool keeps trading. Holidays count as open.

Bounds the hook checks

publishCat and retune revert unless: the cap is between 100 and 30000 pips, the base is at or under the cap, p1 is at most 100000; Stalker multipliers between 1000 and 30000; Heavy p3 at most 100000; Clock p3 at or under the cap; unused fields zero.

House cats

Four cats were published at launch, one per kind, trained by grid search on ETH / USDG swaps: Calm (#1), Stalker (#2), Heavy (#3) and Clock (#4). Their parameters are on the leaderboard.