Rounding error when call function `dodoMultiswap()` can lead to revert of transaction or fund of user
The calculation of the proportion when do the split swap in function `_multiSwap` doesn't care about the rounding error\\nThe amount of `midToken` will be transfered to the each adapter can be calculated by formula `curAmount = curTotalAmount * weight / totalWeight`\\n```\\nif (assetFrom[i - 1] == address(this)) {\\n    uint256 curAmount = curTotalAmount * curPoolInfo.weight / curTotalWeight;\\n\\n\\n    if (curPoolInfo.poolEdition == 1) {\\n        //For using transferFrom pool (like dodoV1, Curve), pool call transferFrom function to get tokens from adapter\\n        IERC20(midToken[i]).transfer(curPoolInfo.adapter, curAmount);\\n    } else {\\n        //For using transfer pool (like dodoV2), pool determine swapAmount through balanceOf(Token) - reserve\\n        IERC20(midToken[i]).transfer(curPoolInfo.pool, curAmount);\\n    }\\n}\\n```\\n\\nIt will lead to some scenarios when `curTotalAmount * curPoolInfo.weight` is not divisible by `curTotalWeight`, there will be some token left after the swap.\\nFor some tx, if user set a `minReturnAmount` strictly, it may incur the reversion. For some token with small decimal and high value, it can make a big loss for the sender.
Add a accumulation variable to maintain the total amount is transfered after each split swap. In the last split swap, instead of calculating the `curAmount` by formula above, just take the remaining amount to swap.
Revert the transaction because not enough amount of `toToken`\\nSender can lose a small amount of tokens
```\\nif (assetFrom[i - 1] == address(this)) {\\n    uint256 curAmount = curTotalAmount * curPoolInfo.weight / curTotalWeight;\\n\\n\\n    if (curPoolInfo.poolEdition == 1) {\\n        //For using transferFrom pool (like dodoV1, Curve), pool call transferFrom function to get tokens from adapter\\n        IERC20(midToken[i]).transfer(curPoolInfo.adapter, curAmount);\\n    } else {\\n        //For using transfer pool (like dodoV2), pool determine swapAmount through balanceOf(Token) - reserve\\n        IERC20(midToken[i]).transfer(curPoolInfo.pool, curAmount);\\n    }\\n}\\n```\\n