Strategy: Loop WETH/USDC at Target HF + Stop Loss

Ethereum
Ethereum
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug manages a looped WETH/USDC position on the Aave Ethereum market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e, opening collateral, adjusting toward a target health factor, and composing a stop loss. It reads the exited_weth/usdc_swarm flag and the caller's WETH and USDC reserve data and supply balance at 0x484428507A212cA56D71baa27Ca6089a6dB63a88. It runs only while that flag equals false, meaning the loop has not already been closed. Managing this by hand or on a stale health factor risks winding against a closed position or missing the stop loss trigger.

Actions · 8

  • Read global flag
    Read global flag
    Reads a boolean flag from the socket's global storage by key.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • Get asset data
    Get asset data of in
    Reads an Aave reserve's live rates and token addresses, with supply and borrow APYs.
  • Get token balance
    Get balance of held by
    Reads a token balance held by an address, native or ERC-20.
  • Get asset data
    Get asset data of in
    Reads an Aave reserve's live rates and token addresses, with supply and borrow APYs.
  • Use
    Use where
    supply_tokenis
    aave_marketis
    holder_walletis
    supply_amountis
    Composes another plug inside this one.
  • Use
    Use where
    aave_marketis
    supply_tokenis
    target_health_factoris
    borrow_tokenis
    Composes another plug inside this one.
  • Use
    Use where
    supply_tokenis
    aave_marketis
    holder_walletis
    stop_loss_priceis
    global_flag_keyis
    borrow_tokenis
    Composes another plug inside this one.

Related plugs · 8