Kwenta V3 Docs
DiscordKwentaTwitterBlog
  • πŸ₯‚Welcome to Kwenta
  • Welcome to Kwenta
    • πŸ”„Bridging on Kwenta
  • V3 Perps
    • πŸ“œPerps V3
    • ♨️Multi Collateral
      • What is USDx?
      • The Mechanics of USDx
      • Edge Cases in Liquidation:
      • Settlement of Debt
      • FAQ's
    • πŸ“šPerps Basics
    • πŸ’°Margin Types & Collateral
    • βš–οΈFunding
      • Technical Details
    • 🀝Maker or Taker?
    • πŸ’ͺLeverage & Initial/Maintenance Margin
    • πŸ”šAccount Health & Liquidations
    • πŸ›œConditional Orders
    • ⚑Gasless One-Click Trading
      • 🟩Starting/Stopping 1CT
      • ⁉️FAQ
    • πŸ—£οΈDelegated Trading
      • πŸ“™Getting started with Delegation
      • πŸ‘©β€πŸŽ“Managing Delegates
      • πŸ”Accessing Accounts Delegate to You
    • πŸ“ˆTrading Tutorial
  • Infrastructure Overview
    • πŸ“•Getting Started
    • πŸ”System Overview
    • πŸ—‚οΈAccount Management
    • πŸ‘₯Delegate Management
    • πŸ’»Conditional Orders
    • 🌐Oracle Data
  • Resources
    • πŸ•΅οΈAudits
    • GitHub
Powered by GitBook
On this page
  • Smart Margin v3 Overview
  • Architectural Evolution
  • Streamlined Authentication Process
  • Upgradability in Smart Margin v3

Was this helpful?

  1. Infrastructure Overview

System Overview

PreviousGetting StartedNextAccount Management

Last updated 1 year ago

Was this helpful?

Smart Margin v3 Overview

Smart Margin v3 (SMv3) continues the legacy of its predecessors, aiming to elevate the trading experience on Kwenta by offering advanced tools for trading Synthetix derivatives.

Architectural Evolution

SMv3 marks a departure from the previous versions’ account proxy approach. It introduces a monolithic "Engine" contract. This Engine is the hub for managing various components, including collateral, async orders, and conditional orders. It's designed to seamlessly integrate future features, consolidating them into a single, efficient contract.

Streamlined Authentication Process

The shift to an account-based architecture in Synthetix v3 represents a significant leap forward regarding user authentication. This development simplifies how trader calls are transmitted from SM to Synthetix v3, enhancing security and efficiency.

For users to interact with SMv3, setting up a Synthetix v3 account via the Synthetix proxy is mandatory. Those who already have Synthetix accounts can integrate with Kwenta's Engine by granting it administrative permissions. This permission is flexible and can be revoked by the user at their discretion, providing an additional layer of control and security.

Upgradability in Smart Margin v3

https://gov.kwenta.eth.limo/kips/kip-116/

Smart Margin v3 (SMv3) retains the upgradability feature characteristic of its predecessors. The system's upgradability is enabled through the integration of . Although the initial intention was to avoid upgradability, it remains a necessary feature. This is primarily due to the dynamic nature of the Synthetix v3 protocol, which SMv3 interfaces with. Aligning with Synthetix v3’s upgradability ensures that Kwenta and its traders can adapt to evolving needs and changes in the ecosystem.

The process of upgrading SMv3 is structured and secure. Upgrades are implemented using specific scripts, available . To ensure safety and prevent any storage conflicts during upgrades, comprehensive have been developed using Foundry.

It’s important to highlight that upgrade decisions and executions are under strict governance. These actions are exclusively authorized and carried out only if initiated by Kwenta's ProtocolDAO (pDAO), a multisig owner entity. This governance layer reinforces the security and integrity of the SMv3 system, ensuring that upgrades align with the community's best interests and the platform's strategic vision.

OpenZeppelin's UUPSUpgradeable utility
here
internal tests
πŸ”
Page cover image