Skip to content

Vault Accounting

When calculating how many GenericUnit tokens to mint or burn during deposits and redemptions, the Controller uses a contextual-pricing mechanism that considers both the share token accounting price and the underlying asset (collateral) accounting price.

Accounting Price Definitions

Share Accounting Price

The share accounting price is the value assigned to each GenericUnit share token when converting between shares and assets during deposits and redemptions. This price determines how many shares are minted or burned for a given amount of collateral.

  • During deposits: Always valued at $1.00\$1.00
  • During redemptions: Valued at min($1.00,Total Collateral ValueTotal Units Supply)min(\$1.00, \frac{\text{Total Collateral Value}}{\text{Total Units Supply}})

The redemption formula ensures that if the protocol's collateral value has decreased below its backing requirement, shares are redeemed at their true backing value rather than at peg.

Asset (Collateral) Accounting Price

The asset accounting price is the value assigned to the underlying collateral (e.g., USDC, USDT) when converting between assets and shares during deposits and redemptions. This price is derived from oracle feeds and determines how much value the collateral contributes to the calculation.

  • During deposits: Valued at min($1.00,oracle price)min(\$1.00, \text{oracle price})
  • During redemptions: Valued at max($1.00,oracle price)max(\$1.00, \text{oracle price})

Secondary Action Fee

The secondary action fee is an additional adjustment applied to the accounting price used by the second action in a transaction when that second action is of a different type than the first.

  • Mixed-action transaction: If a transaction performs a deposit and then a redemption, or a redemption and then a deposit, the second action's accounting price includes an additional fee.
  • Same-action transaction: Two deposits or two redemptions in the same transaction do not incur this fee.

For the second action in a mixed-action transaction, the adjusted accounting price is:

  • During deposits: accounting price(1fee)\text{accounting price} * (1 - \text{fee})
  • During redemptions: accounting price1fee\frac{\text{accounting price}}{1 - \text{fee}}

This mechanism makes a same-transaction deposit-then-redeem or redeem-then-deposit path more expensive, reducing opportunities to exploit short-lived pricing differences within a single transaction.

Conversion Formulas

The conversion between assets and shares uses the accounting prices defined above, which vary based on the operation context (deposit or redemption). If the action is the second leg of a mixed deposit and redemption sequence in the same transaction, the relevant accounting price also includes the secondary action fee.

Asset to Share Conversion

When converting assets (collateral) into shares, the formula is:

Shares=Asset Amount × Asset Accounting PriceShare Accounting PriceShares = \frac{\text{Asset Amount } \times \text{ Asset Accounting Price}}{\text{Share Accounting Price}}

This formula answers: "Given X amount of assets, how many shares should be minted?"

The following table shows how many shares are minted when depositing 1000 units of an asset at different price scenarios:

Share \ Asset Price$0.995$1.000$1.005
$1.000995.001,000.001,000.00

Share to Asset Conversion

When converting shares into assets (collateral), the formula is:

Assets=Share Amount × Share Accounting PriceAsset Accounting PriceAssets = \frac{\text{Share Amount } \times \text{ Share Accounting Price}}{\text{Asset Accounting Price}}

This formula answers: "Given X amount of shares, how many assets should be returned?"

The following table shows how many asset units are returned when redeeming 1000 GenericUnit tokens at different price scenarios:

Share \ Asset Price$0.995$1.000$1.005
$1.0001,000.001,000.00995.02
$0.995995.00995.00990.05

Price Asymmetry Rationale

The protocol operates under the assumption that any deviation from peg of its collateral assets is temporary, and prices will eventually return to $1.00.

This conservative pricing approach protects the protocol from adverse selection during volatility. If the protocol accepted off-peg assets at market value in the opposite direction (above peg on deposits, below peg on redemptions), it would be vulnerable to exploitation and suffer permanent losses.