Divergence Protocol
  • OVERVIEW
    • Divergence Protocol
    • Protocol Basics
      • Digital Options
      • Triangular Swaps
      • Convertible Liquidity
      • Options Specs
      • Fees
      • Glossary
      • References
  • User Guide
    • 📈Long Options
      • 🔥Open Longs
      • 🌊Close Longs
      • 👨‍🌾Exercise Options
    • 📉Short Options
      • 💧Open Shorts
      • 🔚Finalize Shorts
      • 📥Close Shorts
      • ⏰Expiry Withdrawal
    • 🍸Dive Bar
  • Technical Reference
    • Smart Contract Architecture
      • Deployment addresses
    • Core
      • Arena
      • Battle
      • Oracle
      • Utils
      • SToken
      • Interface
      • Libraries
        • DiverSqrtPriceMath
        • Position
        • Tick
        • TickMath
        • TradeMath
      • Params
      • Types
    • Periphery
      • Manager
      • Base
      • Interface
      • Quoter
      • Libraries
      • Params
      • Types
    • Audit Reports
  • DIVER Token
    • 🌝Tokenomics
      • Token Distribution
    • 🎃DIVΞR NFT Collections
  • Legal
    • Terms of Service
    • Risk Disclosure
  • MISC. INFO
    • 🔗Official Links
    • 🙌Media Kit
    • 🚢Ditanic Test Coins
Powered by GitBook
On this page

Was this helpful?

  1. Technical Reference
  2. Core

Utils

getAdjustPrice

Rounds down price input to two significant digits to adjust it for strike price. Assumes 18 decimal places (e.g., ETH price 1500 as 1500 * 10**18).

function getAdjustPrice(uint256 price) pure returns (uint256 adjustedPrice)

Params:

Name

Type

Description

price

uint256

The input price

Returns:

Name

Type

Description

adjustedPrice

uint256

The adjusted price

PreviousOracleNextSToken

Last updated 1 year ago

Was this helpful?