What this does
This plug winds or unwinds an Aave leveraged position in a single flash-loaned transaction. It asks the caller for supply_amount, supply_token, aave_market, borrow_amount, borrow_token, and the is_winding flag. When is_winding equals 1 it flash loans, supplies, and borrows; otherwise it flash loans, repays, and withdraws, routing tokens through the solver each way. Each branch requires the routed gain to cover the flash loan owed, so an unfunded or stale routing quote reverts the whole transaction.
Actions · 30






























Related plugs · 8