Fee Refund
/// @notice Matches a taker order against a list of maker orders, refunding maker order fees if necessary
/// @param takerOrder - The active order to be matched
/// @param makerOrders - The array of maker orders to be matched against the active order
/// @param takerFillAmount - The amount to fill on the taker order, always in terms of the maker amount
/// @param takerReceiveAmount - The amount to that will be received by the taker order, always in terms of the taker amount
/// @param makerFillAmounts - The array of amounts to fill on the maker orders, always in terms of the maker amount
/// @param takerFeeAmount - The fee to be charged to the taker
/// @param makerFeeAmounts - The fee to be charged to the maker orders
function matchOrders(
Order memory takerOrder,
Order[] memory makerOrders,
uint256 takerFillAmount,
uint256 takerReceiveAmount,
uint256[] memory makerFillAmounts,
uint256 takerFeeAmount,
uint256[] memory makerFeeAmounts
) external onlyAdmin {
// Match the orders on the exchange
exchange.matchOrders(takerOrder, makerOrders, takerFillAmount, makerFillAmounts);
// Refund taker fees
_refundTakerFees(takerOrder, takerFillAmount, takerReceiveAmount, takerFeeAmount);
// Refund maker fees
_refundMakerFees(makerOrders, makerFillAmounts, makerFeeAmounts);
}Last updated
