LoanExecutor
Write Methods
executeLoans
solidity
function executeLoans(
DataTypes.LoanExecParams[] calldata leps
) external returns (ILoan[] memory loans)
If there's not enough liquidity in a single vault to match the borrower's intents, the borrower can use multiple vaults. To do the same, instead of directly calling createLoan on the LendersVault.sol, the borrower can call executeLoans with an array of LoanExecParams. This way, the LoanExecutor internally creates multiple loans on the various vaults.
Parameters
Name | Type | Description |
---|---|---|
leps | LoanExecParams[] | The array of loan exec params |
repayLoan
solidity
function repayLoan(
DataTypes.LoanRepayParams calldata lrp
) external
Used to repay the loan. This can be used when the borrower wants to repay using leverage. This function requires the borrower to approve the collToken
before even calling this function as it will use the amount received in the intermediate transaction, to perform a swap and repay with borrow token.
Parameters
Name | Type | Description |
---|---|---|
lrp | LoanRepayParams[] | The array of loan repay params |