• The largest draw that opens a valid Trove: ICR ≥ the binding ratio (MCR normally, CCR in Recovery Mode) AND netDebt ≥ minNetDebt. Returns 0n if even the ICR-feasible maximum is below the debt floor (no valid open).

    Solved by monotonic binary search on the draw, calling the real getBorrowingFee each step, assumption-free about the fee shape (ICR is strictly decreasing in draw). The fee read only touches the cached borrowing-rate slot, so the search is cheap.

    Parameters

    Returns Promise<bigint>