Market Maker Pricing Guide

This guide covers the MM pricing module, which provides market maker prices with fee adjustments and collateral carrying costs.

Table of Contents

Overview

The MM pricing module fetches indicative prices from market makers and applies:

  1. Fee Adjustment - Widens the bid-ask spread for exchange fees

  2. Collateral Carrying Cost - Adds cost of capital for short positions

Importing

import {
  MMPricingModule,
  applyFeeAdjustment,
  calculateCollateralCost,
  parseTicker,
  buildTicker,
  COLLATERAL_APR,
} from '@anthropic/thetanuts-sdk';

Module Initialization

Fee Adjustment Formula

Market maker prices are adjusted to account for exchange fees:

Applied to prices:

  • Ask price: feeAdjustedAsk = rawAsk + feeAdjustment

  • Bid price: feeAdjustedBid = rawBid - feeAdjustment

Example

Why 0.0003 Cap?

The fee adjustment is capped at 0.0003 (0.03% of 1 contract) to prevent excessive widening for high-premium options. This matches the protocol's fee structure.

Collateral Carrying Cost

Short positions require collateral, which has an opportunity cost. The SDK calculates this based on:

  • BTC collateral: 1% APR

  • ETH collateral: 4% APR

  • USD collateral: 7% APR

Formula

Where timeToExpiry is in years.

COLLATERAL_APR Constants

Example

Spread Collateral Cost

For spreads, the collateral cost is based on the spread width (max loss), not individual legs:

Vanilla Option Pricing

getAllPricing

Fetches all option prices for an underlying asset.

getTickerPricing

Fetches pricing for a specific option ticker.

getPositionPricing

Fetches pricing with collateral cost for a specific position.

Structure Pricing

getSpreadPricing

Fetches pricing for a two-leg spread.

getButterflyPricing

Fetches pricing for a three-leg butterfly.

getCondorPricing

Fetches pricing for a four-leg condor.

Helper Functions

parseTicker

Parses an option ticker into components.

buildTicker

Builds an option ticker from components.

Price Components Summary

When you receive MM pricing, the price includes multiple components:

Component
Description
Applies To

Raw Price

Market maker's base price

All

Fee Adjustment

Exchange fee spread widening

All

Collateral Cost

Cost of capital for short positions

Short only

Final Ask Price (for buying/going long):

Final Bid Price (for selling/going short):

Last updated