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 a market identifier, morpho_market, at execution time. It fires on demand whenever run, reading the market's current totals and returning the difference as available_liquidity. Computing this by hand means fetching both totals separately and differencing them, and a stale total returns a liquidity figure that no longer matches the market's on-chain state.
Actions · 4
Gettotalsuppliedandborrowedin
Reads a Morpho Blue market's totals: assets and shares supplied and borrowed.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Setto
Assigns a value to a named variable that later steps reference.
Bubble
Surfaces a value as an output of this plug.
Related plugs · 8
Not ready to run as it stands: it waits on values or a position of your own.