Stryke Docs
HomeGitHubSocials
  • ⚡Introducing Stryke
  • 🔍Products Overview
    • Product Overview (CLAMM)
      • For Option Traders
      • For Liquidity Providers
  • 🌚Tokenomics
    • SYK Token
    • xSYK Token
    • Reward Gauges
    • Protocol Fees
  • 🚶‍♂️UI Walkthroughs
    • CLAMM Walkthrough
      • Connect Wallet
      • Navigate Markets
      • Trade Options
      • Limit Exercise
      • Provide Liquidity
      • Reward Gauges
  • ⛓️Developers
    • Contracts
      • LP Management
        • Mint a Position
        • Burn a Position
        • Reserve Liquidity
        • Withdraw Reserved Liquidity
      • Trading
        • Mint Option
        • Exercise Option
    • APIs
      • xSYK
      • CLAMM
        • Trading
          • Purchase
          • Exercise
        • LP management
        • Option markets
        • Strikes chain
    • Deployed Addresses
      • CLAMM
      • Tokens & Others
      • Gauges
    • Bug Bounty Program
  • 📚REFERENCES
    • Glossary
    • Audits
    • Partners
    • Media Kit
Powered by GitBook
LogoLogo

© 2024 Stryke

On this page

Was this helpful?

  1. Developers
  2. APIs
  3. CLAMM
  4. Trading

Exercise

Prepare Exercise

Generate transaction call data for exercising options positions purchased on CLAMM.

Exercising on CLAMM involves swapping of tokens. i.e if for call options, Call Asset (eg: ETH) -> Put Asset (eg: USDC) and vice versa. Currently, the API only supports swaps through DEX and aggregators as specified below:

DEX
Chains Supported
SwapperId

PancakSwap V3

Arbitrum, Base

pancakeswap

Uniswap V3

Arbitrum, Base

uniswap

Sushiswap V3

Arbitrum, Base, Mantle, Blast

sushiswap

Thruster V3

Blast

thruster

Agni V3

Mantle

agni

FusionX V3

Mantle

fusionx

Aggregator
Chains Supported
SwapperId

0x Protocol

Arbitrum, Base, Blast

0x

Odos SOR V2

Arbitrum, Base, Mantle

odos

1inch Aggregator V6

Arbitrum, Base

1inch

Paraswap V6.2

Arbitrum, Base

paraswap

KyberSwap V1

Arbitrum, Base, Mantle, Blast

kyberswap

OpenOcean V4

Arbitrum, Base, Mantle, Blast

openocean

It is important to try and experiment with reasonable slippage percentages as CLAMM contracts always ensure the underlying collateral of the options are fulfilled before the profit is paid out to the trader when the swap takes place. To understand this concept better let's consider the example below:

strike: 1000 USDC
options amount: 10 WETH
type: CALL
size: 10 WETH

exercise price: 1050
slippage tolerance: 1%
swap route: WETH -> USDC

amount after swap without slippage: 10500 USDC
profit after swap without slippage: 500 USDC
amount after swap considering slippage: 10395 USDC
profit after swap considering slippage: 395 USDC
amount to fulfill liquidity providers: 10000 USDC

As you can see with the example above, when options are exercised the slippage only affects trader's profit to ensure liquidity providers are always whole. To avoid losing much on profit it is recommended to exercise options partially similar to how one would TWAP on DEXs or use supported aggregators but it is also important to note that even aggregators are prone to slippage if the size of the swap is big enough.

Exercise History

the history endpoint can be used to retrieve the history of options exercised for a user

PreviousPurchaseNextLP management

Last updated 8 months ago

Was this helpful?

⛓️

Get information required to exercise an options position

get
Query parameters
chainIdnumber · enumRequired

Chain ID of the network

Possible values:
optionMarketstringRequired

Address of the option market

optionIdnumberRequired

ERC721 token ID of the options position

swapperIdstring · enumRequired

Swapper contract to route exercise swap through

Possible values:
slippagenumberRequired

Max slippage allowance for the swap that takes place when options' position collateral tokens are swapped to the profit token

Responses
200Success
application/json
get
GET /clamm/exercise/prepare HTTP/1.1
Host: api.stryke.xyz
Accept: */*
200Success
{
  "profit": "text",
  "token": "text",
  "swapData": [
    "text"
  ],
  "swappers": [
    "text"
  ],
  "tx": {
    "to": "text",
    "data": "text"
  }
}

Get history of exercise activity for a user

get
Query parameters
chainIdnumber · enumRequired

Chain ID of the network

Possible values:
userstringRequired

Address of the user

optionMarketstringRequired

Address of the option market

firstnumber · enumRequired

Pagination parameter for first (Similar to Qraphql)

Possible values:
skipnumber · enumRequired

Pagination parameter for skip (Similar to Qraphql)

Possible values:
Responses
200Success
application/json
get
GET /clamm/exercise/history HTTP/1.1
Host: api.stryke.xyz
Accept: */*
200Success
{
  "strike": 1,
  "exercisePrice": 1,
  "premium": "text",
  "timestamp": "text",
  "ttl": 1,
  "type": "text",
  "profit": "text",
  "size": "text",
  "sizeToken": {
    "address": "text",
    "decimals": "text",
    "symbol": "text"
  },
  "profitToken": {
    "address": "text",
    "decimals": "text",
    "symbol": "text"
  },
  "txHash": "text"
}
  • Prepare Exercise
  • GETGet information required to exercise an options position
  • Exercise History
  • GETGet history of exercise activity for a user