Synthetix Docs
  • User Docs
  • Synthetix Exchange
  • Leveraged Tokens
  • For Developers
  • WELCOME TO SYNTHETIX EXCHANGE
    • Getting Started
    • News and Updates
    • Opening A Synthetix Account
    • Bridging to Synthetix Exchange
  • Perps Basics
    • Perps on Synthetix Exchange
    • Margin Types & Collateral
    • Funding
      • Technical Details
    • Maker or Taker?
    • Leverage & Initial/Maintenance Margin
    • Account Health & Liquidations
    • Conditional Orders
    • Position Modification
    • Gasless One-Click Trading
      • Starting/Stopping 1CT
    • Delegated Trading
      • Getting started with Delegation
      • Accessing Accounts Delegated to You
      • Managing Delegates
      • FAQ
    • Trading Tutorial
      • Connecting a wallet & V3 Account Creation
      • Depositing Collateral
      • Swapping and Bridging
      • Enabling one-click trading
      • Opening a Position
      • Closing a Position
      • Withdrawing Collateral
  • Perps V3 (Base)
    • Overview
    • Multi-collateral Margin
      • Collateral Types
      • What is USDx?
      • The Mechanics of USDx
      • Edge Cases in Liquidation:
      • Settlement of Debt
      • FAQ's
  • Perps V2 (Optimism)
    • Introduction (Legacy)
    • Getting Started on Optimism
    • How to get sUSD
  • INFRASTRUCTURE OVERVIEW
    • Getting Started
    • System Overview
    • Account Management
    • Delegate Management
    • Conditional Orders
    • Oracle Data
  • RESOURCES
    • Audits
  • GitHub
Powered by GitBook
On this page
  • SMv3 Step-by-Step Guide
  • Quick Start Overview
  1. INFRASTRUCTURE OVERVIEW

Getting Started

PreviousHow to get sUSDNextSystem Overview

Last updated 3 months ago

SMv3 Step-by-Step Guide

Quick Start Overview

This simplified guide provides a streamlined approach for interacting with SMv3. Note that "Proxy" refers to the Synthetix Perps v3 market proxy.

Initial Setup

  1. Account Creation: Initiate a Synthetix v3 Account using Proxy.createAccount.

  2. Permission Granting: Assign admin permission to Synthetix Exchange's Engine via Proxy.grantPermission.

    • Efficiency Tip: Steps 1 and 2 can be combined into a single transaction using Synthetix v3's , a feature co-developed by Synthetix Exchange.

Trading Preparation

  1. Collateral Approval: Approve the Engine to manage your trading collateral (e.g., $USDC, $snxUSD, $snxBTC, $snxETH) using IERC20.approve.

  2. Collateral Deposit: Deposit your trading collateral with Engine.modifyCollateral.

Trading Execution

  1. Commit Async Order: Execute trades (one at a time, as per Synthetix restrictions) using Engine.commitOrder.

    • Batching Capability: Steps 4 and 5 can be processed together, thanks to the multicall functionality of the Synthetix Exchange Engine.

Programmatic Interaction Guide

For those looking to interact programmatically, here are detailed steps with corresponding code examples:

This guide aims to facilitate a clear and efficient journey through SMv3’s setup and trading processes.

TrustedMulticallForwarder
Creating a Synthetix v3 Account
Granting Synthetix Exchange Engine Admin Permission
Approving Engine for Collateral Spend
Depositing Supported Collateral
Opening a Position via Async Order
Credit Funding for Conditional Order Execution
Debiting Account to Return Credited Funds
Defining a Conditional Order
Executing a Valid Conditional Order