ILoanDesk
LoanDeskConfig
struct LoanDeskConfig {
bytes32 lenderGovernanceRole;
address pool;
address liquidityToken;
}
LoanApplicationStatus
enum LoanApplicationStatus {
NULL,
APPLIED,
DENIED,
OFFER_DRAFTED,
OFFER_DRAFT_LOCKED,
OFFER_MADE,
OFFER_ACCEPTED,
CANCELLED
}
LoanTemplate
struct LoanTemplate {
uint256 minAmount;
uint256 minDuration;
uint256 maxDuration;
uint256 gracePeriod;
uint32 apr;
}
LoanApplication
struct LoanApplication {
uint256 id;
address borrower;
uint256 amount;
uint256 duration;
enum ILoanDesk.LoanApplicationStatus status;
string profileId;
string profileDigest;
}
LoanOffer
struct LoanOffer {
uint256 applicationId;
address borrower;
uint256 amount;
uint256 duration;
uint256 gracePeriod;
uint256 installmentAmount;
uint16 installments;
uint32 apr;
uint256 lockedTime;
}
LoanStatus
enum LoanStatus {
NULL,
OUTSTANDING,
REPAID,
DEFAULTED
}
Loan
struct Loan {
uint256 id;
address loanDeskAddress;
uint256 applicationId;
address borrower;
uint256 amount;
uint256 duration;
uint256 gracePeriod;
uint256 installmentAmount;
uint16 installments;
uint32 apr;
uint256 borrowedTime;
enum ILoanDesk.LoanStatus status;
}
LoanDetail
struct LoanDetail {
uint256 loanId;
uint256 totalAmountRepaid;
uint256 principalAmountRepaid;
uint256 interestPaidTillTime;
}
LoanRequested
event LoanRequested(uint256 applicationId, address borrower, uint256 amount, uint256 duration)
Event for when a new loan is requested
LoanRequestDenied
event LoanRequestDenied(uint256 applicationId, address borrower)
Event for when a loan request is denied
LoanDrafted
event LoanDrafted(uint256 applicationId, address borrower, uint256 amount)
Event for when a loan offer is made
LoanDraftUpdated
event LoanDraftUpdated(uint256 applicationId, address borrower, uint256 prevAmount, uint256 newAmount)
Event for when a loan offer is updated
LoanDraftLocked
event LoanDraftLocked(uint256 applicationId, address borrower)
Event for when a loan offer draft is locked and is made available for voting
LoanOffered
event LoanOffered(uint256 applicationId, address borrower)
Event for when a loan offer has passed voting and is now available to borrow
LoanOfferAccepted
event LoanOfferAccepted(uint256 applicationId, address borrower, uint256 amount)
Event for when a loan offer is accepted
LoanOfferCancelled
event LoanOfferCancelled(uint256 applicationId, address borrower, uint256 amount)
Event for when a loan offer is cancelled
LoanBorrowed
event LoanBorrowed(uint256 loanId, uint256 applicationId, address borrower, uint256 amount)
Event for when loan offer is accepted and the loan is borrowed
LoanRepaymentInitiated
event LoanRepaymentInitiated(uint256 loanId, address borrower, address payer, uint256 amount, uint256 interestAmount)
Event for when a loan payment is initiated
LoanFullyRepaid
event LoanFullyRepaid(uint256 loanId, address borrower)
Event for when a loan is fully repaid
LoanClosed
event LoanClosed(uint256 loanId, address borrower, uint256 stakerLoss, uint256 lenderLoss)
Event for when a loan is closed
LoanDefaulted
event LoanDefaulted(uint256 loanId, address borrower, uint256 stakerLoss, uint256 lenderLoss)
Event for when a loan is defaulted
MinLoanAmountSet
event MinLoanAmountSet(uint256 prevValue, uint256 newValue)
Setter event
MinLoanDurationSet
event MinLoanDurationSet(uint256 prevValue, uint256 newValue)
Setter event
MaxLoanDurationSet
event MaxLoanDurationSet(uint256 prevValue, uint256 newValue)
Setter event
TemplateLoanGracePeriodSet
event TemplateLoanGracePeriodSet(uint256 prevValue, uint256 newValue)
Setter event
TemplateLoanAPRSet
event TemplateLoanAPRSet(uint256 prevValue, uint256 newValue)
Setter event
lentFunds
function lentFunds() external view returns (uint256)
Accessor
Total funds lent at this time, accounts only for loan principals
weightedAvgAPR
function weightedAvgAPR() external view returns (uint32)
Accessor
Weighted average loan APR on the borrowed funds