Skip to main content
Version: v0.18

Messages

This document outlines the messages supported by the AMM module.

MsgSingleSwap

This message enables a user to perform a single token swap. The message contains these fields:

  • creator: The address used for the funds transfer.
  • swap: Swap request details, including pool ID, input and output tokens, and swap amount.
  • max_amount_in (optional): The user's maximum input token amount for the swap. If unspecified, no maximum limit applies.
  • min_amount_out (optional): The minimum output token amount the user wants to receive. If unspecified, no minimum limit applies.

The response displays the final input and output amounts.

message MsgSingleSwap {
string creator = 1;
Swap swap = 2 [(gogoproto.nullable) = false];
string max_amount_in = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
string min_amount_out = 4 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
}

message MsgSingleSwapResponse {
cosmos.base.v1beta1.Coin amount_out = 1 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin amount_in = 2 [(gogoproto.nullable) = false];
// protocol fee does not contain the y_trade fee and refractor fee
// which is paid in case of a yAsset trade
cosmos.base.v1beta1.Coin protocol_fee = 3 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin swap_fee = 4 [(gogoproto.nullable) = false];
}

MsgJoinAllTokensExactLpt

This message allows a user to join a pool with all tokens and receive a specified amount of liquidity pool tokens (LPT). Users can set maximum contribution limits for each token to prevent undesirable pricing.

message MsgJoinAllTokensExactLpt {
option (cosmos.msg.v1.signer) = "creator";
option (amino.name) = "pryzm/amm/v1/JoinAllTokensExactLpt";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 pool_id = 2;
string lpt_out = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
// is not casted to coins, to allow for zero limits
repeated cosmos.base.v1beta1.Coin max_amounts_in = 4 [(gogoproto.nullable) = false];
}

message MsgJoinAllTokensExactLptResponse {
cosmos.base.v1beta1.Coin lpt_out = 1 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin amounts_in = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin protocol_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgJoinTokenExactLpt

Allows a user to join a liquidity pool by using a single token from the pool, specifying the exact LPT amount they want.

The response includes the final LPT tokens minted and the input tokens deposited into the pool.

message MsgJoinTokenExactLpt {
string creator = 1;
uint64 pool_id = 2;
string lpt_out = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
string token_in = 4;
string max_amount_in = 5 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
}

message MsgJoinTokenExactLptResponse {
cosmos.base.v1beta1.Coin lpt_out = 1 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin amount_in = 2 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin protocol_fee = 3 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin swap_fee = 4 [(gogoproto.nullable) = false];
}

MsgJoinExactTokens

Allows a user to join a liquidity pool by depositing exact amounts of multiple tokens, receiving Liquidity Provider Tokens (LPT) representing their pool share. The message includes:

  • creator: The address for fund transfers.
  • pool_id: The ID of the joined liquidity pool.
  • amounts_in: Exact amounts of input tokens to be deposited.
  • min_lpt_out (optional): The minimum LPT tokens to receive. No minimum limit if unspecified.

The response includes the final LPT tokens minted and the exact input tokens deposited into the pool.

message MsgJoinExactTokens {
string creator = 1;
uint64 pool_id = 2;
repeated cosmos.base.v1beta1.Coin amounts_in = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
string min_lpt_out = 4 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
}

message MsgJoinExactTokensResponse {
cosmos.base.v1beta1.Coin lpt_out = 1 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin amounts_in = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin protocol_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin swap_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgExitExactTokens

MsgExitExactTokens enables a user to leave a liquidity pool by withdrawing precise amounts of multiple output tokens in return for burning Liquidity Provider Tokens (LPT) that represent their share of the pool. The message has these fields:

  • creator: The address for fund transfers.
  • pool_id: The liquidity pool's ID.
  • amounts_out: A list of exact output token amounts to withdraw.
  • max_lpt_in (optional): The maximum LPT tokens the user is willing to burn. Without specification, there's no maximum limit.

The response contains the final LPT tokens burned and the exact output token amounts withdrawn.

message MsgExitExactTokens {
string creator = 1;
uint64 pool_id = 2;
repeated cosmos.base.v1beta1.Coin amounts_out = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
string max_lpt_in = 4 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
}

message MsgExitExactTokensResponse {
cosmos.base.v1beta1.Coin lpt_in = 1 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin amounts_out = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
cosmos.base.v1beta1.Coin protocol_fee = 3 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin swap_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgExitTokenExactLpt

MsgExitTokenExactLpt allows a user to leave a liquidity pool by burning exact LPT tokens and receiving a specific output token. The message includes these fields:

  • creator: The address involved in the funds transfer.
  • pool_id: The ID of the liquidity pool being exited.
  • lpt_in: The specific amount of LPT tokens to be burned.
  • token_out: The output token the user wishes to receive.
  • min_amount_out (optional): The minimal amount of output tokens the user wishes to receive. If unspecified, no minimum limit is set.

The response contains the final count of LPT tokens burned and the precise quantity of the output token received.

message MsgExitTokenExactLpt {
string creator = 1;
uint64 pool_id = 2;
string lpt_in = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
string token_out = 4;
string min_amount_out = 5 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
}

message MsgExitTokenExactLptResponse {
cosmos.base.v1beta1.Coin lpt_in = 1 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin amount_out = 2 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin protocol_fee = 3 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin swap_fee = 4 [(gogoproto.nullable) = false];
}

MsgExitAllTokensExactLpt

This message enables a user to leave a liquidity pool by burning specific quantities of LPT tokens in return for receiving proportional amounts of all output tokens in the pool. The message contains these fields:

  • creator: The address involved in the funds transfer.
  • pool_id: The ID of the liquidity pool being exited.
  • lpt_in: The specific amount of LPT tokens to be burned.
  • min_amounts_out: A list of the minimal amounts of output tokens the user wishes to receive.

The response provides the final count of LPT tokens burned and the precise quantities of output tokens received.

message MsgExitAllTokensExactLpt {
string creator = 1;
uint64 pool_id = 2;
string lpt_in = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
repeated cosmos.base.v1beta1.Coin min_amounts_out = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

message MsgExitAllTokensExactLptResponse {
cosmos.base.v1beta1.Coin lpt_in = 1 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin amounts_out = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
cosmos.base.v1beta1.Coin protocol_fee = 3 [(gogoproto.nullable) = false];
}

MsgRecoveryExit

The MsgRecoveryExit is utilized for a pool's recovery-mode exit. It executes a straightforward proportional exit devoid of protocol fees for a pool under recovery mode.

  • creator: Represents the address of the account initiating the exit.
  • pool_id: Denotes the ID of the YAMM pool.
  • lpt_in: The quantity of the liquidity provider token (LPT) used for exit.
  • min_amounts_out: The smallest possible amount of output tokens to receive upon exit.
message MsgRecoveryExit {
string creator = 1;
uint64 pool_id = 2;
string lpt_in = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
repeated cosmos.base.v1beta1.Coin min_amounts_out = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
message MsgRecoveryExitResponse {
cosmos.base.v1beta1.Coin lpt_in = 1 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin amounts_out = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgCreateWeightedPool

MsgCreateWeightedPool is used to create a new weighted pool. The message incorporates the following fields:

  • creator: Represents the account address that creates the pool.
  • name: The pool's name.
  • swap_fee_ratio: The pool's swap fee ratio, expressed as a decimal.
  • pause_window_duration_millis: The pool's pause window duration in milliseconds.
  • pause_buffer_duration_millis: The pool's pause buffer duration in milliseconds.
  • tokens: A collection of weighted pool tokens included in the pool.
  • initialization_allow_list (optional): A list of addresses permitted to initialize the pool. If unspecified, the pool can be initialized by anyone.
  • force_gov_owner: If the creator is admin, they can create pools owned by governance using this property. Note that, when public pool creation is not allowed, admin must set this to true.
  • admins is a list of addresses allowed to do anything the creator can, except for updating the admins list and pausing the pool.
  • pause_allow_list is a list of addresses allowed to pause the pool, but cannot unpause the pool.

The response includes the created pool's id.

message MsgCreateWeightedPool {
string creator = 1;
string name = 2;
string swap_fee_ratio = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
int64 pause_window_duration_millis = 4;
int64 pause_buffer_duration_millis = 5;
repeated CreateWeightedPoolToken tokens = 6 [(gogoproto.nullable) = false];
repeated string initialization_allow_list = 12;
bool force_gov_owner = 13;
repeated string admins = 14 [(amino.dont_omitempty) = true];
repeated string pause_allow_list = 15 [(amino.dont_omitempty) = true];
}

message CreateWeightedPoolToken {
string denom = 1;
string normalized_weight = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

message MsgCreateWeightedPoolResponse {
uint64 pool_id = 1;
}

MsgUpdateSwapFee

MsgUpdateSwapFee is utilized to modify a weighted pool's swap fee ratio.

message MsgUpdateSwapFee {
string creator = 1;
uint64 pool_id = 2;
string swap_fee_ratio = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

message MsgUpdateSwapFeeResponse {}

MsgInitializePool

MsgInitializePool initializes a weighted pool with a specific set of tokens. It takes the pool id and deposit amounts as inputs.

The response details the minted LP token amounts and the deposited token amounts.

message MsgInitializePool {
string creator = 1;
uint64 pool_id = 2;
repeated cosmos.base.v1beta1.Coin amounts_in = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
message MsgInitializePoolResponse {
cosmos.base.v1beta1.Coin lpt_out = 1 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin amounts_in = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin protocol_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgUpdateWeights

MsgUpdateWeights modifies the weights of tokens in a weighted pool. The change is progressive, transitioning from the current weight values to the specified ones within a defined timeframe.

message MsgUpdateWeights {
string creator = 1;
uint64 pool_id = 2;
repeated TokenWeight token_weights = 3 [(gogoproto.nullable) = false];
int64 start_time_unix_millis = 4;
int64 end_time_unix_millis = 5;
}

message MsgUpdateWeightsResponse {}

message TokenWeight {
string denom = 1;
string normalized_weight = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

MsgBatchSwap

MsgBatchSwap executes a batch swap as detailed in the concepts. It includes the swap-type, steps, and optional amount limits to prevent undesirable price executions.

Each step details the pool id, in and out tokens, and the step amount. If the step amount isn't provided, the calculated amount from the previous step is used. Note that the first step requires an amount.

The response holds the transferred input and output amounts for the entire operation.

message MsgBatchSwap {
option (cosmos.msg.v1.signer) = "creator";
option (amino.name) = "pryzm/amm/v1/BatchSwap";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
SwapType swap_type = 2;
repeated SwapStep steps = 3 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin min_amounts_out = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// is not casted to coins, to allow for zero limits
repeated cosmos.base.v1beta1.Coin max_amounts_in = 5 [(gogoproto.nullable) = false];
}

message SwapStep {
uint64 pool_id = 1;
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
string token_in = 4;
string token_out = 5;
}

message MsgBatchSwapResponse {
repeated cosmos.base.v1beta1.Coin amounts_in = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin amounts_out = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// protocol fee does not contain the y_trade fee and refractor fee
// which is paid in case of a yAsset trade
repeated cosmos.base.v1beta1.Coin swap_protocol_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin join_exit_protocol_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
repeated cosmos.base.v1beta1.Coin swap_fee = 5 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgSetYammConfiguration

Use this message to set the YAMM pool instance configuration.

message MsgSetYammConfiguration {
string creator = 1;
YammConfiguration configuration = 2 [(gogoproto.nullable) = false];
}

message MsgSetYammConfigurationResponse {}

MsgWhitelistRoute

Use this message to add a new whitelisted route for multistep pulse trades.

message MsgWhitelistRoute {
string authority = 1;
WhitelistedRoute whitelisted_route = 2 [(gogoproto.nullable) = false];
}

message MsgWhitelistRouteResponse {}

MsgSetWhitelistedRouteEnabled

Use this message to enable or disable a whitelisted route for a specific token pair.

message MsgSetWhitelistedRouteEnabled {
string authority = 1;
string token_in = 2;
string token_out = 3;
bool enabled = 4;
}

message MsgSetWhitelistedRouteEnabledResponse {}

MsgSubmitOrder

MsgSubmitOrder is a message type used to submit a new pulse-trade order for a specific pair of tokens. It features the following fields:

  • creator: The account address submitting the order and paying the order's input amount.
  • pool_id: The target pool's ID. If using a whitelisted route for multistep swaps, set this to zero.
  • token_in: Input token denomination.
  • token_out: Output token denomination.
  • whitelisted_route: A boolean flag indicating if the order uses whitelisted routes or a direct swap between the tokens.
  • allow_matching: A boolean flag indicating permission for matching by solvers.
  • amount_per_step: Input token amount to swap per step.
  • total_amount: Total input token amount to swap.
  • millis_interval: Time interval between each step in milliseconds.
  • max_step_spot_price: Maximum allowed spot price per step.
  • max_matching_spot_price: Maximum allowed spot price for matching (optional). If matching is disallowed, this property is unnecessary.

The response contains the created order model.

message MsgSubmitOrder {
string creator = 1;
uint64 pool_id = 2;
string token_in = 3;
string token_out = 4;
bool whitelisted_route = 5;
bool allow_matching = 6;
string amount_per_step = 7 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
string total_amount = 8 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
int64 millis_interval = 9;
string max_step_spot_price = 10 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
string max_matching_spot_price = 11 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = true
];
}

message MsgSubmitOrderResponse {
Order order = 1 [(gogoproto.nullable) = false];
}

MsgCancelOrder

MsgCancelOrder is a message type used to cancel an existing order. If any deposit remains for the order execution, it will be returned to the order owner and included in the message response.

message MsgCancelOrder {
string creator = 1;
uint64 id = 2;
}

message MsgCancelOrderResponse {
cosmos.base.v1beta1.Coin withdrawn_deposit = 1 [(gogoproto.nullable) = false];
}

MsgProposeMatch

MsgProposeMatch is a message type used to propose a new match between two or more orders. For proposal details, please refer to this section. The response includes the reward given to the match proposer, represented as a list of coins.

message MsgProposeMatch {
string creator = 1;
repeated PairMatchProposal pairs = 2 [(gogoproto.nullable) = false];
}

message MsgProposeMatchResponse {
repeated cosmos.base.v1beta1.Coin proposer_reward = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgSetCircuitBreakers

This message sets the circuit breakers for pool tokens.

message MsgSetCircuitBreakers {
string creator = 1;
uint64 pool_id = 2;
repeated TokenCircuitBreakerSettings token_circuit_breakers = 3 [(gogoproto.nullable) = false];
}

message MsgSetCircuitBreakersResponse {}

message TokenCircuitBreakerSettings {
string denom = 1;
CircuitBreakerSettings circuit_breaker = 2 [(gogoproto.nullable) = true];
}

message CircuitBreakerSettings {
string reference_lpt_price = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
string lower_bound = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
string upper_bound = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

MsgSetRecoveryMode

This message adjusts the recovery mode of a pool.

message MsgSetRecoveryMode {
string authority = 1;
uint64 pool_id = 2;
bool recovery_mode = 3;
}

message MsgSetRecoveryModeResponse {}

MsgSetPauseMode

This message changes the pause mode of a pool. Depending on the message signer, the pool will either enter governance-pause mode or owner-pause mode.

message MsgSetPauseMode {
string creator = 1;
uint64 pool_id = 2;
bool pause_mode = 3;
}

message MsgSetPauseModeResponse {}

MsgSetVaultPauseMode

This message allows the amm vault to be paused or resumed.

message MsgSetVaultPauseMode {
string authority = 1;
bool pause_mode = 2;
}

message MsgSetVaultPauseModeResponse {}

MsgCreateOraclePricePair

This message creates a new oracle price pair, which is utilized during the token introduction process in weighted pools.

message MsgCreateOraclePricePair {
string authority = 1;
OraclePricePair oracle_price_pair = 2 [(gogoproto.nullable) = false];
}

message MsgCreateOraclePricePairResponse {}

MsgUpdateOraclePricePair

This message updates an existing oracle price pair.

message MsgUpdateOraclePricePair {
string authority = 1;
OraclePricePair oracle_price_pair = 2 [(gogoproto.nullable) = false];
}

message MsgUpdateOraclePricePairResponse {}

MsgDeleteOraclePricePair

Use this message to delete an existing oracle price pair.

message MsgDeleteOraclePricePair {
string authority = 1;
string asset_id = 2;
}

message MsgDeleteOraclePricePairResponse {}

MsgSetSwapProtocolFee

Use this message to set the swap protocol fee ratio for a specific pool.

message MsgSetSwapProtocolFee {
string authority = 1;
uint64 pool_id = 2;
// if protocol fee parameters are nil, then the values are read from treasury module parameters
string swap_protocol_fee = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = true
];
}

message MsgSetSwapProtocolFeeResponse {}

MsgSetJoinExitProtocolFee

Use this message to set the join/exit protocol fee ratio for a specific pool.

message MsgSetJoinExitProtocolFee {
string authority = 1;
uint64 pool_id = 2;
// if protocol fee parameters are nil, then the values are read from treasury module parameters
string join_exit_protocol_fee = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = true
];
}

message MsgSetJoinExitProtocolFeeResponse {}

MsgIntroduceYammLpToWeightedPool

Use this message to introduce a new YAMM liquidity provider token (LPT) to a weighted pool.

message MsgIntroduceYammLpToWeightedPool {
string creator = 1;
uint64 weighted_pool_id = 2;
uint64 yamm_pool_id = 3;
string token_normalized_weight = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
int64 virtual_balance_interval_millis = 5;
}

message MsgIntroduceYammLpToWeightedPoolResponse {}

MsgIntroduceAssetBaseTokenToWeightedPool

Use this message to introduce a new asset base token to a weighted pool.

message MsgIntroduceAssetBaseTokenToWeightedPool {
string creator = 1;
uint64 weighted_pool_id = 2;
string token_denom = 3;
string asset_id = 4;
string token_normalized_weight = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
int64 virtual_balance_interval_millis = 6;
}

message MsgIntroduceAssetBaseTokenToWeightedPoolResponse {}

MsgCancelPendingTokenIntroduction

Use this message to cancel a pending token introduction in a weighted pool.

message MsgCancelPendingTokenIntroduction {
string creator = 1;
string asset_id = 2;
uint64 target_pool_id = 3;
}

message MsgCancelPendingTokenIntroductionResponse {}

MsgRemoveTokenFromWeightedPool

This message removes a token from a weighted pool.

message MsgRemoveTokenFromWeightedPool {
string creator = 1;
uint64 pool_id = 2;
string token_denom = 3;
int64 virtual_balance_interval_millis = 4;
}

message MsgRemoveTokenFromWeightedPoolResponse {}

MsgUpdateParams

This message modifies the module parameters. Parameters are divided into three categories, each optional. If parameters within a category aren't specified, they remain unchanged in the module.

message MsgUpdateParams {
string authority = 1;
GeneralPoolParameters general_pool_parameters = 2 [(gogoproto.nullable) = true];
YammParameters yamm_parameters = 3 [(gogoproto.nullable) = true];
OrderParameters order_parameters = 4 [(gogoproto.nullable) = true];
AuthorizationParameters authorization_parameters = 5 [(gogoproto.nullable) = true];
GasParameters gas_parameters = 6 [(gogoproto.nullable) = true];
}

message MsgUpdateParamsResponse {}

MsgSetPoolAdmins

This messages allows updating admin list of a pool.

message MsgSetPoolAdmins {
option (cosmos.msg.v1.signer) = "creator";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 pool_id = 2;
repeated string admins = 3;
}

message MsgSetPoolAdminsResponse {}

MsgSetPauseAllowList

This messages allows updating pause allow-list of a pool.

message MsgSetPauseAllowList {
option (cosmos.msg.v1.signer) = "creator";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 pool_id = 2;
repeated string pause_allow_list = 3;
}

message MsgSetPauseAllowListResponse {}

MsgSetPauseWindow

This messages allows updating pause window of a pool.

message MsgSetPauseWindow {
option (cosmos.msg.v1.signer) = "creator";

string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 pool_id = 2;
PoolPauseWindow pause_window = 3 [(gogoproto.nullable) = false];
}

message MsgSetPauseWindowResponse {}

MsgAddMaturityToYamm

This message adds a new maturity to a YAMM pool. If the vault or pool is paused or if maturity fails to add automatically, this method enables manual addition. If the pool doesn't exist, this creates the pool with all applicable active maturities of the asset.

message MsgAddMaturityToYamm {
string authority = 1;
string assetId = 2;
string maturitySymbol = 3;
}

message MsgAddMaturityToYammResponse {}

MsgSetInitializationAllowList

This message sets the initialization allow list for a pool.

message MsgSetInitializationAllowList {
string creator = 1;
uint64 pool_id = 2;
repeated string initialization_allow_list = 3;
}

message MsgSetInitializationAllowListResponse {}

MsgZeroImpactJoinYamm

This message allows a user to join a YAMM pool with cASSET. The two-step process involves obtaining the necessary pASSET through a sequence of refracts and then performing a join operation on the pool. The user receives LP tokens and yASSETs obtained from refracting.

message MsgZeroImpactJoinYamm {
option (cosmos.msg.v1.signer) = "creator";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
cosmos.base.v1beta1.Coin c_amount_in = 2 [(gogoproto.nullable) = false];
string min_lpt_out = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = true
];
}

message MsgZeroImpactJoinYammResponse {
cosmos.base.v1beta1.Coin lpt_out = 1 [(gogoproto.nullable) = false];

repeated cosmos.base.v1beta1.Coin y_out = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

cosmos.base.v1beta1.Coin refract_fee = 3 [(gogoproto.nullable) = false];

repeated cosmos.base.v1beta1.Coin join_protocol_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

repeated cosmos.base.v1beta1.Coin swap_fee = 5 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}

MsgSetOrderPairDisabled

This message allows governance or admin to disable/enable an order pair. A disabled order pair is no longer included in the per-block order execution, and users can not submit orders for disabled orders, furthermore a proposer cannot propose a match for orders of disabled pairs.

message MsgSetOrderPairDisabled {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "pryzm/amm/v1/SetOrderPairDisabled";

string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
DisabledOrderPair pair = 2 [(gogoproto.nullable) = false];
bool disabled = 3;
}

message MsgSetOrderPairDisabledResponse {}