# LoanBroker [[Source]](https://github.com/XRPLF/rippled/blob/develop/include/xrpl/protocol/detail/ledger_entries.macro#L500-L518) Attention Lending Protocol and Single Asset Vaults are disabled on Devnet. You have two options for testing these features: 1. Run `rippled` in [stand-alone mode](https://xrpl.org/docs/concepts/networks-and-servers/rippled-server-modes#stand-alone-mode) and enable `LendingProtocol` and `SingleAssetVault` in the [rippled.cfg file](https://xrpl.org/docs/infrastructure/testing-and-auditing/test-amendments). 2. 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`](/docs/xls-66d-lending-protocol/reference/transactions/loanbrokerset) transaction. The `LoanBroker` entry is tracked in an [Owner Directory](https://xrpl.org/directorynode.html) 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*. Note The lending protocol uses the pseudo-account of the associated `Vault` entry to hold the first-loss capital. *(Requires the [Lending Protocol amendment](https://github.com/Tapanito/XRPL-Standards/tree/xls-66-lending-protocol/XLS-0066d-lending-protocol) )* ## Example JSON ```json { "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 } ``` ## Fields In addition to the [common ledger entry fields](https://xrpl.org/docs/references/protocol/ledger-data/common-fields/), 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%. | ## Flags There are no flags defined for ledger entries. ## Reserve `Loan` entries incur one owner reserve from the account that creates it. ## ID Format The ID of a `LoanBroker` entry is the [SHA512-Half][] of the following values, concatenated in order: - The `LoanBroker` space key `0x006C`. - The [AccountID](https://xrpl.org/docs/references/protocol/binary-format/#accountid-fields) of the account submitting the `LoanBrokerSet` transaction. - The transaction `Sequence` number. If the transaction used a [Ticket][], the `TicketSequence` value is used instead.