Diffusal

DiffusalOrderBookExecutor

Match execution module used by DiffusalOptionsOrderBook

DiffusalOrderBookExecutor is called by DiffusalOptionsOrderBook during settlement.

It encapsulates match execution logic that was extracted for contract-size and separation-of-concerns reasons.

Responsibilities

  • update buyer/seller positions
  • collect maker/taker fees (including rebate handling)
  • validate post-trade portfolio margin health

Access Model

  • executeMatch(...) is restricted to the configured order book contract (onlyOrderBook)
  • executor itself must be authorized as operator on dependent contracts

Main External Function

executeMatch(MatchExecutionParams params, FeeConfig feeConfig)
  returns (uint256 premium, FeeResult feeResult)

View Functions

  • orderBook()
  • collateralVault()
  • positionManager()

Notable Behavior

  • Maker rebates are capped by fee-recipient available balance (RebateCapped event)
  • Margin is re-checked after position + fee application

Integration Dependencies

On this page