# Mechanics

### Overview of Mechanics

While strategies on Thetanuts Finance have traditionally centred around the sell-side, Thetanuts Finance v3 will enable buy-side strategies as well - allowing users to go long or short on on-chain options. This section will cover the mechanics of a Long, Short, Close Now, and Close Upon Expiry trade lifecycle.

### Short Volatility

A short volatility position on Thetanuts Finance represents holding of a Basic Vault LP Token.\
\- **Short Call**: $XYZ swapped for $XYZ-C on the AMM, with $XYZ-C representing a short call.\
\- **Short Put**: $USDC swapped for $XYZ-P on the AMM, with $XYZ-P representing a short put.

### Long Volatility

A long volatility position on Thetanuts Finance sees a number of steps within the v3 architecture in order to achieve long exposure.\
\
**Long Call**\
$XYZ collateral deposited into the v3 Lending Market. A flash loan for $XYZ-C occurs at a 95% LTV on the Lending Market, with up to 20x of collateral value borrowed. Borrowed $XYZ-C is sold for $XYZ in the AMM, achieving a long call position.

**Long Put**\
$USDC collateral is supplied into the v3 Lending Market. A flash loan of $XYZ-P occurs at a 95% LTV on the Lending Market, with up to 20x of collateral value borrowed. Borrowed $XYZ-P is sold for $XYZ in the AMM, achieving a long put position.

{% hint style="info" %}
**What happens when there is insufficient liquidity to Long Call or Long Put?**

* If there is insufficient $XYZ-C / ($XYZ-P) in the Lending Market, a long call / (long put) trade may fail.
  {% endhint %}

### Close Now

Users on Thetanuts Finance v3 can opt to Close Now on their open positions, which has the effect of closing their positions instantly.&#x20;

**Short Call**\
Swap $XYZ-C to $XYZ on the AMM. If there is insufficient liquidity in the AMM to facilitate a Close Now, the user can instead close the position Upon Expiry instead.

**Short Put**\
Swap $XYZ-P to $USDC on the AMM. If there is insufficient liquidity in the AMM to facilitate a Close Now, the user can instead close the position Upon Expiry instead.

**Long Call**\
Thetanuts Finance v3 will route the order to the venue with the best pricing, by querying both the Basic Vaults (for Mint Price) and the AMM (for AMM Price).

* If AMM Price is more favourable, $XYZ is sold in the AMM for $XYZ-C, with the $XYZ-C loan then being returned to the Lending market – thereafter, the initial $XYZ position is then withdrawn from the Lending market.
* If Mint Price is more favourable, $XYZ will be deposited into the Basic Vault to mint $XYZ-C, with the loan being returned and $XYZ collateral in the Lending market redeemed.
* $XYZ in excess of loan repaid represents P\&L.

**Long Put**\
Thetanuts Finance v3 will route the order to the venue with the best pricing, by querying both the Basic Vaults (for Mint Price) and the AMM (for AMM Price).

* If AMM Price is more favourable, $USDC is sold in the AMM for $XYZ-P, with the $XYZ-P loan then being returned to the Lending market – thereafter, the initial $USDC position is then withdrawn from the Lending market.
* If Mint Price is more favourable, $USDC will be deposited into the Basic Vault to mint $XYZ-P, with the loan being returned and $USDC collateral in the Lending market redeemed.
* $USDC in excess of loan repaid represents P\&L.

### Close Upon Expiry

Alternatively, users on Thetanuts Finance v3 can opt to Close Upon Expiry their open positions - which closes the position at the end of the epoch.

**Short Call**\
The user closes the Short Call (i.e. $XYZ-C) at the end of the Basic Vault epoch, and claims the collateral after the epoch ends.\
\
**Short Put**\
The user closes the Short Put (i.e. $XYZ-P) at the end of the Basic Vault epoch, and claims the collateral after the epoch ends.

**Long Call**\
At the end of the epoch, $XYZ position is deposited into the Basic Vault to generate $XYZ-C – which is used to repay any outstanding debt in the Lending Market. $XYZ in excess of loan repaid represents P\&L.

**Long Put**\
At the end of the epoch, $USDC position is deposited into the Basic Vault to generate $XYZ-P – which is used to repay any outstanding debt in the Lending Market. $USDC in excess of loan repaid represents P\&L.

### Considerations for Long Positions on Thetanuts Finance v3

* **Theoretical Leverage**: While the theoretical leverage based on a 95% LTV is 20x, leverage on Thetanuts Finance v3 is typically in the range of 15–20x — as a result of slippage, price impact, and fees on the AMM.
* **Managing Borrowing Costs**: Leveraging in this manner carries inherent risks. The triggers for a soft close of a user's position on Thetanuts Finance v3 are the accumulating costs from borrowing (i.e. option premiums) rather than market volatility — where a soft close occurs when the user runs out of collateral. This is possible given that value of the borrowed asset (i.e. XYZ-C or XYZ-P) can increase due to option premiums and lending interest payments, and the fact that each lending position utilizes the underlying asset as collateral.
* **Automatic Rollover**: Positions not closed at the end of the epoch will automatically roll over to the new epoch, with any P\&L captured in the user’s net position in the lending market.
* **Protocol Solvency**: Basic Vaults in Thetanuts Finance are 100% collateralized.

### Arbitrage Opportunities on Thetanuts Finance v3

The same Basic Vault LP Token will have both a Mint Price and an AMM Price, which may result in an arbitrage opportunity if they do not trade at the same level. This scenario occurs when the Mint Price > AMM Price for a Basic Vault LP Token, where a user could arbitrage this by:

* **For Calls:** Deposit $XYZ in the Basic Vault to mint $XYZ-C; with exposure on Thetanuts Finance v3 achieved by going short call on XYZ. Sell $XYZ-C directly on the AMM, receiving $XYZ.
* **For Puts:** Deposit $USDC in the Basic Vault to mint $XYZ-P; with exposure on Thetanuts Finance v3 achieved by going short put on XYZ. Sell $XYZ-P directly on the AMM, receiving $USDC.
