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 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




Related plugs · 8