Module Contract.Matching

type outcome =
  1. | Continue of reduction * cursor
  2. | Complete of reduction
val start : market_slice -> reduction -> (cursor, string) Stdlib.result

Fixes the eligible-order cursor after actions and borrow accrual.

val run : market_slice -> cursor -> reduction -> (outcome, string) Stdlib.result

Executes at most one cursor step. Continue retains the same slice; Complete has cancelled market remainders and queued the close callback.