Ask the swarm

Uniswap v4 hook

A ribbon of amber points brightening where a column of synchronised points listens to it

The hook, its router and the NVDA/USDG and TSLA/USDG pools are not deployed on this deployment yet. The rules below are the contract's constants; regimes, budgets, swaps and liquidity appear here once it is live.

5bps LP fee, calm
100bps LP fee, news
0swaps while halted
2bps of every swap to bounties

Questions that moved the fee

No regime question asked yet.

When the swarm cannot reach a majority, nothing changes: the last regime stays until it expires, news after 120 minutes and a halt after 30, then the pool is calm at 5 bps. No address, the deployer included, can set a regime by hand.

Swap

The estimate appears once the pool is open.

Add liquidity

Positions earn the regime's fee on every swap through their range: 5 bps when calm, 100 bps while the swarm reports news, the moments when informed flow arrives. Liquidity can be removed in every regime, halted included.

Plug the hook

Any v4 pool of a stock against USDG with a dynamic fee can use it. The key of the NVDA pool:

PoolKey({
  currency0: 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168,   // USDG
  currency1: 0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC,   // NVDA
  fee: 0x800000,        // dynamic: the hook sets it on every swap
  tickSpacing: 10,
  hooks: <hook address>
})
regimeOf(poolId) -> 0 calm, 1 news, 2 halted        feeOf(poolId) -> 500 or 10000 (hundredths of a bip)

Contracts: hook not deployed, router not deployed, oracle not deployed. Read the hook chapter.