Overview
- Allowed Assets (/v1/config/allowed-assets): Governs which assets can be used as Asset B when creating pools. Acts as an RPC‑level allowlist, useful at launch.
- Minimum Amounts (/v1/config/min-amounts): Enforces minimum sizes for swaps and liquidity ops.
- Feature Status (/v1/config/feature-status): Toggles features on/off across the stack (used during incidents with Spark/SSP/infra).
FlashnetClient exposes helpers to read these configs and already enforces them automatically before executing sensitive operations. You can also read them to guide your UI.
Allowed Assets
Controls which assets are permitted as Asset B for pool creation.- Endpoint: /v1/config/allowed-assets
- Behavior: If the list is empty, all assets are allowed (wildcard). Otherwise, only entries with enabled: trueare allowed.
- SDK behavior: createConstantProductPoolandcreateSingleSidedPoolwill fail early if Asset B is not allowed.
Minimum Amounts
Defines per‑asset minimums used to validate swaps and liquidity operations.- Endpoint: /v1/config/min-amounts
- Rules:
- If the input asset has a minimum → input_amount >= min_amount.
- If the output asset has a minimum → min_amount_out >= min_amountwith 50% slippage tolerance applied.
- If both assets have minimums → input asset check takes priority.
- Same rules apply to liquidity adds and removals (each asset checked; output sides use the 50% relaxed rule).
 
- If the input asset has a minimum → 
- SDK behavior: executeSwap,executeRouteSwap,addLiquidity, andremoveLiquidityall validate these rules before sending funds or intents.
Feature Status
Global kill‑switches and per‑feature flags that gate AMM operations.- Endpoint: /v1/config/feature-status
- Example flags: master_kill_switch,allow_swaps,allow_add_liquidity,allow_withdraw_liquidity,allow_pool_creation,allow_route_swaps,allow_withdraw_fees.
- SDK behavior: All state‑changing methods call an internal guard that throws if the required feature is disabled or if the master kill switch is active.
Notes on Caching
The SDK caches these reads briefly to reduce network load:- Feature flags: ~5s TTL
- Min amounts: ~5s TTL (map of enabled entries only)
- Allowed assets: ~60s TTL
TLDR;
- Use getAllowedAssets()to pre‑screen Asset B for pool creation.
- Use getMinAmounts()/getMinAmountsMap()to validate UI inputs for swaps and liquidity.
- Use getFeatureFlags()to toggle UI actions and show maintenance states.
- All execution methods in the SDK already enforce these policies server‑side and client‑side for safety.