The insertion-hint ritual, wrapped once (Appendix A): compute the NICR, pick
numTrials from the list size, get an approximate hint, then refine it to the
exact { upperHint, lowerHint } via findInsertPosition.
The caller supplies the RESULTING PRINCIPAL, not the entire debt (MK-090). For an open
that is draw + getBorrowingFee(draw) + 200, which at open is the same number; for a live
Trove it is the principal AFTER the operation, excluding accrued interest, because that is
what the contract keys the sorted list on (ComputeNICRParams.principal). This does
not compute the principal itself; trove/index.ts projects it per operation.
The insertion-hint ritual, wrapped once (Appendix A): compute the NICR, pick
numTrialsfrom the list size, get an approximate hint, then refine it to the exact{ upperHint, lowerHint }viafindInsertPosition.The caller supplies the RESULTING PRINCIPAL, not the entire debt (MK-090). For an open that is
draw + getBorrowingFee(draw) + 200, which at open is the same number; for a live Trove it is the principal AFTER the operation, excluding accrued interest, because that is what the contract keys the sorted list on (ComputeNICRParams.principal). This does not compute the principal itself;trove/index.tsprojects it per operation.