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.
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 id | Name | Kind | MVP |
|---|---|---|---|
clamm-dyn | Dynamic-fee CL-AMM | AMM | Yes |
opt-vault | Short-dated options vault | Structured | v1 |
fee-curve | Utilisation fee curve | Fee module | v1 |
agent-rebal | Agent rebalancer | Agent | v1 |
pm-binary | Binary prediction market | Market | v1 |
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 %.
| Key | Label | Unit | Min | Max | Step | Default | Meaning |
|---|---|---|---|---|---|---|---|
baseFee | Base fee | bps | 1 | 100 | 1 | 12 | Fee charged when the market is calm |
maxFee | Max fee | bps | 20 | 300 | 5 | 120 | Ceiling the fee approaches in high volatility |
range | Range / circuit breaker | % | 2 | 60 | 1 | 18 | Max price move per swap on-chain (the illustrative curve also treats tighter ranges as more reactive) |
sens | Vol sensitivity | × | 1 | 10 | 0.5 | 4 | How quickly the fee climbs toward its ceiling |
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.
| Key | Label | Unit | Min | Max | Step | Default | Meaning |
|---|---|---|---|---|---|---|---|
otm | Strike OTM | % | 1 | 30 | 0.5 | 3 | Strike distance above spot; upside past it is sold |
iv | Implied vol | % | 20 | 150 | 5 | 80 | Volatility used to price the premium |
expiry | Expiry | h | 1 | 24 | 1 | 20 | Written at dawn, settled before the next one |
cap | Vault cap | HYPE | 1,000 | 250,000 | 1,000 | 50,000 | Maximum deposits the vault accepts |
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.
| Key | Label | Unit | Min | Max | Step | Default | Meaning |
|---|---|---|---|---|---|---|---|
minFee | Floor | bps | 1 | 50 | 1 | 5 | Fee at zero utilisation |
pre | Pre-kink rise | bps | 0 | 60 | 1 | 20 | Fee added between zero and the kink |
kink | Kink | % | 30 | 95 | 1 | 80 | Utilisation where the curve steepens |
slope | Post-kink slope | × | 1 | 20 | 0.5 | 8 | Multiplier on the rise after the kink |
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.
| Key | Label | Unit | Min | Max | Step | Default | Meaning |
|---|---|---|---|---|---|---|---|
band | Trigger band | % | 1 | 25 | 0.5 | 6 | Drift at which the agent is expected to act |
rate | Max mutations | /h | 1 | 120 | 1 | 30 | On-chain cap on how often the agent may act |
slip | Max slippage | bps | 5 | 200 | 5 | 40 | Looser limits make the trigger softer |
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).
| Key | Label | Unit | Min | Max | Step | Default | Meaning |
|---|---|---|---|---|---|---|---|
liq | Seed liquidity | HYPE | 500 | 100,000 | 500 | 10,000 | Deeper seeds flatten the price curve |
fee | Trade fee | bps | 0 | 200 | 5 | 50 | Added to the quoted price on each buy |
resolve | Resolves after | h | 1 | 24 | 1 | 23 | Resolution time after activation |
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.
| Template | Index: parameter (unit) | Bounds | Mutable |
|---|---|---|---|
clamm-dyn | 0 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-binary | 0 liquidityHint (HYPE) · 1 feeBps · 2 resolveHours | [500,100000] · [0,200] · [1,24] | setFee(uint256) |
contracts/README.md. opt-vault, fee-curve and agent-rebal are not registered on-chain.#Template definition
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
}