Data provider
openLendDataProvider is a read-only helper contract that bundles openLend and oracle state into batchable views. No transaction requires it: everything it returns can be derived from openLend and the oracle directly, and its outputs are byte-compatible with computing things yourself. It exists so UIs and bots can read a market in a handful ofeth_calls.
Reading arrangements
Three overloads return fullLendingArrangement structs (layout under Inspect terms):
getRefiParams(lendingId), getOracleParams(lendingId), and getRateParams(lendingId) return the corresponding sub-structs individually.
Finalize state
Mirrors the decisionfinalize() would make at the current block, including the basefee gate, for a batch of loans:
FinalizeOutcome
None: not in liquidation. Pending: the oracle report is still disputable, so autoSettle is a no-op. Restore: finalizing would fail the liquidation and restore the loan. Liquidate: finalizing would liquidate.uint256
When the oracle game becomes (or became) settleable: the last report’s timestamp plus
settlementTime.uint48
The grace period a
Restore would set, 0 when none.Amounts owed
Oracle games
getOracleGames returns each loan’s live liquidation report id (0 when not in liquidation) and its stored oracle game (zeroed when none). getStoredGames is the raw batch for callers that already hold report ids, including past liquidations.
Delegates
address(0) when unset.
Fee receivers
LoanLiquidationUnderway snapshot:
getBeneficiaries returns the borrower, lender, and liquidator recorded on a receiver, zeroed when the receiver is not yet deployed or its lending id does not match. Match the receiver address against the loan’s LoanLiquidationUnderway event rather than trusting its reported lending id alone.
Param hash helpers
getParamHash(lendingId) and getLiquidateParamHash(lendingId) return the two hash variants computed from current storage. They are debugging helpers only: an integration should compute the hash itself from state it has read and reviewed, as described under Calculating the param hash and Calculating the liquidate param hash.