Extensions
Extensions add rules before or after pool actions: they can control access, check a trade's effect on liquidity, record trades for future pricing, block all trading and more.
Curators can reuse existing extensions or build their own.
Extensions can't change the pool's quote; they can only reject a trade. A custom extension therefore can't manipulate the quote of the current trade.
Where extensions run
For swaps for example, quote validation comes before the before-swap extensions; extensions cannot replace that quote for the current swap. After-swap extensions can inspect token amounts and pool state.
A rejection at either stage reverts the pool action, including token transfers.

Standard extensions
Settings matter
StopLoss values each bin at the Price Provider's bid and ask and tracks its peak: the highest value per LP share it has recorded. The drawdown setting decides how far below the peak a swap may take the bin; decay lowers the peak over time, so an old peak doesn't block the bin forever.
If a bin has no baseline, its first monitored trade initializes one without this drawdown check.
StopLoss rejects trades; it does not sell an LP's position or cap all losses. Ordinary market movements can trigger it.
Velocity Guard checks changes in the supplied reference, not ordinary price impact from crossing bins. Its allowance and comparison anchor can be changed by the pool admin.
Attaching a guard does not prove it is enabled. Check its settings and who can change them.
Fixed addresses, changeable behavior
Extension addresses and execution order are fixed at pool creation. Settings or code may remain changeable unless restricted.
A custom withdrawal extension can block LP exits. Before depositing, review its code and who can change it.
Last updated 29 days ago
Relatick