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/.
Deposits first-loss capital into a LoanBroker ledger entry to provide protection for vault depositors.
Only the owner of the associated LoanBroker entry can initiate this transaction.
(Requires the Lending Protocol amendment )
{
"TransactionType": "LoanBrokerCoverDeposit",
"Account": "rEXAMPLE9AbCdEfGhIjKlMnOpQrStUvWxYz",
"Fee": "12",
"Flags": 0,
"LastLedgerSequence": 7108682,
"Sequence": 8,
"LoanBrokerID": "E123F4567890ABCDE123F4567890ABCDEF1234567890ABCDEF1234567890ABCD",
"Amount": {
"currency": "USD",
"issuer": "rIssuer1234567890abcdef1234567890abcdef",
"value": "1000"
}
}In addition to the common fields, LoanBrokerCoverDeposit transactions use the following fields:
| Field Name | JSON Type | Internal Type | Required? | Description |
|---|---|---|---|---|
LoanBrokerID | String | Hash256 | Yes | The ID of the LoanBroker ledger entry to deposit the first-loss capital. |
Amount | Object | Amount | Yes | The amount of first-loss capital to deposit. |
Besides errors that can occur for all transactions, LoanBrokerCoverDeposit transactions can result in the following transaction result codes:
| Error Code | Description |
|---|---|
temINVALID | The LoanBrokerID field is invalid. |
temBAD_AMOUNT | The Amount field is less than or equal to zero. |
tecNO_ENTRY | The LoanBroker ledger entry doesn't exist. |
tecNO_PERMISSION | The account sending the transaction isn't the owner of the LoanBroker ledger entry. |
tecWRONG_ASSET | The asset being deposited doesn't match the asset in the LoanBroker vault. |
tecINSUFFICIENT_FUNDS | The account depositing first-loss capital doesn't hold enough of the asset. You can also receive this error if the issuer of the asset has frozen the account or placed a global freeze. |