🚀
Gamma Options Docs
  • 👋Welcome to Gamma Options Docs
  • Getting Started
    • 🪙Setup Crypto Wallet
    • 🔗Connect Your Wallet
    • ⚡Deposit Funds
    • 🎓Buy Call Options
  • Fundamentals
    • 📄Option Contract
    • ⚖️Margin
      • Margin Pool
      • Margin Account
      • Account Liquidation
      • Insurance Fund
    • 🔁Markets
      • Vol-range AMM
      • LP Position
      • LP Position Risks & Rewards
      • Fee Structure
    • 🕗Settlement
    • 🧑‍🏫FAQs
  • Use Cases
    • 🖥️For Traders
      • Open Long Option Position
      • Close Long Option Position
      • Open Short Option Position
      • Close Short Option Position
    • 🖥️For LPs
    • 🖥️For Lenders
  • Test Cases
    • 🖥️Test Plan
Powered by GitBook
On this page
  • Overview
  • Flash Loan Attack Protection
  1. Fundamentals

Settlement

PreviousFee StructureNextFAQs

Last updated 9 months ago

Gamma Options are European-style options, meaning that they can only be exercised at expiration.

Settlement is the critical process that facilitates the appropriate distribution of funds to each system participant upon expiration.

Overview

Settlement is the operation executed on the platform level that affects all markets with the same expiration time and is enabled for execution as soon as that expiration time is reached. Expiration times on the Gamma Options Platform are every day at 8:00 a.m. Greenwich Mean Time (GMT).

Following the true DeFi paradigm, upon expiring, anyone can execute settlement with a simple button click. The app contains a ticker that counts down to the next expiration time, and once the time is reached, the Settlement button is enabled.

Expiring markets countdown

Actors incentivized to execute settlement:

  • Platform admins - 99.9% of the time, a specified bot will call the settlement function. Additionally, the bot is made public and anyone can run it.

  • Actors who profit under current conditions - as a failsafe, should the bot fail for some reason, there are always going to be actors on the platform that profit under the circumstances at the expiration time

  • Everyone else - once the GAMMA token is set in place, settlement callers will receive rewards for participating in system maintenance

As all of the positions are fully collateralized, on settlement the platform:

  • Records the price at expiration, later to be used for position closing

  • Tallys all of the outstanding profitable long option positions, as well as long and short futures positions

  • Based on the previous step, executes a swap on Uniswap, maintaining each positions worth

Apart from executing the settlement, the aforementioned bot also closes all positions associated with expired markets. In a true DeFi fashion (and as a form of a failsafe), each user can close out his own positions manually.

Flash Loan Attack Protection

Since settlement heavily relies on Uniswap, it is subject to flash loan attacks. Gamma Options has a proprietary method of combating this by utilizing Uniswaps TWAPs (Time Weighted Average Price) to detect anomalous price behavior when the settlement is executed. Should that kind of price behavior be detected, the settlement attempt will be rejected.

There are markets to be expired
🕗