Foreclose

The foreclosure process allows us to address and manage delinquent loans effectively.

Transactional Function Sequence

Module
Function

Loan Management Module

requestDebtToken

Loan Management Module

updateProtection

Loan Brokerage Modyle

updateLoan

The following 2 functions should

Step 1: requestDebtToken

function requestDebtToken(address user, string lenderName, string pointer, uint256 loanId)

Parameters
Descriptions

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)

Parameters
Descriptions

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

Step 3: updateProtection

function updateProtection(address user, uint256 uniqueId, uint256 loanId, string pointer, string lenderName)

Parameters
Descriptions

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