• The closed form behind maxWithdrawableCollateral, as a pure function.

    Parameters

    • input: {
          capacity: bigint;
          collateral: bigint;
          entireDebt: bigint;
          isRecoveryMode: boolean;
          price: bigint;
          systemColl: bigint;
          systemDebt: bigint;
      }
      • capacity: bigint

        getTroveMaxBorrowingCapacity, for the capacity the withdrawal leaves (MK-242).

      • collateral: bigint
      • entireDebt: bigint
      • isRecoveryMode: boolean
      • price: bigint
      • systemColl: bigint
      • systemDebt: bigint

    Returns MaxWithdrawable