OpenTermLoan
Functions
HUNDRED_PERCENT
HUNDRED_PERCENT
The value that represents 100%, to be easily comparable with the loan rates.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
acceptBorrower
acceptBorrower
Accept the borrower role, must be called by pendingBorrower.
acceptLender
acceptLender
Accept the lender role, must be called by pendingLender.
acceptNewTerms
acceptNewTerms
Accept the proposed terms and trigger refinance execution.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the refinancer contract. |
1 |
|
|
| The deadline for accepting the new terms. |
2 |
|
|
| The encoded arguments to be passed to refinancer. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The hash of the accepted refinance agreement. |
borrower
borrower
The borrower of the loan, responsible for repayments.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
calledPrincipal
calledPrincipal
The amount of principal yet to be returned to satisfy the loan call.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
callPrincipal
callPrincipal
The lender called the loan, giving the borrower a notice period within which to return principal and pro-rata interest.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The minimum amount of principal the borrower must return. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The new payment due date for returning the principal and pro-rate interest to the lender. |
1 |
|
|
| The date the loan will be in default. |
dateCalled
dateCalled
The timestamp of the date the loan was called.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
dateFunded
dateFunded
The timestamp of the date the loan was funded.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
dateImpaired
dateImpaired
The timestamp of the date the loan was impaired.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
datePaid
datePaid
The timestamp of the date the loan was last paid.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
defaultDate
defaultDate
The timestamp of the date the loan will be in default.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
delegateServiceFeeRate
delegateServiceFeeRate
The annualized delegate service fee rate.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
factory
factory
The address of the proxy factory.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
fund
fund
Lend funds to the loan/borrower.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount funded. |
1 |
|
|
| The due date of the first payment. |
2 |
|
|
| The timestamp of the date the loan will be in default. |
fundsAsset
fundsAsset
The address of the fundsAsset funding the loan.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
getPaymentBreakdown
getPaymentBreakdown
Get the breakdown of the total payment needed to satisfy the next payment installment.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The timestamp that corresponds to when the payment is to be made. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The portion of the total amount that will go towards principal. |
1 |
|
|
| The portion of the total amount that will go towards interest fees. |
2 |
|
|
| The portion of the total amount that will go towards late interest fees. |
3 |
|
|
| The portion of the total amount that will go towards delegate service fees. |
4 |
|
|
| The portion of the total amount that will go towards platform service fees. |
globals
globals
The Maple globals address
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
gracePeriod
gracePeriod
The amount of time the borrower has, after a payment is due, to make a payment before being in default.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
impair
impair
Fast forward the payment due date to the current time. This enables the pool delegate to force a payment (or default).
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The new payment due date to result in the removal of the loan's impairment status. |
1 |
|
|
| The timestamp of the date the loan will be in default. |
implementation
implementation
The address of the implementation contract being proxied.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
interestRate
interestRate
The annualized interest rate (APR), in units of 1e18, (i.e. 1% is 0.01e18).
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
isCalled
isCalled
Whether the loan is called.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
isImpaired
isImpaired
Whether the loan is impaired.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
isInDefault
isInDefault
Whether the loan is in default.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
lateFeeRate
lateFeeRate
The rate charged at late payments.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
lateInterestPremiumRate
lateInterestPremiumRate
The premium over the regular interest rate applied when paying late.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
lender
lender
The lender of the Loan.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
makePayment
makePayment
Make a payment to the loan.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of principal to return, to the lender to reduce future interest payments. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The portion of the amount paying interest. |
1 |
|
|
| The portion of the amount paying late interest. |
2 |
|
|
| The portion of the amount paying delegate service fees. |
3 |
|
|
| The portion of the amount paying platform service fees. |
migrate
migrate
Modifies the proxy's storage by delegate-calling a migrator contract with some arguments. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of a migrator contract. |
1 |
|
|
| Some encoded arguments to use for the migration. |
noticePeriod
noticePeriod
The amount of time the borrower has, after the loan is called, to make a payment, paying back the called principal.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
paymentDueDate
paymentDueDate
The timestamp of the due date of the next payment.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
paymentInterval
paymentInterval
The specified time between loan payments.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
pendingBorrower
pendingBorrower
The address of the pending borrower.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
pendingLender
pendingLender
The address of the pending lender.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
platformServiceFeeRate
platformServiceFeeRate
The annualized platform service fee rate.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
principal
principal
The amount of principal owed (initially, the requested amount), which needs to be paid back.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
proposeNewTerms
proposeNewTerms
Propose new terms for refinance.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the refinancer contract. |
1 |
|
|
| The deadline for accepting the new terms. |
2 |
|
|
| The encoded arguments to be passed to refinancer. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The hash of the proposed refinance agreement. |
refinanceCommitment
refinanceCommitment
The hash of the proposed refinance agreement.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
rejectNewTerms
rejectNewTerms
Nullify the current proposed terms.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the refinancer contract. |
1 |
|
|
| The deadline for accepting the new terms. |
2 |
|
|
| The encoded arguments to be passed to refinancer. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The hash of the rejected refinance agreement. |
removeCall
removeCall
Remove the loan's called status.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The restored payment due date. |
1 |
|
|
| The date the loan will be in default. |
removeImpairment
removeImpairment
Remove the loan impairment by restoring the original payment due date.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The restored payment due date. |
1 |
|
|
| The timestamp of the date the loan will be in default. |
repossess
repossess
Repossess collateral, and any funds, for a loan in default.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address where the collateral and funds asset is to be sent, if any. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of funds asset repossessed. |
setImplementation
setImplementation
Modifies the proxy's implementation address.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of an implementation contract. |
setPendingBorrower
setPendingBorrower
Set the `pendingBorrower` to a new account.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the new pendingBorrower. |
setPendingLender
setPendingLender
Set the `pendingLender` to a new account.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the new pendingLender. |
skim
skim
Remove all available balance of a specified token. NOTE: Open Term Loans are not designed to hold custody of tokens, so this is designed as a safety feature.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the token contract. |
1 |
|
|
| The recipient of the token. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of token removed from the loan. |
upgrade
upgrade
Upgrades a contract implementation to a specific version. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The version to upgrade to. |
1 |
|
|
| Some encoded arguments to use for the upgrade. |
Events
BorrowerAccepted
BorrowerAccepted
Borrower was accepted, and set to a new account.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the new borrower. |
CallRemoved
CallRemoved
The lender reverted the action of the loan being called and the payment due date was restored to it's original value.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The restored payment due date. |
1 |
|
|
| The date the loan will be in default. |
Funded
Funded
The loan was funded.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount funded. |
1 |
|
|
| The due date of the first payment. |
2 |
|
|
| The date the loan will be in default. |
Impaired
Impaired
The payment due date was fast forwarded to the current time, activating the grace period. This is emitted when the pool delegate wants to force a payment (or default).
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The new payment due date. |
1 |
|
|
| The date the loan will be in default. |
ImpairmentRemoved
ImpairmentRemoved
The payment due date was restored to it's original value, reverting the action of loan impairment.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The restored payment due date. |
1 |
|
|
| The date the loan will be in default. |
Initialized
Initialized
Loan was initialized.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the borrower. |
1 |
|
|
| The address of the lender. |
2 |
|
|
| The address of the lent asset. |
3 |
|
|
| The amount of principal requested. |
4 |
|
|
| Array of loan parameters: [0]: gracePeriod, [1]: noticePeriod, [2]: paymentInterval |
5 |
|
|
| Array of rate parameters: [0]: delegateServiceFeeRate, [1]: interestRate, [2]: lateFeeRate, [3]: lateInterestPremiumRate |
LenderAccepted
LenderAccepted
Lender was accepted, and set to a new account.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the new lender. |
NewTermsAccepted
NewTermsAccepted
The terms of the refinance proposal were accepted.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The hash of the refinancer, deadline, and calls proposed. |
1 |
|
|
| The address that will execute the refinance. |
2 |
|
|
| The deadline for accepting the new terms. |
3 |
|
|
| The individual calls for the refinancer contract. |
NewTermsProposed
NewTermsProposed
A refinance was proposed.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The hash of the refinancer, deadline, and calls proposed. |
1 |
|
|
| The address that will execute the refinance. |
2 |
|
|
| The deadline for accepting the new terms. |
3 |
|
|
| The individual calls for the refinancer contract. |
NewTermsRejected
NewTermsRejected
The terms of the refinance proposal were rejected.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The hash of the refinancer, deadline, and calls proposed. |
1 |
|
|
| The address that will execute the refinance. |
2 |
|
|
| The deadline for accepting the new terms. |
3 |
|
|
| The individual calls for the refinancer contract. |
PaymentMade
PaymentMade
Payments were made.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the lender the payment was made to. |
1 |
|
|
| The portion of the total amount that went towards paying down principal. |
2 |
|
|
| The portion of the total amount that went towards interest. |
3 |
|
|
| The portion of the total amount that went towards late interest. |
4 |
|
|
| The portion of the total amount that went towards delegate service fees. |
5 |
|
|
| The portion of the total amount that went towards platform service fee. |
6 |
|
|
| The new payment due date. |
7 |
|
|
| The date the loan will be in default. |
PendingBorrowerSet
PendingBorrowerSet
Pending borrower was set.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Address that can accept the borrower role. |
PendingLenderSet
PendingLenderSet
Pending lender was set.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address that can accept the lender role. |
PrincipalCalled
PrincipalCalled
The lender called the loan, giving the borrower a notice period within which to return principal and pro-rata interest.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The minimum amount of principal the borrower must return. |
1 |
|
|
| The new payment due date. |
2 |
|
|
| The date the loan will be in default. |
PrincipalReturned
PrincipalReturned
Principal was returned to lender, to close the loan or return future interest payments.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of principal returned. |
1 |
|
|
| The amount of principal remaining on the loan. |
Repossessed
Repossessed
The loan was in default and funds and collateral was repossessed by the lender.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of funds asset repossessed. |
1 |
|
|
| The address of the recipient of the funds, if any. |
Skimmed
Skimmed
Some token was removed from the loan.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The address of the token contract. |
1 |
|
|
| The amount of token remove from the loan. |
2 |
|
|
| The recipient of the token. |
Upgraded
Upgraded
The instance was upgraded.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The new version of the loan. |
1 |
|
|
| The upgrade arguments, if any. |
Last updated