Smoothy

Search…

Virtual Price

Definition

Virtual price is defined as

where totalAssetBalance is the summation of all balances of underlying assets and totalLpSupply is the total supply of LP tokens.

Virtual Price as Exchange Rate

For any pool operations that converts LP token from/to underlying asset (e.g., mint syUSD with USDT or redeem syUSD for USDC), virtual price is essential the **exchange rate** between the LP token and underlying asset **if no penalty (e.g., slippage cost) happens**.

One common mistake in calculating virtual price is to use the exchange rate of a transaction as virtual price, which is incorrect if such a transaction incurs a penalty.

Virtual Price Property

One key property of virtual price is that the value should **be non-decreasing** to reflect the accumulated interest + swap fee + penalty fee, i.e., the value of per LP token is self-value-accrued over time by earning interest + swap fee + penalty fee automatically.

Last modified 9mo ago

Copy link