Attention
Lending Protocol and Single Asset Vaults are disabled on Devnet. You have two options for testing these features:
- Run
rippledin stand-alone mode and enableLendingProtocolandSingleAssetVaultin the rippled.cfg file. - Connect to the Lending Protocol-specific Devnet at
https://lend.devnet.rippletest.net:51234/.
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 Lending Protocol amendment )
{
"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. |
Flags | String | UInt32 | No | The flag to modify the loan. |
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. |
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 before its payment due date and grace period have passed. |
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. |