function init()
: tests that any collateral facility is set up as expected, pointing to the correct address for the Line of Credit. If so, status changes to 'active'.
function addCredit()
: a Lender deposits for the first time to an active Line of Credit
function borrow(
): a Borrower draws down from an available credit position
function accrueInterest()
: updates the amount of Interest Accrued that the Borrower owes
function counts(
): returns the number of active credit positions within a Line of Credit and the number of credit positions irrespective of status
function healthcheck()
: returns the status of the Line of Credit
function increaseCredit()
: an existing Lender deposits additional capital
function setRates()
: updates the Drawn Rate and the Facility Rate for a credit position
function updateOutstandingDebt()
: returns total Borrower debt across all Lenders
function withdraw()
: a Lender withdraws principal and accrued interest
function depositAndRepay():
anyone can deposit funds to repay a Lender
function declareInsolvent()
: Arbiter signifies that a Borrower is incapable of repaying debt permanently (used for secured lending)
function depositAndClose()
: Borrower deposits enough Credit Tokens to repay and close a credit position
function close()
: deletes a credit position that has already been fully repaid