Use
Use

Plug · Acts onchain

Composes another plug inside this one. The referenced plug's Takes become this step's inputs and its Bubbles become its outputs. Composition is expanded into the referenced plug's real steps before compilation, so the result is one atomic transaction. Reach for it to reuse a tested building block, such as a rebalance or a harvest routine, inside a larger strategy without duplicating its steps.

Get Chainlink Token Value (USD)

plug
math
5actions
  1. 1·Take

    Step one declares a parameter named token, whose value the caller supplies when the plug runs.

  2. 2·Take

    Next comes a second parameter named amount, also filled in by the caller at execution time.

  3. 3·Use

    This step composes another plug, Get Chainlink Price (USD), pulling its price result into this transaction.

  4. 4·Calculate

    Multiplying the composed price from slot 3 by the caller supplied amount from slot 2 produces the total value.

  5. 5·Bubble

    Finally the product from slot 3 of the math step is surfaced as this plug's output.

Take
Take
Use where
tokenis
Calculate
Bubble
  • Get Chainlink Token Value (USD)

    plug
    math
  • Get Chainlink Price (USD)

    plug
    chainlink
  • Set SMA Weight

    plug
    database
  • Get Simple Moving Average

    plug
    time
    chainlink
  • Get Weight Target

    plug
    values
    math
  • Rebalance Holdings by Fixed Weights

    values
    evm
    plug
  • Rebalance Holdings to Target

    plug
    values
    evm
  • Get Token Target

    plug
    database
    evm
  • Get Total Holdings Value

    plug
    evm
    boolean
  • Morpho: Leverage Manager

    values
    morpho
    evm
  • Morpho: Auto Leverage Trigger

    plug
    morpho
    math
  • 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
  • Exit Morpho at Epoch End

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

    boolean
    aave
    evm