Morpho Pendle Expiry Deleveraging
0x581BEf12967f06f2eBfcabb7504fA61f0326CD9A

What this does

This plug repays a caller's USDC debt in a 91.5% LLTV Morpho Blue market and withdraws the matured PT collateral of the Pendle USDat-27AUG2026 market. It asks the caller to name that expiring Pendle market and supply the source Morpho market and solver routing. It fires only after the named market has matured and while an open borrow exists. Repaying and unwinding by hand, or routing on a stale oracle price, risks leaving the flash loan uncovered and reverting the transaction.

Actions · 27

  • Get expiry
    Get expiry of
    Reads the expiry timestamp of a Pendle market.
  • Check temporal state
    Is in the
    Checks whether a timestamp is in the past or the future relative to block time.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • Get total supplied and borrowed
    Get total supplied and borrowed in
    Reads a Morpho Blue market's totals: assets and shares supplied and borrowed.
  • Get account data
    Get data in of
    Reads an address's position in a Morpho Blue market: shares, collateral, debt, and health factor.
  • Compare two values
    Is
    Compares two values with a chosen operator and returns a boolean.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • Get market parameters
    Get market parameters of
    Reads a Morpho Blue market's immutable parameters.
  • Use
    Use where
    borrow_sharesis
    total_borrow_assetsis
    total_borrow_sharesis
    Composes another plug inside this one.
  • Set
    Set to
    Assigns a value to a named variable that later steps reference.
  • Set
    Set to
    Assigns a value to a named variable that later steps reference.
  • 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 Collateral
    Withdraw collateral from
    Withdraws collateral from a Morpho Blue market back to the socket.
  • Get price
    Get price of in
    Reads a Morpho Blue market's oracle price of its collateral in its loan asset.
  • 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.
  • Get address
    Get
    Holds an address as a named value that later steps reference.
  • Get token balance
    Get balance of held by
    Reads a token balance held by an address, native or ERC-20.
  • Transfer tokens
    Transfer to
    Sends a token from the socket to another address, native or ERC-20.
  • Get solution
    Get solution
    Hands tokens already transferred to the solver over for routing, then verifies the outcome.
  • Get token balance
    Get balance of held by
    Reads a token balance held by an address, native or ERC-20.
  • Calculate
    Calculate
    Applies a binary arithmetic operation to two values and returns the result.
  • Compare two values
    Is
    Compares two values with a chosen operator and returns a boolean.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • 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