
Morpho Midnight · Reads onchain state
Reads an address's credit in a Morpho Midnight market as it stands now. Midnight settles a lender's position lazily, so the credit it stores lags; updatePositionView applies the continuous fee accrued since the position last moved and any loss realized in the market since, and returns the credit, the fee still pending until maturity, and the fee just accrued, in the loan asset. Credit less the pending fee is what the position is worth at maturity. Reach for it to size a withdrawal, to require a lent position is still whole after a liquidation in the market, or to watch credit become withdrawable as maturity passes.