In-Given-Out
Our prior equation can now be utilized in place of Ai to determine the actual amount we must spend to receive the 1000 WMATIC we desire. We must now consider Ai to be our initial value as paying our swap fee will increase the Amount-IN required.
TEL/USDC/WMATIC 60/20/20:
WMATIC/USDC/WETH/BAL 25/25/25/25:
We can then determine the break-even swap fee for the WMATIC/USDC/WETH/BAL 25/25/25/25 pool below.