Pods Options
app.pods.financeGithubBlogDiscord
  • Getting Started
  • Understand Options
    • What are options?
    • How do options work?
    • Pricing Options
  • The Protocol
    • Overview
    • Safety Measures
    • Ecosystem Participants
    • Use Cases
  • Options
    • Overview
    • Options Instrument
      • Variables
      • Functions
        • Mint
        • Unmint
        • Withdraw
        • Exercise
    • Smart Contracts
      • OptionFactory
      • PodPut
      • WPodPut
      • PodCall
      • WPodCall
    • Applied Use Cases
    • Understanding Returns
  • Options AMM
    • Overview
    • Options AMM
      • Variables
      • Components
      • Functions
        • Add Liquidity
        • Re-add Liquidity
        • Trade
        • Remove Liquidity
      • Pricing
      • Find The Next IV
      • Fees
      • Scenarios
        • LP Simulations
    • Smart Contracts
      • OptionAMMPool
      • OptionAMMFactory
      • OptionPoolRegistry
    • Applied Math
  • Developers
    • System Overview
    • Deployed Contracts
    • Dev Environment
  • Interfacing with Pods
    • Brand Assets
  • Code Integration Guides
    • Integrating with Pods (video)
    • How To Create Your Own Option
    • How To Create Your Own Pool
    • How To Trade (Buy/Sell)
    • How To Exercise
    • How To Remove Liquidity
  • User Guides
    • Videos
  • Security
    • Audits
  • APPENDIX
    • FAQ
    • Glossary of Terms
  • Additional Resources
  • app.pods.finance
  • Github
  • Blog
  • Discord
  • Twitter
  • Pods v0 Docs
Powered by GitBook
On this page
  • Exercise
  • 1) Consult Current
  • 2) Calculate
  • 3) Calculate
  • 4) Updates
  • 4.1) Update
  • 4.2) Update
  • 5) Burn options

Was this helpful?

  1. Options
  2. Options Instrument
  3. Functions

Exercise

Options buyers can exercise their right during the window of expiration.

Exercise

The event of exercising an option requires the following initial information: 1. Amount To Exercise 2. Owner

After the information was supplied, the exercise function will perform the following activities:

This function can only be called duringexerciseWindowperiod, depending on the exercise type.

For European: after trade window and before expiration. For American: anytime before expiration.

1) Consult Current StrikeReservesnStrikeReserves_nStrikeReservesn​

This balance should reflect the new current strikeReserves, considering the interest that accrued in the meanwhile. We are calling balanceOf()from ERC20 strike asset to check option contract strike asset balance.

2) Calculate StrikeToSendStrikeToSendStrikeToSend

This step calculates how many strike assets the user will receive in a put option after it requested the exercise.

StrikeToSend=ExerciseAmount⋅StrikePriceStrikeToSend=ExerciseAmount\cdot StrikePriceStrikeToSend=ExerciseAmount⋅StrikePrice

3) Calculate UnderlyingToReceiveUnderlyingToReceiveUnderlyingToReceive

This step calculates the amount a user should receive in underlying assets after the exercise was requested in the case of a call option.

UnderlyingToReceive=ExerciseAmountUnderlyingToReceive=ExerciseAmountUnderlyingToReceive=ExerciseAmount

4) Updates

4.1) Update StrikeReservesiStrikeReserves_iStrikeReservesi​

Using the current StrikeReservesStrikeReservesStrikeReserves (accrued with interest from the last period), we'll deduct the amount StrikeToSendStrikeToSendStrikeToSend used while minting this option.

StrikeReservesi=StrikeReservesn−StrikeToSendStrikeReserves_i=StrikeReserves_n-StrikeToSendStrikeReservesi​=StrikeReservesn​−StrikeToSend

4.2) Update underlyingReservesiunderlyingReserves_iunderlyingReservesi​

Using the current UnderlyingReservesUnderlyingReservesUnderlyingReserves (accrued with interest from the last period), we'll add the amount of underlying to transfer used while minting this option. Also, now with the expiration, one can either receive tokens or send tokens. In the case of a put option, this balance should increase if the options were exercised. That means an option buyer chose to exercise options.

UnderlyingReservesi=UnderlyingReservesn+UnderlyingToReceiveUnderlyingReserves_i=UnderlyingReserves_n+UnderlyingToReceiveUnderlyingReservesi​=UnderlyingReservesn​+UnderlyingToReceive

5) Burn options

Burn exercised options.

Burn=ExerciseAmountBurn = ExerciseAmountBurn=ExerciseAmount

Note that exercise functions do not impact the TotalSharesTotalShares TotalSharesor any OwnerSharesOwnerShares OwnerShares .

Exercise options ✅

PreviousWithdrawNextSmart Contracts

Last updated 4 years ago

Was this helpful?