Foreclose
The foreclosure process allows us to address and manage delinquent loans effectively.
Transactional Function Sequence
Loan Management Module
requestDebtToken
Loan Management Module
updateProtection
Loan Brokerage Modyle
updateLoan
Step 1: requestDebtToken
function requestDebtToken(address user, string lenderName, string pointer, uint256 loanId)
user
The users eth address
loanId
The users loanId
lenderName
The name of the lender
pointer
The lender market pointer
Step 2: Update Loan Info
function updateLoan(bytes loanInfo, address user, uint256 loanId, UpdateField)
loanInfo
This amount will be zeroed with the loan status foreclosed -
bytes memory loanUpdateData = abi.encode(borrowAmount, collateralAmount, 8);
user
The users eth address
loanId
The users loan Id
UpdateField
This will be set to 3
Only proceed if the user is protected
Step 3: updateProtection
function updateProtection(address user, uint256 uniqueId, uint256 loanId, string pointer, string lenderName)
user
The users eth address
uniqueId
The unique Id for the users loan
loanId
The users loanId
pointer
The lender market pointer
lenderName
The name of the lender
Last updated