Concepts

Strategies & templates

The five templates: what each does, every parameter with its bounds, units and meaning, the functions that may change after launch, and the curve maths.

Last updated 4 min readv1.0

A template is a reviewed blueprint. It fixes the strategy's logic, the parameters a builder may set (each with bounds and a step), and the mutable functions an owner or agent may call after launch. A strategy can never do something its template does not declare.

Template idNameKindMVP
clamm-dynDynamic-fee CL-AMMAMMYes
opt-vaultShort-dated options vaultStructuredv1
fee-curveUtilisation fee curveFee modulev1
agent-rebalAgent rebalancerAgentv1
pm-binaryBinary prediction marketMarketv1
On-chain, only clamm-dyn and pm-binary are implemented and registered; the other three exist as interfaces and are not launchable yet. Fetch the template definitions with GET /api/templates (TemplateDef[]).

#Dynamic-fee CL-AMM

A HYPE/USDC pool whose swap fee follows recent volatility up to a ceiling. Calm markets get a low fee for volume; volatile markets get a higher fee that compensates LPs for adverse selection. On-chain it is a full-range constant-product pool (despite the name, not concentrated liquidity), and range is a per-swap circuit breaker: no single swap may move the price by more than range %.

KeyLabelUnitMinMaxStepDefaultMeaning
baseFeeBase feebps1100112Fee charged when the market is calm
maxFeeMax feebps203005120Ceiling the fee approaches in high volatility
rangeRange / circuit breaker%260118Max price move per swap on-chain (the illustrative curve also treats tighter ranges as more reactive)
sensVol sensitivity×1100.54How quickly the fee climbs toward its ceiling
fee(σ) = baseFee + max(0, maxFee − baseFee) · (1 − e^(−k·σ))
k = sens · 0.006 · √(18 / range)
Illustrative curve (the Forge chart, not the on-chain formula): σ is annualised realised volatility in %. With defaults, the fee at 50% vol is about 87 bps.
vol ← vol · e^(−Δt / 600 s) + |price move of this swap| (bps)
fee = min(maxFee, baseFee + sensitivityX10 · vol / 100)
On-chain (DynamicFeeAMM): vol is an exponentially decaying sum of per-swap price moves with a 10-minute time constant. Sensitivity is stored ×10 (sens 4 → sensitivityX10 40, bounds 10–100). Fees are charged in HYPE.

Mutable: setFeeBounds(uint16,uint16), setRange(int24,int24), setSensitivity(uint32) in the app; on-chain setFeeBounds(uint256,uint256), setSensitivity(uint256), setRange(uint256).

#Short-dated options vault

A covered-call vault that writes calls each dawn. Upside is capped at the strike in exchange for premium.

KeyLabelUnitMinMaxStepDefaultMeaning
otmStrike OTM%1300.53Strike distance above spot; upside past it is sold
ivImplied vol%20150580Volatility used to price the premium
expiryExpiryh124120Written at dawn, settled before the next one
capVault capHYPE1,000250,0001,00050,000Maximum deposits the vault accepts
σₜ = iv · √(expiry / 8760)
d = otm / σₜ
premium = σₜ · (φ(d) − d · (1 − Φ(d))) (Bachelier, % of spot)
return(S) = min(S, 100 + otm) − 100 + premium (S = spot at expiry, % of today)
Max return per roll = otm + premium. φ and Φ are the standard normal pdf and cdf.

Mutable: rollStrike(uint256), setCap(uint256), pauseWriting().

#Utilisation fee curve

A kinked fee curve that can be attached to any Forge pool. Gentle below the kink, steep above it, like a lending-market rate curve applied to swap fees.

KeyLabelUnitMinMaxStepDefaultMeaning
minFeeFloorbps15015Fee at zero utilisation
prePre-kink risebps060120Fee added between zero and the kink
kinkKink%3095180Utilisation where the curve steepens
slopePost-kink slope×1200.58Multiplier on the rise after the kink
u ≤ kink: fee(u) = minFee + pre · u / kink
u > kink: fee(u) = minFee + pre + max(pre, 4) · slope · (u − kink) / (100 − kink)
u is pool utilisation in %. With defaults, the fee at 90% utilisation is 105 bps.

Mutable: setKink(uint16), setSlope(uint32).

#Agent rebalancer

Delegates range management to an agent key, bounded by on-chain rate and slippage limits. The agent decides when to rebalance; the template decides how far it may go.

KeyLabelUnitMinMaxStepDefaultMeaning
bandTrigger band%1250.56Drift at which the agent is expected to act
rateMax mutations/h1120130On-chain cap on how often the agent may act
slipMax slippagebps5200540Looser limits make the trigger softer
P(rebalance within 1 h | drift d) = (1 − e^(−rate/25)) / (1 + e^(−(d − band) / (0.4 + slip/80)))
An illustrative model of agent behaviour used in the Forge chart, not a protocol rule. The protocol enforces rate and slip; the agent chooses when to act.

Mutable: rebalance(int24,int24), setAgent(address), setRateLimit(uint16).

#Binary prediction market

A dawn-to-dawn yes/no market. The Forge chart illustrates it with an LMSR curve; on-chain (BinaryMarket), each HYPE in mints a YES+NO complete set and a fixed-product pool prices the outcomes: P(YES) = no / (yes + no).

KeyLabelUnitMinMaxStepDefaultMeaning
liqSeed liquidityHYPE500100,00050010,000Deeper seeds flatten the price curve
feeTrade feebps0200550Added to the quoted price on each buy
resolveResolves afterh124123Resolution time after activation
b = liq / ln 2
price(q) = (1 + fee/10⁴) / (1 + e^(−q/b)) q = net YES shares
max loss = b · ln 2 = liq
Shares needed to move YES from 50¢ to 75¢ = b · ln 3 ≈ 15,850 with the default seed.

Mutable: setFee(uint16), extendResolution(uint64) in the app; on-chain only setFee(uint256).

#On-chain ids and parameter order

On-chain, template ids are the app ids as bytes32 strings (bytes32("clamm-dyn")), and parameters are a uint256[] in a fixed order. Fractional UI values are scaled ×10.

TemplateIndex: parameter (unit)BoundsMutable
clamm-dyn0 baseFeeBps · 1 maxFeeBps · 2 rangePct · 3 sensitivityX10 · 4 initQuotePerHype (raw quote units per HYPE, e.g. 25e6 = $25 USDC)[1,100] · [20,300] · [2,60] · [10,100] · [1e3,1e15]setFeeBounds(uint256,uint256) setSensitivity(uint256) setRange(uint256)
pm-binary0 liquidityHint (HYPE) · 1 feeBps · 2 resolveHours[500,100000] · [0,200] · [1,24]setFee(uint256)
From contracts/README.md. opt-vault, fee-curve and agent-rebal are not registered on-chain.

#Template definition

TemplateDef (types.ts)TypeScript
interface TemplateParamDef {
  key: string; label: string; unit: string;
  min: number; max: number; step: number; def: number;
  help: string;
}
interface TemplateDef {
  id: TemplateId; name: string; kind: string; blurb: string;
  mvp: boolean;
  params: TemplateParamDef[];
  mutable: string[];   // signatures callable after launch
}
Something unclear or wrong on this page? Report it.Updated Dec 1, 2026 · v1.0