Skip to main contentModule amm
Source - __packing_pool
- __packing_pool_key
- Pool
- AMM pool reserves for a user-token / validator-token pair.
- PoolHandler
- Type-safe handler for accessing
#struct_name in storage. - PoolKey
- Identifies a directional token pair in the fee AMM.
- PoolKeyHandler
- Type-safe handler for accessing
#struct_name in storage.
- M
- Fee multiplier for fee swaps: 0.9970 scaled by 10000 (30 bps fee).
- MIN_LIQUIDITY
- Minimum liquidity locked permanently when initializing a pool.
- N
- Fee multiplier for rebalance swaps: 0.9985 scaled by 10000.
- SCALE
- Scale factor for fixed-point AMM arithmetic (10000).
- compute_amount_out
- Computes the output amount for a fee swap:
amount_in * M / SCALE.