Skip to content

OrderCombiner.sol — highest-risk path #1413

Description

@qadrh

The relevant flow for matchOrders / fulfillAvailableAdvancedOrders is:
_validateOrdersAndPrepareToFulfill()

├─ _validateOrder()
├─ derive partial-fill amounts
├─ apply criteria
├─ authorize restricted orders
├─ update order status


_executeAvailableFulfillments()

├─ _aggregateAvailable()
│ └─ FulfillmentApplier


_performFinalChecksAndExecuteOrders()

├─ execute aggregated transfers
├─ restore / refund unspent offer amounts
├─ require consideration remainder == 0
└─ validate/ratify restricted/contract orders
The critical ordering is confirmed by the 1.6 reference implementation: authorization is performed before _updateStatus, while transfers and the post-hook happen later. The public documentation also confirms that authorizeOrder() is stateful and that a failed authorization can cause fulfillAvailableAdvancedOrders to skip an order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions