We designed the Perp Vault templates to simplify the flow of creating options-related perpetual strategies. Anyone can create a perpetual options strategy by deploying a vault which represents that strategy. The owner of the vault acts can rollover positions i.e. close out expired option positions and open new option positions using the funds in the vault. This allows end users to deposit their funds into the vault without having to worry about expiries because the owner takes care of their position on their behalf.
Each Vault represents a strategy, and each vault can be built up by multiple actions. Once the actions have been set, they cannot be changed.
To launch a new strategy, you will need to deploy a new
OpynPerpVault contract, and one or several actions that make up your strategy. Look at the ACTIONS EXAMPLE section on the left to see examples of how to implement a strategy that goes "Long an option", "Short an option" or do other trades.
The reason for allowing a vault to be composed of multiple actions is to enable strategies like going short 2 different options at the same time.
To launch a simple short vault, you will need to do the following:
ShortOToken action contract. Only keep AirSwap related functions, removing the auction code, since this simple vault will use Airswap for OTC trades versus a full auction.
OpynPerpVault vault contract which sets the
ShortOToken contract address as the only action.