Morpho: Refinance to Cheaper Borrow Market
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug moves a Morpho Blue position from market 0x3a85...ee49 to market 0x09dc...31c1, both at 86% LLTV, using a fee-free flash loan to repay the source debt, shift the assets, and reborrow. It asks the caller for minimum_apr_delta, minimum_health_factor, and liquidity_multiplier. It fires only when the composed refinancing check confirms the rate gap, health floor, and scaled destination liquidity all hold. Refinancing by hand or on a stale rate risks moving into a market that fails the health or liquidity floor.

Actions · 11

  • Get market parameters
    Get market parameters of
    Reads a Morpho Blue market's immutable parameters.
  • Get market parameters
    Get market parameters of
    Reads a Morpho Blue market's immutable parameters.
  • Use
    Use where
    current_marketis
    target_marketis
    minimum_apr_deltais
    minimum_health_factoris
    liquidity_multiplieris
    Composes another plug inside this one.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • Flash loan
    Flash loan
    Borrows any token the Morpho Blue singleton holds, fee-free, repaid inside this transaction.
  • Repay
    Repay to
    Repays loan-asset debt to a Morpho Blue market from the socket's balance.
  • Withdraw
    Withdraw from
    Withdraws lent loan asset and accrued interest from a Morpho Blue market.
  • Supply
    Supply to
    Lends the loan asset to a Morpho Blue market to earn the supply rate.
  • Borrow
    Borrow from
    Borrows the loan asset from a Morpho Blue market against your supplied collateral.
  • End block
    End block
    Closes the innermost open block, whether a conditional branch or a loop.
  • End block
    End block
    Closes the innermost open block, whether a conditional branch or a loop.

Related plugs · 8