# Position Value

Portfolio margin vault of perp and squart

### Position Value

where $amount_{base}$ is the Base token amount, $amount_{squart}$ is the Squart amount, $amount_{quote}$ is the Quote token amount, and `p`

is the current price of the Base token. If the amount is positive, it is considered an asset, and if negative, it is considered a liability.

### Vault Value

The Vault-Value is defined as follows. *Margin* is the amount of collateral.

### Min. Margin

Min. Margin represents the minimum required Vault-Value. To ensure the position value does not become zero even if the price moves by `r`

, the difference between the minimum value of the position within a price movement of +/- `r`

% and the current value is set as the minMargin. Predy defines Min. Margin at the price `p`

as forrow. In the case of the short Squart position, the $v_p$ is convex downwards, causing the Min. margin to become zero. To create a buffer, add the value obtained by multiplying the short Squart's value by $r_{debt}$ to the Min. margin.

`r`

is risk parameter(e.g. r = 1.02).

$r_{debt}$ is (e.g. $r_{debt}$ = 0.001)

Price $(\frac{amount_{base}}{amount_{squart}})^2$ is the minimum (or maximum) when considering the position value as a polynomial.

### Safe Condition

The condition for a sufficiently safe position can be expressed by the following formula. If this condition is not met, the position will be forcibly liquidated.

Last updated