Get credit

Get credit on Morpho Midnight

Ethereum
Ethereum
Base
Base

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.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

More on Morpho Midnight · 9