@aftermath/amm (0xc404…e0dd) | SuiLearn ExplorerMove package · Move Registry
@aftermath/amm
0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd
The core package of Aftermath's Automated Market Maker (AMM). Defines the Pool struct and its associated api.
Open in Playground Read the source, view function signatures and call functions there.
Details
- Version
- 6
- Modules
- 13 (187 functions)
- Name
- @aftermath/amm
- Latest version
- v6
- Contact
- github@aftermath.finance
Published by the package owner in the Move Registry. Use the name in code with mvr add @aftermath/amm.
Versions
Each upgrade is a new package ID
admin5 functions · 3 structs
Functions
- authorizePUBLIC
- init
- is_authorizedPUBLIC
- revoke_authPUBLIC
- transferPUBLIC
Explore admin in Playground deposit28 functions · 0 structs
Functions
- all_coin_deposit_2_coinsPUBLIC
v6
0xe520…b9cf
this version
all_coin_deposit_3_coinsPUBLICall_coin_deposit_4_coinsPUBLICall_coin_deposit_5_coinsPUBLICall_coin_deposit_6_coinsPUBLICall_coin_deposit_7_coinsPUBLICall_coin_deposit_8_coinsPUBLICassert_no_duplicatesassert_non_zeroassert_pool_size_isassert_pool_size_is_at_leastdepositdeposit_1_coinsPUBLICdeposit_1_coins_directPUBLICdeposit_2_coinsPUBLICdeposit_2_coins_directPUBLICdeposit_3_coinsPUBLICdeposit_3_coins_directPUBLICdeposit_4_coinsPUBLICdeposit_4_coins_directPUBLICdeposit_5_coinsPUBLICdeposit_5_coins_directPUBLICdeposit_6_coinsPUBLICdeposit_6_coins_directPUBLICdeposit_7_coinsPUBLICdeposit_7_coins_directPUBLICdeposit_8_coinsPUBLICdeposit_8_coins_directPUBLICevents7 functions · 10 structs
Functions
- emit_created_pool_eventFRIEND
- emit_deposit_eventFRIEND
- emit_donate_eventFRIEND
- emit_oracle_price_eventFRIEND
- emit_spot_price_eventFRIEND
- emit_swap_eventFRIEND
- emit_withdraw_eventFRIEND
Structs
- CreatedPoolEvent
- DepositEvent
- DepositEventV2
- DonateEvent
- OraclePriceEvent
- SpotPriceEvent
- SwapEvent
- SwapEventV2
- WithdrawEvent
- WithdrawEventV2
Explore events in Playground math18 functions · 0 structs
Functions
- assert_slippage_lower_bound
- assert_slippage_upper_bound
- calc_all_coin_depositPUBLIC
- calc_all_coin_withdrawPUBLIC
- calc_deposit_exact_inPUBLIC
- calc_deposit_exact_in_directPUBLIC
- calc_invariantPUBLIC
- calc_lp_coins_to_mint_from_tPUBLIC
- calc_lp_ratio_after_burning_lp_coinPUBLIC
- calc_oracle_pricePUBLIC
- calc_spot_pricePUBLIC
- calc_swap_exact_inPUBLIC
- calc_swap_exact_in_directPUBLIC
- calc_swap_exact_outPUBLIC
- calc_swap_exact_out_directPUBLIC
- calc_withdraw_exact_lpPUBLIC
- reorder_and_zero_out_empty_coinsPUBLIC
- reorder_by_order_of_calling_functionPUBLIC
Explore math in Playground pool50 functions · 5 structs
Functions
- assert_pool_creation_parameters_are_valid
- balance_ofPUBLIC
- balancesPUBLIC
- borrow_balance
- borrow_mut_balance
- burn_lp_coinsFRIEND
- coin_decimalsPUBLIC
- contains_typePUBLIC
- create_lp_coinFRIEND
- create_pool_cap_and_set_decimalsPUBLIC
- create_pool_cap_v2FRIEND
- creatorPUBLIC
- fees_depositPUBLIC
- fees_deposit_forPUBLIC
- fees_swap_inPUBLIC
- fees_swap_in_forPUBLIC
- fees_swap_outPUBLIC
- fees_swap_out_forPUBLIC
- fees_withdrawPUBLIC
- fees_withdraw_forPUBLIC
- flatnessPUBLIC
- initialize_liquidityFRIEND
- initialize_lp_supplyFRIEND
- joinFRIEND
- lp_decimalsPUBLIC
- lp_supply_valuePUBLIC
- lp_typePUBLIC
- mint_lp_coinsFRIEND
- namePUBLIC
- newFRIEND
- new_poolFRIEND
- new_v2FRIEND
- normalize_amountFRIEND
- normalize_amount_with_indexFRIEND
- normalize_amountsFRIEND
- normalize_lp_amountFRIEND
- normalized_balance_by_indexFRIEND
- normalized_balance_ofFRIEND
- normalized_balancesFRIEND
- sharePUBLIC
- sizePUBLIC
- takeFRIEND
- transfer_create_pool_capPUBLIC
- type_name_to_balance_valueFRIEND
- type_name_to_indexFRIEND
- type_name_to_normalized_balance_valueFRIEND
- type_namesPUBLIC
- type_to_indexFRIEND
- unnormalize_amountFRIEND
- unnormalize_amount_upFRIEND
Structs
- CreatePoolCap
- CreatePoolCapV2
- MetadataKey
- Pool
- TreasuryKey
Explore pool in Playground pool_factory16 functions · 0 structs
Functions
- assert_non_zero
- create_lp_coinPUBLIC
- create_pool_2_coinsPUBLIC
- create_pool_2_coins_v2PUBLIC
- create_pool_3_coinsPUBLIC
- create_pool_3_coins_v2PUBLIC
- create_pool_4_coinsPUBLIC
- create_pool_4_coins_v2PUBLIC
- create_pool_5_coinsPUBLIC
- create_pool_5_coins_v2PUBLIC
- create_pool_6_coinsPUBLIC
- create_pool_6_coins_v2PUBLIC
- create_pool_7_coinsPUBLIC
- create_pool_7_coins_v2PUBLIC
- create_pool_8_coinsPUBLIC
- create_pool_8_coins_v2PUBLIC
Explore pool_factory in Playground pool_registry19 functions · 3 structs
Functions
- add_coinFRIEND
- assert_correct_packageFRIEND
- borrow_state
- borrow_state_mut
- borrow_uidFRIEND
- contains_coinPUBLIC
- contains_lp_coinPUBLIC
- current_protocol_versionPUBLIC
- init
- is_pausedPUBLIC
- lp_coin_mapPUBLIC
- lp_type_to_pool_idPUBLIC
- pausePUBLIC
- protocol_versionPUBLIC
- real_protocol_versionPUBLIC
- register_poolFRIEND
- supported_coinsPUBLIC
- unpausePUBLIC
- upgradePUBLIC
Structs
- PausedVersionKey
- PoolRegistry
- PoolRegistryStateV1
Explore pool_registry in Playground protocol_fees12 functions · 0 structs
Functions
- collect_fees_10_coinsPUBLIC
- collect_fees_11_coinsPUBLIC
- collect_fees_12_coinsPUBLIC
- collect_fees_1_coinsPUBLIC
- collect_fees_2_coinsPUBLIC
- collect_fees_3_coinsPUBLIC
- collect_fees_4_coinsPUBLIC
- collect_fees_5_coinsPUBLIC
- collect_fees_6_coinsPUBLIC
- collect_fees_7_coinsPUBLIC
- collect_fees_8_coinsPUBLIC
- collect_fees_9_coinsPUBLIC
Explore protocol_fees in Playground swap6 functions · 0 structs
Functions
- add_swap_exact_in_to_routePUBLIC
- add_swap_exact_out_to_routePUBLIC
- swap_exact_inPUBLIC
- swap_exact_in_directPUBLIC
- swap_exact_outPUBLIC
- swap_exact_out_directPUBLIC
Explore swap in Playground withdraw21 functions · 0 structs
Functions
- all_coin_withdraw_2_coinsPUBLIC
- all_coin_withdraw_3_coinsPUBLIC
- all_coin_withdraw_4_coinsPUBLIC
- all_coin_withdraw_5_coinsPUBLIC
- all_coin_withdraw_6_coinsPUBLIC
- all_coin_withdraw_7_coinsPUBLIC
- all_coin_withdraw_8_coinsPUBLIC
- assert_equal
- assert_no_duplicates
- assert_non_zero
- assert_pool_size_is
- assert_pool_size_is_at_least
- withdraw
- withdraw_1_coin_directPUBLIC
- withdraw_2_coins_directPUBLIC
- withdraw_3_coins_directPUBLIC
- withdraw_4_coins_directPUBLIC
- withdraw_5_coins_directPUBLIC
- withdraw_6_coins_directPUBLIC
- withdraw_7_coins_directPUBLIC
- withdraw_8_coins_directPUBLIC
Explore withdraw in Playground