Everything evaluateRefinance needs, already read from the chain.

interface EvaluateRefinanceInput {
    borrowingFeeOnBase: bigint;
    collateral: bigint;
    currentCapacity: bigint;
    currentInterestRateBps: number;
    feeExempt: boolean;
    globalInterestRateBps: number;
    interestOwed: bigint;
    isRecoveryMode: boolean;
    price: bigint;
    principal: bigint;
    refinancingFeePercentage: number;
    status: number;
    systemColl: bigint;
    systemDebt: bigint;
}

Properties

borrowingFeeOnBase: bigint

getBorrowingFee(feeBase), already computed by the caller, before exemption.

collateral: bigint
currentCapacity: bigint

getTroveMaxBorrowingCapacity(owner) (MK-101).

currentInterestRateBps: number

getTroveInterestRate(owner), in basis points (MK-101).

feeExempt: boolean
globalInterestRateBps: number

interestRateManager.interestRate(), the rate a refinance moves the Trove to (MK-101).

interestOwed: bigint
isRecoveryMode: boolean
price: bigint
principal: bigint
refinancingFeePercentage: number

The governable percentage, read live.

status: number

TroveManager.getTroveStatus. 1 is active.

systemColl: bigint
systemDebt: bigint