What this does
This plug unwinds a leveraged WETH/USDC position on the Aave market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e by repaying outstanding USDC debt and withdrawing aWETH collateral to the socket. It reads reserve data, the aWETH balance, and the vUSDC debt for the account at 0x484428507A212cA56D71baa27Ca6089a6dB63a88. It fires only when the exited_weth/usdc_loop flag is false, a supply position exists, and the oracle WETH price is at or below 2000, then sets the flag true. Doing this by hand or on a stale price risks missing the stop level and holding losses.
Actions · 17

















Related plugs · 8