Switch the collateral backing your debt without closing the debt position
routingStrategy
: router
, you must first approve the Enso contract to spend your tokens.
The code samples below include the necessary client.getApprovalData()
step, which generates the required approval transaction
to be signed before the main routing transaction.redeem
a part of exising WETH
collateral for the aWETH
positionroute
to swap the redeemed collateral (WETH) to a different position (WBTC)deposit
the swapped position (WBTC) as collateral for the existing debt