API ReferenceLOC lifecycleFunction
assessLetterOfCreditRisk()
function assessLetterOfCreditRisk( outstanding, price, pairConfiguration, evaluatedAtTimestamp): LetterOfCreditRiskAssessment;Assesses V3 risk from explicitly sourced SDK price and current pair-configuration reads. Static and converted positions require neither input. The estimate mirrors the protocol’s value floor, fee floor and liquidation threshold; it is not an observed insolvency outcome.
Parameters
| Parameter | Type | Description |
|---|---|---|
outstanding | LetterOfCreditHistoricalSnapshot & Pick<OutstandingLetterOfCredit, "beneficiary" | "creator" | "creationKind" | "reference"> | Current or indexed outstanding state being assessed. |
price | TokenPairPrice | null | SDK pair-price read for this collateral-to-credited direction, or null when not applicable. |
pairConfiguration | CollateralFactor | null | Current SDK collateral-factor read for the same pair, or null when not applicable. |
evaluatedAtTimestamp | bigint | Explicit Unix-second evaluation clock. Price freshness policy belongs to the price read. |
Returns
Health, liquidation coverage, source inputs and the assessed LOC identity.
Throws
InvalidArgumentError for missing, mismatched or unusable dynamic market inputs.
Example
const risk = assessLetterOfCreditRisk(outstanding, pairPrice, pairConfiguration, now);// A projected shortfall does not write historical insolvency into the LOC.