LendingProtocolV1_1: 폐쇄형 금고 및 현금 기반 회계

작성자

카테고리:

← 피드로
DEV Community · Shota Natenadze · 2026-10-01 개발(SW)

The Single Asset Vault has two modes: open-ended and closed-ended. Both use the same Vault ledger object and the same transaction types (VaultCreate, VaultDeposit, VaultWithdraw, VaultSet). The difference is when capital can move in and out.

Open-ended vaults accept deposits and process withdrawals at any time. When a depositor sends assets, they receive shares (MPTs) at the current price per share (PPS = AssetsTotal / SharesTotal). 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.

Closed-ended vaults (up for validator voting under the LendingProtocolV1_1 amendment) have a fixed lifecycle with three phases:

1. Subscription. The vault is open for deposits. Shares are minted. The vault owner sets the subscription window via SubscriptionDate.

2. Investment. 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 VaultDeposit with the tfVaultDonation flag, which increases AssetsTotal without minting new shares, raising PPS for all existing holders.

3. Redemption. After RedemptionDate, the vault reopens for withdrawals. Depositors redeem shares at the final PPS (principal plus earned yield).

Closed-ended vaults are created by setting VaultKind = 1 on VaultCreatealong with SubscriptionDate and RedemptionDate. This field is immutable after creation.

Under LendingProtocolV1_1, LoanBrokerSet requires the vault to be closed-ended and returns tecNO_PERMISSION 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.

What LendingProtocolV1_1 introduces

The LendingProtocolV1_1 amendment extends the LendingProtocol and SingleAssetVault amendments with two changes:

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.

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. LendingProtocolV1_1 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 AssetsTotal only reflects interest that has actually been received, not interest that is expected in the future.

*Why the Closed and Open-Ended Vaults ship together *

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.

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.

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.

What this means for the amendment vote

Three amendments need to activate for lending to go live on mainnet:
LendingProtocolV1_1 goes together with the LendingProtocol and SingleAssetVault. LendingProtocol is the base lending engine: loan brokers, loan origination, repayment, default handling, and first-loss capital. SingleAssetVault is the base vault primitive that both open-ended and closed-ended vaults build on.

원문에서 계속 ↗