Vault Accounting Mechanics

Upshift vaults employ a "share-based" accounting model. The value of these shares is determined by the vault's asset-to-share ratio, also known as the "price per share" or "exchange rate".

The asset-to-share ratio (Vp) is defined as:

Vp=TotalUnderlyingAssets/TotalVaultSharesInCirculationV_p = TotalUnderlyingAssets/TotalVaultSharesInCirculation
  1. Initial State: When a vault is initialized, the first deposit typically sets the initial asset-to-share ratio to a simple value, often 1:1 (e.g., 1 ETH deposited receives 1 vault share).

  2. Deposit Mechanism: When a user deposits assets:

    1. The vault calculates the equivalent amount of vault shares to mint based on the current asset-to-share ratio.

    2. The deposited assets are added to the vault's total underlying assets.

    3. The corresponding shares are minted and transferred to the depositor. Crucially, deposits themselves do not change the asset-to-share ratio. They simply increase both the numerator (Total Underlying Assets) and the denominator (Total Vault Shares) proportionally.

  3. Withdrawal Mechanism: When a user withdraws assets:

    1. The vault calculates the amount of underlying assets to return based on the current asset-to-share ratio and the number of shares the user wishes to burn.

    2. The shares are burned from the user's balance.

    3. The underlying assets are transferred from the vault to the user. Similar to deposits, withdrawals do not change the asset-to-share ratio.

Asset-to-Share Ratio Calculation

The exchange rate determines the price of shares:

  • When yield accrues, Total Assets increases.

  • New deposits and withdrawals update Total Shares.

  • High Watermark logic prevents performance fees on previous gains.

The critical effect of yield compounding is the increase in the Total Underlying Assets in Vault while the Total Vault Shares in Circulation remains constant (excluding new deposits or withdrawals).

  • Before Yield Compounding: Total Assets = X, Total Shares = Y, Ratio = X/Y.

  • After Yield Compounding: Yield Earned = Z. Total Assets becomes X+Z. Total Shares remain Y.

  • New Ratio: (X+Z)/Y > X/Y.

This increasing asset-to-share ratio means that each vault share held by a user accrues more underlying assets over time. When a user redeems their shares, they receive a larger quantity of the underlying asset than they initially deposited, reflecting the accumulated yield.

Example of user flow:

  • A user deposits 1,000 USDC into a USDC-denominated vault.

  • Initial state: Vault has 100,000 USDC, 100,000 shares. Ratio = 1 USDC/share.

  • User receives 1,000 vault shares. Total vault: 101,000 USDC, 101,000 shares. Ratio remains 1 USDC/share.

  • Over a week, the vault's strategies generate 500 USDC in yield.

  • This 500 USDC is compounded back into the vault.

  • New state: Vault has 101,500 USDC, 101,000 shares. New Ratio ≈ 1.00495 USDC/share.

  • If the user withdraws their 1000 shares, they now receive 1000×1.00495=1004.95 USDC, demonstrating the yield earned.

Last updated