Friktion
Search…
Volt #01 & #02

Rebalancing Process

Volt 1 & 2 follow the below process:
  1. 1.
    Accept user deposits/withdrawals of one denomination (i.e SPL token). See User Facing Instructions. Record pending deposits/withdrawals on Round PDA account. for the current epoch
  2. 2.
    Aggregate user assets into a single token account.
  3. 3.
    CRANKING BEGINS HERE
  4. 4.
    Choose a Supported Protocol, create an option or other derivatives contract (e.g spreads) on that protocol. Pass the new account that represents that account to SetNextOption.
  5. 5.
    Mint tokens representing ownership of the new options contract via RebalancePrepare (which CPI calls to the Supported Protocol's mint() instruction, sending collateral in exchange for the ownership tokens)
  6. 6.
    Initialize Serum market to collect bids
  7. 7.
    Bidders place their bids for the option tokens created by the Supported Protocol
  8. 8.
    Sells to the highest bidder via RebalanceEnter
  9. 9.
    Waits until option expires (typically 7 days).
  10. 10.
    Collects collateral and profit/loss from the Supported Protocol (via CPI call to redeem()). Uses RebalanceSettle
  11. 11.
    Takes performance fees. Processes pending deposits/withdrawals. (EndRound)
  12. 12.
    Takes withdrawal fees (TakePendingWithdrawalFees).
  13. 13.
    Starts new epoch and repeats from Step 1! (StartRound)
  14. 14.
    CRANKING ENDS HERE
For clarification on bolded instruction names, see here.

Supported Protocols

Inertia

European cash-settled fully-collateralized options protocol. contract enforced via a two-token mechanism, one token representing the long option counter party (option token), one token representing rights of the short option counter party (writer token). The settlement price is determined by an on-chain oracle, or an admin in unforeseen edge cases.
If the option expires in the money, a number of tokens are transferred to a claimable pool for the option buyers. The exact calculations are given below:
K = strike price, S = settlement price, C = collateral underlying the options
For covered calls: max(0, (S - K)/S * C)
For protected puts: max(0,(K - S)/K * C)

Soloptions

American physically-settled fully-collateralized options protocol. contract enforced via a two-token mechanism, one token representing the long option counter party (option token), one token representing rights of the short option counter party (writer token). No oracle is required since the program needs no knowledge of a "fair price" for settlement. Instead, it is expected that the option buyer will be aware that exercising the option (call or put) is profitable and will do so by calling the exercise instruction. In contrast to Inertia, Soloptions converts underlying to quote asset on exercise. For example, if a volt sold Soloptions SOL/USDC covered calls and the option buyer proceeded to exercise, the volt would be stuck with USDC, and thus unable to continue selling SOL covered calls.

Spreads

European cash-settled fully-collateralized options spreads protocol. contract enforced via a two-token mechanism, one token representing the long spread counter party (spread token), one token representing rights of the short spread counter party (writer token). An options spread is a position consisting of two calls or two puts at different strikes. The settlement price is determined by an on-chain oracle, or an admin in unforeseen edge cases. If the option expires in the money.
If the option expires in the money, a number of tokens are transferred to a claimable pool for the option buyers. The exact calculations are given below:
K_l = lower strike price, K_h = higher strike price, S = settlement price, C = collateral underlying the options
For covered calls spreads: min(S - K_l, K_h - K_l) / (K_h - K_l) * C
For protected puts: min(K_h - S, K_h - K_l) / (K_h - K_l) * C
​
The three above programs are used in identical ways in the volt program. Each program conforms to the same two-token API, thus making substitution of one for the other almost trivial.
Volt 1 & 2 use (Inertia, Soloptions, Spreads) to:
  • mint option and writer tokens (RebalancePrepare).
  • reclaim collateral from Inertia using writer tokens after option expires (RebalanceSettle).

​