
What this does
This plug maintains a WETH/USDC leverage loop on Aave at a target health factor. It reads the WETH reserve, the socket's account data, the WETH oracle price, and the liquidation LTV in the Ethereum market at 0x2f39d218133afab8f2b819b1066c7e434ad94e9e. It supplies 5 WETH when no aWETH is held, then sets target debt at the liquidation ceiling divided by 1.5 and rebalances toward it. Running this by hand or against a stale price risks repaying, withdrawing, borrowing, or supplying the wrong amount near the liquidation threshold.
Actions · 29





























Related plugs · 8