What this does
This plug closes a WETH/USDC Aave loop when the USDC borrow rate rises to its exit threshold. It reads the socket's global flag exited_weth/usdc_loop and Aave reserve data for USDC and WETH in the Ethereum market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e. It fires only when the flag is false, the USDC borrow rate is at or above 0.055, and outstanding USDC debt exists, then repays the debt and withdraws the aWETH collateral. Acting by hand or on a stale rate risks paying a borrow rate past the intended exit point.
Actions · 17

















Related plugs · 8