Zap repay
Last updated
Last updated
Continuing from .
Zap repay enables users to swap any token to repay the debt in one transaction.
Source token: the debt token to be repaid.
Destination token: the token to be provided by user.
By specifying the source token, the source token amount, and the destination token, the function will return the destination token amount, the updated user portfolio, and the logics to be executed.
The logic should include:
Swap the destination token to the source token
Repay the debt with the source token
To perform the logics, certain approvals need to be processed. You may refer to Estimate Router Data and Send Router Transaction for more details.