Exchange - insufficient input validation in matchOrders  Pending
`matchOrders` does not check that that the sender has provided the same number of `amounts` as `makerOrderParams`. When fewer `amounts` exist than `makerOrderParams`, the method will revert because of an out-of-bounds array access. When fewer `makerOrderParams` exist than `amounts`, the method will succeed, and the additional values in `amounts` will be ignored.\\nAdditionally, the method allows the sender to provide no `makerOrderParams` at all, resulting in no state changes.\\n`matchOrders` also does not reject trades with an amount set to zero. Such orders should be rejected because they do not comply with the minimum `tradingLotSize` configured for the system. As a side-effect, events may be emitted for zero-amount trades and unexpected state changes may occur.\\n```\\nfunction matchOrders(\\n    LibOrder.OrderParam memory takerOrderParam,\\n    LibOrder.OrderParam[] memory makerOrderParams,\\n    address \\_perpetual,\\n    uint256[] memory amounts\\n) public {\\n```\\n\\n```\\nfunction matchOrderWithAMM(LibOrder.OrderParam memory takerOrderParam, address \\_perpetual, uint256 amount) public {\\n```\\n
Resolution\\nThis issue was addressed by following the recommendation to verify that `amounts.length > 0 && makerOrderParams.length == amounts.length`. However, the code does not abort if one of the `amounts` is zero which should never happen and therefore raise an exception due to it likely being an erroneous call. Additionally, the method now enforces that only a broker can interact with the interface.\\nRequire `makerOrderParams.length > 0 && amounts.length == makerOrderParams.length`\\nRequire that `amount` or any of the `amounts[i]` provided to `matchOrders` is `>=tradingLotSize`.
```\\nfunction matchOrders(\\n    LibOrder.OrderParam memory takerOrderParam,\\n    LibOrder.OrderParam[] memory makerOrderParams,\\n    address \\_perpetual,\\n    uint256[] memory amounts\\n) public {\\n```\\n