# Updated Transactions The [LendingProtocolV1_1 amendment](https://xrpl.org/resources/known-amendments#lendingprotocolv1_1) updates the following transactions to support [closed-ended vaults](/docs/lending-protocol-v1-1/closed-ended-vaults). ## VaultCreate ### New Fields | Field Name | JSON Type | [Internal Type](https://xrpl.org/docs/references/protocol/binary-format/) | Required? | Description | | --- | --- | --- | --- | --- | | `VaultKind` | Number | UInt8 | No | The kind of vault to create. If omitted, defaults to `0` and creates an open-ended vault; `1` creates a closed-ended vault. Immutable after the vault is created. | | `SubscriptionDate` | Number | UInt32 | No | *(Closed-ended vaults only)* The time, in [seconds since the Ripple Epoch](https://xrpl.org/docs/references/protocol/data-types/basic-data-types#specifying-time), when the vault's subscription window closes and its investment period begins. Required when `VaultKind` is `1` and immutable after the vault is created. | | `RedemptionDate` | Number | UInt32 | No | *(Closed-ended vaults only)* The time, in [seconds since the Ripple Epoch](https://xrpl.org/docs/references/protocol/data-types/basic-data-types#specifying-time), when the vault's investment period ends and depositors can redeem their shares. Required when `VaultKind` is `1` and immutable after the vault is created. | Note - `RedemptionDate` - `SubscriptionDate` must be at least `180` seconds and less than `946708560` seconds (30 years). - Both dates must be in the future relative to the parent ledger's close time. ### New Error Cases | Error Code | Description | | --- | --- | | `temMALFORMED` | `VaultKind` is present with a value other than `0` or `1`.`VaultKind` is `0`, but `SubscriptionDate` or `RedemptionDate` is present.`VaultKind` is `1`, but is missing `SubscriptionDate` and `RedemptionDate`.`RedemptionDate` - `SubscriptionDate` is less than `180` seconds or is greater than or equal to `946708560` seconds. | | `tecEXPIRED` | `SubscriptionDate` or `RedemptionDate` isn't ahead of the parent ledger's close time. | | `temDISABLED` | `VaultKind`, `SubscriptionDate`, or `RedemptionDate` is present and the [LendingProtocolV1_1 amendment](https://xrpl.org/resources/known-amendments#lendingprotocolv1_1) isn't enabled. | ## VaultDelete ### New Fields | Field Name | JSON Type | [Internal Type](https://xrpl.org/docs/references/protocol/binary-format/) | Required? | Description | | --- | --- | --- | --- | --- | | `MemoData` | String | Blob | No | A data field to record why the vault was deleted, as hexadecimal. Limited to 256 bytes. | ### New Error Cases | Error Code | Description | | --- | --- | | `temMALFORMED` | `MemoData` is present but empty.`MemoData` is larger than `256` bytes. | | `temDISABLED` | `MemoData` is present and the [LendingProtocolV1_1 amendment](https://xrpl.org/resources/known-amendments#lendingprotocolv1_1) isn't enabled. | ## VaultDeposit ### New Error Cases | Error Code | Description | | --- | --- | | `tecEXPIRED` | The vault is closed-ended and in its *Investment* or *Redemption* phase. | ## VaultWithdraw ### New Error Cases | Error Code | Description | | --- | --- | | `tecTOO_SOON` | The vault is closed-ended and in its *Investment* phase. | ## LoanSet A loan can only be originated against a closed-ended vault during its *Investment* phase, and only if the loan's final scheduled payment is at least 60 seconds before the vault enters its *Redemption* phase. This means the maximum term of new loans shrinks as the vault approaches its `RedemptionDate`. ### New Error Cases | Error Code | Description | | --- | --- | | `tecTOO_SOON` | The vault is closed-ended and still in its *Subscription* phase. | | `tecEXPIRED` | The vault is closed-ended and has entered its *Redemption* phase. | | `tecNO_PERMISSION` | The vault is closed-ended and the loan's final scheduled payment is less than 60 seconds before the vault's `RedemptionDate`. | ## LoanBrokerSet Note A loan broker can only be attached to a *closed-ended* vault. This restriction only applies to loan brokers created after `LendingProtocolV1_1` is enabled. If a loan broker was created before the amendment, it can still originate loans from *open-ended* vaults. ### New Error Cases | Error Code | Description | | --- | --- | | `tecNO_PERMISSION` | The target vault isn't closed-ended. |