When providing operations, we assume that client is sending them in format Token1->Token2, Token2->Token3, etc.
We take next_offer_amount = simulate_swap.ask_amount blindly.
Add validation, that offer/ask asset of subsequent operation is a ask/offer of a previous one.
When providing operations, we assume that client is sending them in format Token1->Token2, Token2->Token3, etc. We take
next_offer_amount = simulate_swap.ask_amount
blindly.Add validation, that offer/ask asset of subsequent operation is a ask/offer of a previous one.
Valid:
Invalid: