<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shota Natenadze</title>
    <description>The latest articles on DEV Community by Shota Natenadze (@shotanate).</description>
    <link>https://dev.to/shotanate</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4128139%2Fc20d409e-9fe3-4086-85ae-b5f5d5b9ee9e.png</url>
      <title>DEV Community: Shota Natenadze</title>
      <link>https://dev.to/shotanate</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shotanate"/>
    <language>en</language>
    <item>
      <title>LendingProtocolV1_1: Closed-Ended Vaults and Cash-Basis Accounting</title>
      <dc:creator>Shota Natenadze</dc:creator>
      <pubDate>Wed, 30 Sep 2026 15:39:48 +0000</pubDate>
      <link>https://dev.to/ripplexdev/lendingprotocolv11-closed-ended-vaults-and-cash-basis-accounting-2me8</link>
      <guid>https://dev.to/ripplexdev/lendingprotocolv11-closed-ended-vaults-and-cash-basis-accounting-2me8</guid>
      <description>&lt;p&gt;The Single Asset Vault has two modes: open-ended and closed-ended. Both use the same Vault ledger object and the same transaction types (&lt;code&gt;VaultCreate, VaultDeposit, VaultWithdraw, VaultSet&lt;/code&gt;). The difference is when capital can move in and out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open-ended vaults&lt;/strong&gt; accept deposits and process withdrawals at any time. When a depositor sends assets, they receive shares (&lt;code&gt;MPTs&lt;/code&gt;) at the current price per share (&lt;code&gt;PPS = AssetsTotal / SharesTotal&lt;/code&gt;). When they withdraw, shares are burned and assets returned at whatever PPS is at that moment. Capital flows are continuous. Open-ended vaults are fully usable for non-lending purposes (e.g., pooled custody, shared treasury), but loan brokers cannot be attached to them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Closed-ended vaults&lt;/strong&gt; (up for validator voting under the &lt;a href="https://livenet.xrpl.org/amendment/A360E2BFD775A5B0DCE1C36C16DF31B72735A57584FD163655D2F9564F8E7AC8" rel="noopener noreferrer"&gt;LendingProtocolV1_1&lt;/a&gt; amendment) have a fixed lifecycle with three phases:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Subscription.&lt;/strong&gt; The vault is open for deposits. Shares are minted. The vault owner sets the subscription window via &lt;code&gt;SubscriptionDate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Investment.&lt;/strong&gt; The vault closes to new deposits (the protocol enforces this automatically). The vault owner deploys capital into loans. Interest is returned to the vault via &lt;code&gt;VaultDeposit&lt;/code&gt; with the &lt;code&gt;tfVaultDonation&lt;/code&gt; flag, which increases &lt;code&gt;AssetsTotal&lt;/code&gt; without minting new shares, raising PPS for all existing holders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Redemption.&lt;/strong&gt; After &lt;code&gt;RedemptionDate&lt;/code&gt;, the vault reopens for withdrawals. Depositors redeem shares at the final PPS (principal plus earned yield).&lt;/p&gt;

&lt;p&gt;Closed-ended vaults are created by setting &lt;code&gt;VaultKind = 1&lt;/code&gt; on &lt;code&gt;VaultCreate&lt;/code&gt;along with &lt;code&gt;SubscriptionDate&lt;/code&gt; and &lt;code&gt;RedemptionDate&lt;/code&gt;. This field is immutable after creation.&lt;/p&gt;

&lt;p&gt;Under LendingProtocolV1_1, LoanBrokerSet requires the vault to be closed-ended and returns &lt;code&gt;tecNO_PERMISSION&lt;/code&gt; on an open-ended vault. Nothing else about open-ended vaults changes: they still exist and still accept deposits and withdrawals at any time. The only thing blocked is setting up a loan broker on them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What LendingProtocolV1_1 introduces&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://xrpl.org/resources/known-amendments#lendingprotocolv1_1" rel="noopener noreferrer"&gt;LendingProtocolV1_1 amendment&lt;/a&gt; extends the &lt;code&gt;LendingProtocol&lt;/code&gt; and &lt;code&gt;SingleAssetVault&lt;/code&gt; amendments with two changes:&lt;/p&gt;

&lt;p&gt;First, it introduces the closed-ended vault as a new vault type that users can create. Users can still create both open-ended and closed-ended vaults, but after this amendment is enabled, new loan brokers can only be created against closed-ended vaults. &lt;/p&gt;

&lt;p&gt;Second, it introduces cash-basis accounting. Under the original LendingProtocol amendment, all scheduled interest on a loan was recognized at the time of loan origination: the moment the loan was created, the full expected interest was recorded as income in the vault's accounting. &lt;code&gt;LendingProtocolV1_1&lt;/code&gt; changes this so that interest is only recognized as income when payments are actually made. This is a more conservative and accurate accounting model, and it means the vault's &lt;code&gt;AssetsTotal&lt;/code&gt; only reflects interest that has actually been received, not interest that is expected in the future.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why the Closed and Open-Ended Vaults ship together&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lending is restricted to closed-ended vaults because of how share pricing works. In an open-ended vault, anyone can enter or exit at any time, so a depositor could time their entry and exit around a change in price per share and capture yield they did not earn. Closed-ended vaults avoid this by design: once the subscription window closes, no new shares can be minted, so there is no way to enter mid-term.&lt;/p&gt;

&lt;p&gt;Enabling lending on open-ended vaults would require a mechanism that prevents this kind of timing capture under continuous entry and exit. That is open design work, to be scheduled for an upcoming release.&lt;/p&gt;

&lt;p&gt;The decision was to ship the closed-ended vault first and require it to activate together with the original Lending Protocol and the Single Asset Vault.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this means for the amendment vote&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Three amendments need to activate for lending to go live on mainnet:&lt;br&gt;
&lt;a href="https://livenet.xrpl.org/amendment/A360E2BFD775A5B0DCE1C36C16DF31B72735A57584FD163655D2F9564F8E7AC8" rel="noopener noreferrer"&gt;LendingProtocolV1_1&lt;/a&gt; goes together with the &lt;a href="https://livenet.xrpl.org/amendment/565B90CA1AB2B9D42208ED10884188C64F9E19083DECB9634AAF06EB03299509" rel="noopener noreferrer"&gt;LendingProtocol&lt;/a&gt; and &lt;a href="https://livenet.xrpl.org/amendment/81BD2619B6B3C8625AC5D0BC01DE17F06C3F0AB95C7C87C93715B87A4FD240D8" rel="noopener noreferrer"&gt;SingleAssetVault&lt;/a&gt;. &lt;code&gt;LendingProtocol&lt;/code&gt; is the base lending engine: loan brokers, loan origination, repayment, default handling, and first-loss capital. &lt;code&gt;SingleAssetVault&lt;/code&gt; is the base vault primitive that both open-ended and closed-ended vaults build on. &lt;/p&gt;

</description>
      <category>architecture</category>
      <category>blockchain</category>
      <category>xls66</category>
      <category>xls65</category>
    </item>
  </channel>
</rss>
