Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Metric Docs | Build an Extension

Learn how custom Metric extensions can add pool safeguards or permissions without changing the pool’s core pricing and liquidity model.

Learn how custom Metric extensions can add pool safeguards or permissions without changing the pool’s core pricing and liquidity model.

Metric is built around Active Pools: liquidity pools that use a Price Provider to supply bid, ask and reference prices instead of relying only on reserve ratios. This page focuses on Build an Extension and the practical checks that matter when using or integrating the protocol.

What extensions change

Extensions add policy around pool execution without replacing the pool’s core price-and-liquidity model. They can be used for safeguards, access controls or market-specific rules.

Common policy types

PolicyPurpose
Stop-loss logicReject trades that breach configured value-loss limits
Velocity guardPause execution during abnormally fast price movement
Swap allowlistRestrict who may trade
Deposit allowlistRestrict who may add liquidity

Building safely

Keep extension state minimal, document every rejection condition and test interaction with price updates, deposits, withdrawals and swaps.

Last updated