Transaction Specification

Asset Opt-in Transactions

1. AppCall: Sender: user_address Index: router_app_id OnComplete: NoOp App Args: [“asset_opt_in”] Foreign Assets: [asset_1_id, asset_2_id, ….., asset_n_id] Fee: min_fee * (1 + number of assets)

Swap Transactions

1. AssetTransfer/Pay (Input):

Sender: user_address Receiver: pool_address Index: asset_1_id or asset_2_id Amount: input_amount

2. AppCall:

a. Mode: Fixed Input

Sender: user_address Index: router_app_id OnComplete: NoOp App Args: [“swap”, “fixed-input”, min_output_amount] Foreign Assets: [asset_in_id, asset_intermediary_id, asset_out_id] Accounts: [pool_1_address, pool_2_address] Foreign Apps: [amm_app_id] Fee: (8 * min_fee)

b. Mode: Fixed Output

Sender: user_address Index: router_app_id On Complete: NoOp App Args: [“swap”, “fixed-output”, output_amount] Foreign Assets: [asset_in_id, asset_intermediary_id, asset_out_id] Accounts: [pool_1_address, pool_2_address] Foreign Apps: [amm_app_id] Fee: (9 * min_fee)

Last updated