1. AppCall:
Sender: user_address
Index: tinyman_amm_v2_app_id
OnComplete: NoOp
App Args: [“flash_loan”, index_diff, asset_1_amount, asset_2_amount]
Foreign Assets: [asset_1_id, asset_2_id]
Accounts: [pool_address]
Fee: (3 * min_fee)
2. AppCall (Group Index: index of flash loan call + index diff specified in the arguments):
Sender: user_address
Index: tinyman_amm_v2_app_id
OnComplete: NoOp
App Args: [“verifiy_flash_loan”, index_diff]
Foreign Assets: []
Accounts: [pool_address]
Fee: min_fee
1. Flash Loan
- asset_1_cumulative_price
- asset_2_cumulative_price
- cumulative_price_update_timestamp
Inner Transactions
1. AssetTransfer (If asset 1 amount is not 0):
Sender: pool_address
Receiver: user_address
Index: asset_1_id
Amount: asset_1_amount
2. AssetTransfer/Pay (If asset 2 amount is not 0):
Sender: pool_address
Receiver: user_address
Index: asset_2_id
Amount: asset_2_amount
2. Verify Flash Loan
- asset_1_reserves
- asset_2_reserves
- asset_1_protocol_fees
- asset_2_protocol_fees
- asset_1_output_amount
- asset_1_input_amount
- asset_1_donation_amount
- asset_1_poolers_fee_amount
- asset_1_protocol_fee_amount
- asset_1_total_fee_amount
- asset_2_output_amount
- asset_2_input_amount
- asset_2_donation_amount
- asset_2_poolers_fee_amount
- asset_2_protocol_fee_amount
- asset_2_total_fee_amount