Compare two values
Compare two values

Boolean · Reads onchain state

Compares two values with a chosen operator and returns a boolean. The operator can be equal, not equal, greater than, greater or equal, less than, less or equal, and, or or, applied to two numbers or two booleans. Decimals are matched between the operands so a price and a threshold compare correctly. The result is a value, not a branch. Reach for it when a later step needs the boolean itself: feed it into a while loop's condition, store it as a flag, combine several comparisons with and or or, or bubble it as the program's result. Use the predicate instead when the goal is to branch or revert.

Dust Guard

plug
boolean
4actions
  1. 1·Take

    Declares a named parameter called amount, whose value the caller supplies when running the plug.

  2. 2·Take

    A second parameter, threshold, is likewise declared for the caller to fill in at execution time.

  3. 3·Compare two values

    Comparing the amount against the threshold, this step returns true when the amount is greater than or equal to the threshold.

  4. 4·Predicate

    Requiring that comparison result to equal true, execution proceeds only when the amount meets or exceeds the threshold, otherwise it halts.

Take
Take
Is
  • Dust Guard

    plug
    boolean
  • Swap at Floor

    plug
    evm
    values
  • Morpho: Auto Leverage Trigger

    plug
    morpho
    math
  • Swap

    plug
    values
    evm
  • Morpho: Check Refinancing Constraints

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

    plug
    evm
    boolean
  • Exit Morpho at Epoch End

    pendle
    time
    boolean
  • Check Minimum Threshold

    plug
    boolean
    evm
  • Find Value Delta

    plug
    boolean
    evm
  • Morpho: Get Health Factor

    plug
    boolean
    evm
  • Aave: Wind or Unwind Position

    plug
    boolean
    aave
  • 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
  • Supply Idle Balance Weekly

    time
    evm
    boolean
  • Borrow + Weekly Repayments

    time
    aave
    evm
  • Borrow Rate Exit Guard (WETH/USDC Loop)

    boolean
    aave
    evm
  • Loop WETH/USDC at Target HF

    aave
    evm
    boolean
  • Swarm: Loop WETH/USDC at Target HF

    boolean
    aave
    evm
  • Loop at Target HF + Trailing Stop Loss

    database
    boolean
    aave
  • Borrow + Term Repayment Schedule

    time
    database
    boolean
  • Loop at Target HF + Borrow Rate Exit Guard

    database
    boolean
    aave
  • Stop Loss (WETH/USDC Loop)

    boolean
    aave
    evm
  • Take Profit (WETH/USDC Loop)

    boolean
    aave
    evm
  • Trailing Stop Loss (WETH/USDC Loop)

    boolean
    aave
    evm
  • Loop at Target HF + Borrow Rate Entry & Exit Guard

    aave
    boolean
    evm