Create Commitment
Lenders can pre-commit capital using specific collateralization requirements so that borrowers can instantly create loans using that capital without having to wait for the lender to manually accept.
/**
* @notice Creates a loan commitment from a lender for a market.
* @param _commitment The new commitment data expressed as a struct
* @param _borrowerAddressList The array of borrowers that are allowed to accept loans using this commitment
* @return commitmentId_ returns the commitmentId for the created commitment
*/
function createCommitment(
Commitment calldata _commitment,
address[] calldata _borrowerAddressList
) public returns (uint256 commitmentId_)
struct Commitment {
uint256 maxPrincipal;
uint32 expiration;
uint32 maxDuration;
uint16 minInterestRate;
address collateralTokenAddress;
uint256 collateralTokenId;
uint256 maxPrincipalPerCollateralAmount;
CommitmentCollateralType collateralTokenType;
address lender;
uint256 marketId;
address principalTokenAddress;
}Last updated
