What this does
This plug rebalances a WETH collateral and USDC debt loop on Aave in the Ethereum market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e toward a target health factor. It reads WETH reserve data, the oracle price, liquidation LTV, and the socket's account data. When no aWETH is supplied it seeds 5 WETH, then sets target debt as the liquidation ceiling divided by 1.5 and repays USDC or borrows USDC accordingly. Running this by hand or on a stale price risks repaying, withdrawing, or borrowing the wrong amount relative to the liquidation threshold.
Actions · 29





























Related plugs · 8