Dynamic Fees
Each Wyrm market resolves its swap fee at execution from an autonomous model plus any authorised, bounded, and expiring keeper override.
How the fee is resolved
The pool's hook returns a fee immediately before each swap. That fee is charged to the trader and accrues to active liquidity after any Uniswap protocol share. The fee shown on a pool page is the latest contract read.
Autonomous fee models
| Model | What it responds to | Typical use |
|---|---|---|
| Calendar | Session, overnight, weekend, holidays, and optional bell ramps | Tokenised markets with reference trading hours |
| Flat base | Configured baseline | Markets that trade around the clock |
| Directional model | Direction of the proposed swap | Pools where harmful flow is asymmetric |
A calendar is carried on chain. It can classify ordinary market days and scheduled holidays, but an operator may need to correct an exceptional closure or session change. A flat base has no calendar effect; that does not mean its final fee never changes.
The off-chain keeper
Authorised off-chain software observes market conditions and can write a temporary fee for a configured pool. Depending on the pool, that decision can use reference-price divergence, realised volatility, or another configured signal. The keeper is an operator, not a source of custody: it cannot move liquidity or change balances.
Each write is bounded by the pool's configured floor (e.g. 0.01%) and cap (e.g. 2%) and expires on its own. A separate emergency role can clear it early. If the keeper stops, the override expires and the autonomous model resumes.
What can change
The keeper can move a fee only inside existing bounds. Broader configuration changes use the AccessManager and its configured delay, and the absolute maximum remains fixed in bytecode. Exact roles are described on Contracts.