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/.
A LoanBroker ledger entry defines the configuration and state of a lending protocol instance. It tracks details such as fees and first-loss capital cover. You can create a LoanBroker object with the LoanBrokerSet transaction.
The LoanBroker entry is tracked in an Owner Directory owned by the account that submitted the LoanBrokerSet transaction. To facilitate lookup, it is also tracked in the OwnerDirectory of the associated vault's pseudo-account.
The lending protocol uses the pseudo-account of the associated Vault entry to hold the first-loss capital.
(Requires the Lending Protocol amendment )
{
"LedgerEntryType": "LoanBroker",
"LedgerIndex": "E123F4567890ABCDE123F4567890ABCDEF1234567890ABCDEF1234567890ABCD",
"Flags": "0",
"PreviousTxnID": "9A8765B4321CDE987654321CDE987654321CDE987654321CDE987654321CDE98",
"PreviousTxnLgrSeq": 12345678,
"Sequence": 1,
"LoanSequence": 2,
"OwnerNode": 2,
"VaultNode": 1,
"VaultID": "ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890",
"Account": "rBROKER9AbCdEfGhIjKlMnOpQrStUvWxYz",
"Owner": "rEXAMPLE9AbCdEfGhIjKlMnOpQrStUvWxYz",
"Data": "5468697320697320617262697472617279206D657461646174612061626F757420746865206C6F616E62726F6B65722E",
"ManagementFeeRate": 100,
"OwnerCount": 3,
"DebtTotal": 50000,
"DebtMaximum": 100000,
"CoverAvailable": 10000,
"CoverRateMinimum": 1000,
"CoverRateLiquidation": 500
}In addition to the common ledger entry fields, LoanBroker entries have the following fields:
| Name | JSON Type | Internal Type | Required? | Description |
|---|---|---|---|---|
PreviousTxnID | String | Hash256 | Yes | Identifies the transaction ID that most recently modified this object. |
PreviousTxnLgrSeq | Number | UInt32 | Yes | The sequence of the ledger that contains the transaction that most recently modified this object. |
Sequence | Number | UInt32 | Yes | The transaction sequence number that created the LoanBroker. |
LoanSequence | Number | UInt32 | Yes | A sequential identifier for Loan ledger entires, incremented each time a new loan is created by this LoanBroker. |
OwnerNode | Number | UInt64 | Yes | Identifies the page where this item is referenced in the owner's directory. |
VaultNode | Number | UInt64 | Yes | Identifies the page where this item is referenced in the Vault pseudo-account owner's directory. |
VaultID | String | Hash256 | Yes | The ID of the vault that provides the loaned assets. |
Account | String | AccountID | Yes | The address of the LoanBroker pseudo-account. |
Owner | String | AccountID | Yes | The account address of the vault owner. |
Data | String | Blob | No | Arbitrary metadata about the vault. Limited to 256 bytes. |
ManagementFeeRate | Number | UInt16 | No | The fee charged by the lending protocol, in units of 1/10th basis points. Valid values are 0 to 100000 (inclusive), representing 0% to 100%. |
OwnerCount | Number | UInt32 | Yes | The number of active loans issued by the LoanBroker. |
DebtTotal | Number | Number | Yes | The total asset amount the protocol owes the vault, including interest. |
DebtMaximum | Number | Number | Yes | The maximum amount the protocol can owe the vault. The default value of 0 means there is no limit to the debt. |
CoverAvailable | Number | Number | Yes | The total amount of first-loss capital deposited into the lending protocol. |
CoverRateMinimum | Number | UInt32 | Yes | The 1/10th basis point of the DebtTotal that the first-loss capital must cover. Valid values are 0 to 100000 (inclusive), representing 0% to 100%. |
CoverRateLiquidation | Number | UInt12 | Yes | The 1/10th basis point of minimum required first-loss capital that is moved to an asset vault to cover a loan default. Valid values are 0 to 100000 (inclusive), representing 0% to 100%. |
There are no flags defined for LoanBroker ledger entries.
Loan entries incur one owner reserve from the account that creates it.
The ID of a LoanBroker entry is the [SHA512-Half][] of the following values, concatenated in order:
- The
LoanBrokerspace key0x006C. - The AccountID of the account submitting the
LoanBrokerSettransaction. - The transaction
Sequencenumber. If the transaction used a [Ticket][], theTicketSequencevalue is used instead.