What this does
This plug adjusts a Morpho Blue position toward a target loan-to-value by flash-loaning the loan token, swapping into collateral, supplying it, and borrowing against it. It asks the caller for account, market, triggerLTV, targetLTV, maxSlippage, and numChunks. It fires only when the position carries nonzero debt and its collateral value sits below the scaled triggerLTV threshold. Running it by hand or on a stale oracle price risks sizing the borrow and collateral swap wrong and breaching the maxSlippage bound.
Actions · 24
























Related plugs · 8