💰
Sudo Gitbook
  • 👋Welcome to Sudo
  • Overview
    • 💡What is Sudo
    • ✨Sudo Features
  • Trade on Sudo
    • 💎Start trading
      • Supported Assets
      • Fees
      • Market Hours
    • 📚Educational Resources
      • What Are Perpetual Futures?
      • Using Leverage Wisely
      • Risk Management Fundamentals
      • What is Sharpe Ratio
      • Real Trading Scenarios
      • Avoiding Rookie Mistakes
  • Liquidity Providers
    • 💰How to provide liquidity
    • 🛰️SLP
    • 🏦SLP Staking
  • S Rewards
    • S Card
      • Getting S Card
      • S Points
      • Using Your S Card
  • Sudo API
    • Sudo API Reference
      • Trader Data
      • Market Info
  • Sudo SDK
    • Introduction to Sudo SDK
    • Core Concepts
    • Installation and Setup
    • Quick Start
    • 📚v0.0.6
      • API Reference
        • SudoAPI
          • Open Position
          • Decrease Position
          • Pledge In Position
          • Redeem From Position
          • Cancel Order
          • getPositionCapInfoList
          • getPositionInfoList
          • getPositionConfig
        • OracleAPI
          • subOraclePrices
      • Changelog
    • Best Practices
    • Troubleshooting
  • Feature Details
    • Algorithm Balanced Funding Rate (ABFR)
    • Risk control
    • FAQ
    • Roadmap
    • On-chain program
Powered by GitBook
On this page
  • # v0.0.2 -> v0.0.3
  • Major Update
  • Key Changes
  • Impact
  1. Sudo SDK
  2. v0.0.6

Changelog

# v0.0.2 -> v0.0.3

Major Update

  • Upgraded from "@mysten/sui.js": "0.54.1" to "@mysten/sui": "1.3.0"

Key Changes

  1. Parameter Updates:

    • Removed: size, collateralAmount, reserveAmount (all bigint)

    • Added: leverage (number), collateral (number), positionConfig (IPositionConfig)

  2. Calculation Approach:

    • Position size and reserve amount now calculated internally based on leverage and collateral

  3. Return Type:

    • Changed from Promise<TransactionBlock> to implicit Promise<Transaction>

Impact

  • More intuitive position opening with leverage-based calculations

  • Increased flexibility with positionConfig

  • Less pre-processing and calculation required from the caller

  • Potential breaking changes due to major Sui SDK upgrade

PrevioussubOraclePricesNextBest Practices

Last updated 8 months ago

📚