Plug
Plug
Defi

Plug is the execution layer itself: the machinery that takes a plan built from steps and conditions and turns it into a single transaction that runs when its moment arrives, exactly as written, or not at all.

Everything a plug does ultimately routes through here. Swaps compile against live solver liquidity with the outcome verified onchain before the transaction is allowed to settle. Plans declare parameters so one plug can be written once and run with different values every time, and surface outputs so one plug can feed another, whole strategies composing out of smaller strategies the way functions compose out of functions. Execution results, fees, schedules, and portfolio history are recorded as they happen, so a plan can read its own past.

The atomicity is the point. Eight steps that would be eight transactions, eight signatures, and eight chances for the market to move in between become one unit that either all happens or none of it does. A condition checked in the same transaction as the action it gates cannot go stale in the mempool, which is a guarantee no person clicking through a wallet can have.

Composition is how the serious plans get built: small plugs that each do one thing, wired into larger ones, running on conditions instead of attention. The primitives live here.

  • Unstake From Lido, Claim It When It Clears, Restake It

    plug
    database
    boolean
  • Pendle Leveraged PT Auto Rollover

    plug
    pendle
    time
  • Get Chainlink Token Value (USD)

    plug
    math
  • Get Chainlink Price (USD)

    plug
    chainlink
  • Transfer Token on a Schedule

    plug
    evm
    time
  • Dust Guard

    plug
    boolean
  • Expected Amount to Minimum Received

    plug
    math
    values
  • Revoke Spending Approval

    plug
    evm
  • Approve Spending

    plug
    evm
  • Unwrap WETH to ETH

    evm
    plug
  • Wrap ETH to WETH

    evm
    plug
  • Set SMA Weight

    plug
    database
  • Raw Weights to Percents

    plug
    evm
    boolean
  • Get Simple Moving Average

    plug
    time
    chainlink
  • Get Weight Target

    plug
    values
    math
  • Get Price Running Total

    plug
    values
    math
  • Rebalance Holdings to Target

    plug
    values
    evm
  • Get Token Target

    plug
    database
    evm
  • Get Total Holdings Value

    plug
    evm
    boolean
  • Set Rebalance Token

    plug
    database
  • Get Target Balance

    plug
    math
    evm
  • Get Holding Value

    plug
    evm
    math
  • Swap at Floor

    plug
    evm
    values
  • Morpho: Auto Leverage Trigger

    plug
    morpho
    math
  • Swap

    plug
    values
    evm
  • Morpho: Refinance to Cheaper Borrow Market

    morpho
    plug
    boolean
  • Morpho: Check Refinancing Constraints

    plug
    morpho
    evm
  • Morpho: Check Market Liquidity Vs. Required Amount

    plug
    evm
  • Morpho: Check Health Factor Vs. Min Threshold

    plug
    evm
  • Morpho: Find Borrow Rate Delta

    plug
    morpho
    evm
  • Morpho: Check Borrow Rate Delta Vs. Min Threshold

    plug
    evm
    boolean
  • Check Required Amount

    plug
    math
    evm
  • Morpho: Get Market Liquidity

    plug
    morpho
    math
  • Check Minimum Threshold

    plug
    boolean
    evm
  • Morpho: Get Borrow APR

    plug
    values
    math
  • Find Value Delta

    plug
    boolean
    evm
  • Morpho: Get Health Factor

    plug
    boolean
    evm
  • Morpho: Collateral Value to Borrow Capacity

    plug
    math
    evm
  • Morpho: Collateral Amount to Collateral Value

    plug
    math
  • Morpho: Borrow Shares to Borrow Assets

    plug
    math
    evm
  • Aave: Wind or Unwind Position

    plug
    boolean
    aave
  • Value to Token Amount

    plug
    aave
    math
  • Target Debt to Debt Delta

    plug
    aave
    boolean
  • Wind

    plug
    aave
    evm
  • Unwind

    plug
    aave
    evm
  • Dust Guard

    plug
    boolean
    evm
  • Supply if a Token Balance Is 0

    plug
    aave
    evm
  • Wind or Unwind to Maintain Target HF

    plug
    aave
    math
  • Rebalance Holdings by Fixed Weights

    values
    evm
    plug
  • Morpho: Leverage Manager

    values
    morpho
    evm
  • Morpho Pendle Expiry Deleveraging

    pendle
    time
    boolean
  • Strategy: Loop WETH/USDC at Target HF + Stop Loss

    boolean
    aave
    evm

Posts · 9