File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,12 @@ contract HyperdriveMatchingEngineV2 is
6666 name = _name;
6767 }
6868
69- /// @notice Matches two orders.
69+ /// @notice Matches two orders. The ordering of the inputs matters, and
70+ /// the general rule is to put the open order before the close
71+ /// order and the long order before the short order. For example,
72+ /// OpenLong + CloseLong is valid, but CloseLong + OpenLong is
73+ /// invalid; OpenLong + OpenShort is valid, but OpenShort +
74+ /// OpenLong is invalid.
7075 /// @param _order1 The first order to match.
7176 /// @param _order2 The second order to match.
7277 /// @param _surplusRecipient The address that receives the surplus funds
@@ -822,7 +827,6 @@ contract HyperdriveMatchingEngineV2 is
822827 OrderIntent[] calldata _orders
823828 ) external nonReentrant {
824829 bytes32 [] memory orderHashes = new bytes32 [](_orders.length );
825-
826830 for (uint256 i = 0 ; i < _orders.length ; i++ ) {
827831 // Ensure sender is the trader.
828832 if (msg .sender != _orders[i].trader) {
You can’t perform that action at this time.
0 commit comments