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.

  • Get Chainlink Token Value (USD)

    plug
    math
  • Get Chainlink Price (USD)

    plug
    chainlink
  • Card: Buy an 18 Dec Token With X% of USDC

    plug
    evm
    math
  • Card: Sell X% of an 18 Dec Token for USDC

    plug
    evm
    math
  • Card: Sell 18 Dec Token for USDC

    plug
    chainlink
    math
  • Card: Sell 8 Dec Token for USDC

    plug
    chainlink
    math
  • Card: Buy 8 Dec Token With USDC

    plug
    chainlink
    values
  • Card: Buy 18 Dec Token With USDC

    plug
    chainlink
    values
  • Transfer Token X Times an Hour

    plug
    time
    evm
  • Transfer Token X Times a Fortnight

    plug
    time
    evm
  • Transfer Token Once a Quarter

    plug
    time
    evm
  • Transfer Token Once a Month

    plug
    time
    evm
  • Transfer Token Once a Fortnight

    plug
    time
    evm
  • Transfer Token Once a Day

    plug
    time
    evm
  • Transfer Token Once an Hour

    plug
    time
    evm
  • Transfer Token Once a Year

    plug
    time
    evm
  • Transfer Token X Times a Month

    plug
    time
    evm
  • Transfer Token X Times a Year

    plug
    time
    evm
  • Transfer USDC Once a Year

    plug
    time
    evm
  • Transfer USDC Once a Day

    plug
    time
    evm
  • Transfer USDC Once a Quarter

    plug
    time
    evm
  • Transfer USDC Once a Month

    plug
    time
    evm
  • Transfer USDC Once a Fortnight

    plug
    time
    evm
  • Transfer USDC Once an Hour

    plug
    time
    evm
  • Transfer Token X Times a Quarter

    plug
    time
    evm
  • Transfer Token X Times a Day

    plug
    time
    evm
  • Transfer Token X Times a Week

    plug
    time
    evm
  • Dust Guard

    plug
    boolean
  • Transfer Token Weekly

    plug
    time
    evm
  • Expected Amount to Minimum Received

    plug
    math
    values
  • Revoke Spending Approval

    plug
    evm
  • Approve Spending

    plug
    evm
  • Unwrap WETH to ETH

    plug
    evm
  • Wrap ETH to WETH

    plug
    evm
  • 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
  • Wind or Unwind to Maintain Target HF

    plug
    aave
    math
  • Supply if a Token Balance Is 0

    plug
    aave
    evm
  • Rebalance Holdings by Fixed Weights

    values
    evm
    plug
  • Morpho: Leverage Manager

    values
    morpho
    evm
  • Exit Morpho at Epoch End

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

    boolean
    aave
    evm
  • Card: Buy $50 WBTC With USDC Once a Week

    time
    values
    math
  • Card: Sell 10% of ETH for USDC

    evm
    math
    chainlink
  • Card: Buy ETH With 10% of USDC

    evm
    math
    chainlink
  • Card: Sell $25 ETH for USDC

    values
    math
    chainlink
  • Card: Buy $25 ETH With USDC

    values
    math
    chainlink

Posts · 6