StargateRouter cannot send payloads and rebalancing of ERC20s is broken
The `Balancer.sol` contract can't perform the rebalancing of ERC20s across chains as the Stargate router is not able to send any payload and will immediately revert the transaction if a payload is included. In this instance payload is hardcoded to `"0x"`.\\n`Balancer.sol` contract has a `rebalance` function that is supposed to perform a rebalancing of `mTOFTs` across chains. In case the token being transferred through Stargate is an ERC20 it is using the Stargate router to initiate the transfer. The issue however is that the stargate router is not able to send any payload and will immediately revert the transaction if a payload is included.\\nIf we take a look at the code, there is a payload equal to "0x" being sent with the transaction:\\n```\\n## Balancer.sol\\n\\n    router.swap{value: msg.value}(\\n        _dstChainId,\\n        _srcPoolId,\\n        _dstPoolId,\\n        payable(this),\\n        _amount,\\n        _computeMinAmount(_amount, _slippage),\\n        IStargateRouterBase.lzTxObj({dstGasForCall: 0, dstNativeAmount: 0, dstNativeAddr: "0x0"}),\\n        _dst,\\n    "0x" => this is the payload that is being sent with the transaction\\n    );\\n```\\n\\nAs a proof of concept we can try to send a payload through the stargate router on a forked network and see that the transaction will revert. p.s. make sure to run on it on a forked network on Ethereum mainnet.\\n```\\nfunction testStargateRouterReverting() public {\\n    vm.createSelectFork(vm.envString("MAINNET_RPC_URL"));\\n    \\n    address stargateRouter = 0x8731d54E9D02c286767d56ac03e8037C07e01e98;\\n    address DAIWhale = 0x7A8EDc710dDEAdDDB0B539DE83F3a306A621E823;\\n    address DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n    IStargateRouter.lzTxObj memory lzTxParams = IStargateRouter.lzTxObj(0, 0, "0x00");\\n\\n    vm.startPrank(DAIWhale);\\n    vm.deal(DAIWhale, 5 ether);\\n    IERC20(DAI).approve(stargateRouter, 1e18);\\n    IStargateRouter(stargateRouter).swap{value: 1 ether}(\\n        111, 3, 3, payable(address(this)), 1e18, 1, lzTxParams, abi.encode(address(this)), "0x"\\n    );\\n}\\n```\\n\\nIt fails with the following error:\\nBoth `StargateRouter` and StargateComposer have the `swap` interface, but the intention was to use the `StargateRouter` which can be observed by the `retryRevert` function in the `Balancer.sol` contract.\\n```\\n## Balancer.sol\\n\\nfunction retryRevert(uint16 _srcChainId, bytes calldata _srcAddress, uint256 _nonce) external payable onlyOwner {\\n    router.retryRevert{value: msg.value}(_srcChainId, _srcAddress, _nonce);\\n}\\n```\\n\\nAs this makes the rebalancing of `mTOFTs` broken, I'm marking this as a high-severity issue.
Use the `StargateComposer` instead of the `StargateRouter` if sending payloads.
Rebalancing of `mTOFTs` across chains is broken and as it is one of the main functionalities of the protocol, this is a high-severity issue.
```\\n## Balancer.sol\\n\\n    router.swap{value: msg.value}(\\n        _dstChainId,\\n        _srcPoolId,\\n        _dstPoolId,\\n        payable(this),\\n        _amount,\\n        _computeMinAmount(_amount, _slippage),\\n        IStargateRouterBase.lzTxObj({dstGasForCall: 0, dstNativeAmount: 0, dstNativeAddr: "0x0"}),\\n        _dst,\\n    "0x" => this is the payload that is being sent with the transaction\\n    );\\n```\\n