Manages the state of a Loan ledger entry, including defaulting, impairing, or unimpairing a loan.
Only the LoanBroker ledger entry owner can initiate this transaction.
Requires the LendingProtocol amendment. Loading...
{
"TransactionType": "LoanManage",
"Account": "rEXAMPLE9AbCdEfGhIjKlMnOpQrStUvWxYz",
"Fee": "12",
"Flags": 65536,
"LastLedgerSequence": 7108682,
"Sequence": 8,
"LoanID": "E123F4567890ABCDE123F4567890ABCDEF1234567890ABCDEF1234567890ABCD"
}In addition to the common fields, LoanManage transactions use the following fields:
| Field Name | JSON Type | Internal Type | Required? | Description |
|---|---|---|---|---|
LoanID | String | Hash256 | Yes | The ID of the Loan ledger entry to manage. |
Transactions of the LoanManage type support additional values in the flags field, as follows:
| Field Name | Hex Value | Decimal Value | Description |
|---|---|---|---|
tfLoanDefault | 0x00010000 | 65536 | Indicates the loan should be defaulted. Doing so moves funds from the broker to the vault regardless of freeze, deep freeze, or MPT lock on the vault's asset. Requires the fixCleanup3_4_0 amendment. Loading... |
tfLoanImpair | 0x00020000 | 131072 | Indicates the the loan should be impaired. |
tfLoanUnimpair | 0x00040000 | 262144 | Indicates the the loan should be unimpaired. |
Besides errors that can occur for all transactions, LoanManage transactions can result in the following transaction result codes:
| Error Code | Description |
|---|---|
temINVALID | the LoanID field is missing or set to zero. |
temINVALID_FLAG | Multiple management flags have been set. Only one can be set at a time. |
tecNO_ENTRY | The loan specified by LoanID doesn't exist. |
tecNO_PERMISSION | - The transaction is attempting to modify a defaulted loan, or a fully paid loan. - The transaction is attempting to change the loan's impairment status to the one it already has. |
tecTOO_SOON | The loan can't be marked as defaulted or impaired before its payment due date and grace period have passed. Requires the fixCleanup3_4_0 amendment. Loading... |
tecLIMIT_EXCEEDED | Marking the loan as impaired creates a loss greater than the vault's oustanding assets, which would put the vault in an invalid state. |