LoanTermsConsensus Contracts

Contracts for validating consensus for loan terms

Teller utilizes nodes in order to sign borrower and lender requests before they can be accepted on-chain. The consensus contracts for Teller validate responses from the nodes in congruence with the borrower's request, this allows them to then facilitate or disburse the loan.

The main external function for both of these contracts is the processRequest() method that processes the loan request, or the request for accrued interest, to ensure it is in line with current protocol settings and response variability.

Internally, the contract calls the _getConsensus() method that checks if all the node values are within the tolerance set on the platform in order to retrieve the average of those values and set them on-chain.

The loan terms consensus contracts handle all borrower requests for loans and the related responses from the nodes handling Loan Terms

processLoanTerms()

function( TellerCommon.LoanRequest calldata request, TellerCommon.LoanResponse[] calldata responses, )

TellerCommon.LoanRequest is a request struct/object that is sent to the Teller Nodes and subsequently on-chain, with all the required entries such as:

TellerCommon.LoanResponse[] is an array of signed response structs/objects that are returned from registered Teller nodes. These signed response structs/objects need to be passed on-chain in order to register the loan terms on-chain.

Last updated