Morpho: Get Market Liquidity
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug computes the available liquidity of a Morpho Blue market by subtracting its borrowed assets from its supplied assets. It asks the caller for the morpho_market to measure at execution time. It fires whenever the caller runs it, reading the market's live totals at that moment. Reading these totals by hand or from a cached figure risks reporting liquidity that no longer matches the market's current supplied and borrowed state.

Actions · 4

  • Get total supplied and borrowed
    Get total supplied and borrowed in
    Reads a Morpho Blue market's totals: assets and shares supplied and borrowed.
  • Calculate
    Calculate
    Applies a binary arithmetic operation to two values and returns the result.
  • Set
    Set to
    Assigns a value to a named variable that later steps reference.
  • Bubble
    Bubble
    Surfaces a value as an output of this plug.

Related plugs · 8