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

    Opening the inputs, amount is declared as a caller parameter, its value handed in at execution time as the figure being measured.

  2. 2·Take

    A second parameter, threshold, is taken from the caller when the plug runs, giving the floor the amount is tested against.

  3. 3·Compare two values

    Comparing amount against threshold with a greater than or equal operator, this returns true when the amount sits at or above the threshold.

  4. 4·Predicate

    Requiring that comparison to equal true, execution proceeds only when the amount clears the threshold and reverts otherwise.

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
  • Morpho Pendle Expiry Deleveraging

    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
  • Supply if a Token Balance Is 0

    plug
    aave
    evm
  • Wind or Unwind to Maintain Target HF

    plug
    aave
    math
  • Supply Idle Balance Weekly

    time
    evm
    boolean
  • Borrow + Weekly Repayments

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

    boolean
    aave
    evm
  • Borrow + Term Repayment Schedule

    time
    database
    boolean
  • Swarm: Loop WETH/USDC at Target HF

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

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

    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 WETH/USDC at Target HF

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

    aave
    boolean
    evm