Skip to content

LoanBrokerCoverDeposit

[Source]

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 and enable LendingProtocol and SingleAssetVault in the rippled.cfg file.
  2. 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 )

Example LoanBrokerCoverDeposit JSON

{
  "TransactionType": "LoanBrokerCoverDeposit",
  "Account": "rEXAMPLE9AbCdEfGhIjKlMnOpQrStUvWxYz",
  "Fee": "12",
  "Flags": 0,
  "LastLedgerSequence": 7108682,
  "Sequence": 8,
  "LoanBrokerID": "E123F4567890ABCDE123F4567890ABCDEF1234567890ABCDEF1234567890ABCD",
  "Amount": {
    "currency": "USD",
    "issuer": "rIssuer1234567890abcdef1234567890abcdef",
    "value": "1000"
  }
}

LoanBrokerCoverDeposit Fields

In addition to the common fields, LoanBrokerCoverDeposit transactions use the following fields:

Field NameJSON TypeInternal TypeRequired?Description
LoanBrokerIDStringHash256YesThe ID of the LoanBroker ledger entry to deposit the first-loss capital.
AmountObjectAmountYesThe amount of first-loss capital to deposit.

Error Cases

Besides errors that can occur for all transactions, LoanBrokerCoverDeposit transactions can result in the following transaction result codes:

Error CodeDescription
temINVALIDThe LoanBrokerID field is invalid.
temBAD_AMOUNTThe Amount field is less than or equal to zero.
tecNO_ENTRYThe LoanBroker ledger entry doesn't exist.
tecNO_PERMISSIONThe account sending the transaction isn't the owner of the LoanBroker ledger entry.
tecWRONG_ASSETThe asset being deposited doesn't match the asset in the LoanBroker vault.
tecINSUFFICIENT_FUNDSThe 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.