The uniTransferFrom function can potentially be used with invalid params Unverified
The system is using the `UniERC20` contract to incapsulate transfers of both ERC-20 tokens and ETH. This contract has `uniTransferFrom` function that can be used for any ERC-20 or ETH:\\n```\\nfunction uniTransferFrom(IERC20 token, address payable from, address to, uint256 amount) internal {\\n    if (amount > 0) {\\n        if (isETH(token)) {\\n            require(msg.value >= amount, "UniERC20: not enough value");\\n            if (msg.value > amount) {\\n                // Return remainder if exist\\n                from.transfer(msg.value.sub(amount));\\n            }\\n        } else {\\n            token.safeTransferFrom(from, to, amount);\\n        }\\n    }\\n}\\n```\\n\\nIn case if the function is called for the normal ERC-20 token, everything works as expected. The tokens are transferred `from` the `from` address `to` the `to` address. If the token is ETH - the transfer is expected `to` be `from` the `msg.sender` `to` `this` contract. Even if the `to` and `from` parameters are different.\\nThis issue's severity is not high because the function is always called with the proper parameters in the current codebase.
Resolution\\nAccording to the client, this issue is addressed in 1inch-exchange/[email protected]d0ffb6f.\\n(This fix is as reported by the developer team, but has not been verified by Diligence).\\nMake sure that the `uniTransferFrom` function is always called with expected parameters.
```\\nfunction uniTransferFrom(IERC20 token, address payable from, address to, uint256 amount) internal {\\n    if (amount > 0) {\\n        if (isETH(token)) {\\n            require(msg.value >= amount, "UniERC20: not enough value");\\n            if (msg.value > amount) {\\n                // Return remainder if exist\\n                from.transfer(msg.value.sub(amount));\\n            }\\n        } else {\\n            token.safeTransferFrom(from, to, amount);\\n        }\\n    }\\n}\\n```\\n