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

What this does

This plug manages a WETH/USDC leverage loop on Aave in the Ethereum market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e by composing three sub-plugs that supply, maintain a target health factor, and enforce a stop loss. It reads the WETH and USDC reserve data and the position held at 0x484428507A212cA56D71baa27Ca6089a6dB63a88. It runs only when the exited_weth/usdc_swarm flag equals false, opening the position when no aToken is held and unwinding on the stop loss trigger. Managing this by hand across supply, rebalance, and exit risks acting on stale rates or a closed position.

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