# AlgoEURS Options AlgoEURS protocol users use PUT options for isuring collateral against liquidation. This document describes how these options work. ## Overview An AlgoEURS PUT option has the following paraters: 1. Base asset $A$ 2. Strike price $S$ 3. Expiration time $T$ At the time moment $T$, an AlgoEURS PUT option automatically converts into certain amount of AlgoEURS tokens (AEUR). The amount of AEUR is calcualted by the following formula: $$ \max \left( 0, S - P_A (T) \right) $$ Here $P_A (T)$ is the price of the asset $A$ at the time moment $T$ demoninated in euro fiat currency. In other words, in case the base asset price at the expiration time is greater than or equal to the strike price, the option converts to nothing. In case the base asset price at the expiration time is less than the strike price, the option is converted to the amount of AEUR calculated as the strike price minus the asset price. ## Issuance For a particular combination of option parameters $(A, S, T)$, the amount of options with these parameters held by the $i\text{-th}$ user is denoted as: $V_i (A,S,T)$. This amount could be negative. For any combination of option parameters, the total supply of such options, i.e. the sum of the amounts held by all the users, is always zero: $$ \forall A, S, T: \sum_i V_i (A, S, T) = 0 $$ Options with the same parameter values are fungible and freely transferrable. New options are effectively created when a user sends more options than he currently has. In such case, the amount of options held the by the user becomes negative, and the newly created options are transferred to the recipient. Options are destructed when a user with negative amount options receives some options with the same parameter values. ## Collateralization In order to be able to hold a negative amount of options, a user has to have enough collateral deposited into the AlgoEURS protocol. In the worst case scenatio, an option with parameters $(A, S, T)$ may convert into $S$ AEUR. Thus, a negative amount $x < 0$ of such options may convert into debt of $-x \cdot S$ AEUR, so the $i\text{-th}$ user whose $V_i (A, S, T) < 0$ has to have collateral enough to cover debt of $-V_i (A, S, T) \cdot S$ AEUR. Note, that the collateral may include AEUR among other assets. When a collateral value is being estimated, assets other than AEUR are evaluated with a discount to the current market prices of the assets, while AEUR collateral is estimated at the notional value. ## Expiration When expiration time $T$ arrives, all the option holdings, either positions or negative, with such expiration time are automatically converted to AERS holdings, so positive option holdings are converted to AEUR deposits, while negative option holdings are converted to AEUR debt. This conversion happens inside the protocol and doesn't require any assets to be transferred. ## Liquidation In case the collateral of a user becomes not enough to cover user's oblidations with a marging, the collateral could be forcefully liquidated, i.e. sold for AEUR. The AEUR earned during liquidation are first used to relay user's debt enominated in AUER, and the remaining is used as a collateral for negative option amounts held be the user. Let's consider an example: The $i\text{-th}$ user balances before liquidation: Asset | Quantity | Price | Margin | Collateral ----------------------------|---------:|--------:|:------:|---------------------: AEUR | $-1000$ | n/a | n/a | $-1000$ Opt $(\text{ETH}, 3000, T)$ | $-1$ | n/a | n/a | $-3000$ ETH | $1$ | $€4200$ | $10\%$ | $4200 - 10\% = 3780$ The free collateral value is $-220$, i.e. the user is in margin call, and his collateral could be liquidated. Let assume that $1$ ETH held by the user is sold for $4100$ AEUR during liquidation. Now we have: Asset | Quantity | Price | Margin | Collateral ----------------------------|-----------------------:|--------:|:------:|---------------: AEUR | $-1000 + 4100 = 3100$ | n/a | n/a | $3100$ Opt $(\text{ETH}, 3000, T)$ | $-1$ | n/a | n/a | $-3000$ ETH | $1 - 1 = 0$ | $€4200$ | $10\%$ | $0 - 10\% = 0$ Now the free collateral value is $100$, so the user is not in margin call anymore. ## Using as Collateral The main reason why users supposed to buy AlgoEURS options is to user these options as a collateral in AlgoEURS protocol. The protocol estimates the current price of an option with parametes $(A, S, T)$ as $\max \left( 0, S - P_A (t) \right)$, $P_A(t)$ is the price of the asset $A$ at the current time $t$. The initial $i\text{-th}$ user balace: Asset | Quantity | Price | Margin | Collateral ----------------------------|---------:|---------------------------:|:------:|---------------------: AEUR | $-2720$ | n/a | n/a | $-2727$ Opt $(\text{ETH}, 3000, T)$ | $1$ | $\max(0, 3000 - 4200) = 0$ | n/a | $0$ ETH | $1$ | $€4200$ | $10\%$ | $4200 - 10\% = 3780$ So the free collateral is 1053, i.e. the user is not in margin call. Now ETH price drops sharply to $€2500$: Asset | Quantity | Price | Margin | Collateral ----------------------------|---------:|-----------------------------:|:------:|---------------------: AEUR | $-2720$ | n/a | n/a | $-2727$ Opt $(\text{ETH}, 3000, T)$ | $1$ | $\max(0, 3000 - 2500) = 500$ | n/a | $500$ ETH | $1$ | $€2500$ | $10\%$ | $2500 - 10\% = 2250$ The free collateral is $23$ i.e. still positive, despite the sharp drop of the collateral price.