Skip to content

Commit 8a88d79

Browse files
committed
address review comments
1 parent ca45382 commit 8a88d79

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

contracts/src/matching/HyperdriveMatchingEngineV2.sol

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)