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
| Policy | Purpose |
|---|---|
| Stop-loss logic | Reject trades that breach configured value-loss limits |
| Velocity guard | Pause execution during abnormally fast price movement |
| Swap allowlist | Restrict who may trade |
| Deposit allowlist | Restrict who may add liquidity |
Building safely
Keep extension state minimal, document every rejection condition and test interaction with price updates, deposits, withdrawals and swaps.
Related Metric Docs
Last updated