Skip to content

Commit

Permalink
Update SIP-384: Snaxchain (#2064)
Browse files Browse the repository at this point in the history
* Update SIP-384.md

* update snaxchain gov sip
  • Loading branch information
barrasso authored Aug 13, 2024
1 parent 4556db0 commit d614732
Showing 1 changed file with 46 additions and 124 deletions.
170 changes: 46 additions & 124 deletions content/sips/sip-384.md
Original file line number Diff line number Diff line change
@@ -1,165 +1,87 @@
---
sip: 384
title: Synthetix OP SNX Appchain
title: Launch Synthetix Chain (SNX Chain) Using the OP Stack for V3 Governance
network: Optimism
status: Draft
type: Governance
author: 'Jackson Chan (@jacko125), Asian0x, LayerLabs (@LayerLabs-app)'
author: Jackson Chan (@jacko125), MEB (@barrasso), Matt
created: 2024-04-28
---

<!--You can leave these HTML comments in your merged SIP and delete the visible duplicate text guides, they will not appear and may be helpful to refer to if you edit it again. This is the suggested template for new SIPs. Note that an SIP number will be assigned by an editor. When opening a pull request to submit your SIP, please use an abbreviated title in the filename, `sip-draft_title_abbrev.md`. The title should be 44 characters or less.-->

## Simple Summary

<!--"If you can't explain it simply, you don't understand it well enough." Simply describe the outcome the proposed changes intends to achieve. This should be non-technical and accessible to a casual community member.-->

This SIP proposes for Synthetix to create an App-Chain called Synth Superchain with Optimism, the Layer 2 rollup chosen as the base for Synthetix Superchain. It will be a priority chain for DeFi Traders and users offering fast transaction finality, fee rebates for traders, and interoperability.
Deploy Synthetix Chain, an app chain built on the OP Stack, to act as the primary home of Synthetix V3 Governance.

## Abstract

<!--A short (~200 word) description of the proposed change, the abstract should clearly describe the proposed change. This is what *will* be done if the SIP is implemented, not *why* it should be done or *how* it will be done. If the SIP proposes deploying a new contract, write, "we propose to deploy a new contract that will do x".-->
The scope of this SIP is limited to the deployment of the network itself and the new V3 election system upgrade (SIP-360).

Synth Chain is the dedicated appchain where Synthetix state changes must be pushed for settlement. Make Synth Chain the home of the central Synthetix system, with other chains becoming satellites, and using cross-chain messaging for synchronization.
The plan is to leverage Synthetix Chain as the mothership of Synthetix governance and have it operate independently alongside the existing deployments. The new governance module will facilitate the elections using cross-chain messaging to sync votes, results, and council NFTs across all networks.

## Motivation

<!--This is the problem statement. This is the *why* of the SIP. It should clearly explain *why* the current state of the protocol is inadequate. It is critical that you explain *why* the change is needed, if the SIP proposes changing how something is calculated, you must address *why* the current calculation is inaccurate or wrong. This is not the place to describe how the SIP will address the issue!-->

Synth Chain is a step towards a unified, efficient, and economically promising ecosystem for Synthetix. By creating this appchain, the chain can maintain a better execution environment during high price volatility and liquidations which is crucial for finality and trade executions for perpetual traders on Synthetix.

## Rationale

<!--This is where you explain the reasoning behind how you propose to solve the problem. Why did you propose to implement the change in this way, what were the considerations and trade-offs. The rationale fleshes out what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.-->

By deploying an appchain Synth Chain would profit ~13 ETH + a month after paying for the sequencer costs from margin of transaction fees. For data availability, we propose using the ETH DA layer and for an oracle, we propose using Pyth to prevent any execution lag for traders. To ensure the best trader UX, we propose to use it for cross-chain liquidity deposits.

By selling blockspace on Synth Chain to process all Synthetix transactions, the ETH transaction fees collected by the App-chain sequencer are redistributed to SNX stakers or utilized in a traders fee rebate program offering low or no on-chain transaction costs.

| In ETH terms | ETH DA (Pre 4844) | ETH DA (Post 4844) | Alt DA (Post 4844) |
|------------------------------------------|-------------------------------------------------|-------------------------------------------------|-------------------------------------------------|
| Assumptions | All 15k Transactions a day on OP migrate to SNAX Chain. | 10.5k transactions per day ([over last 30 days](#)) | 10.5k transactions per day ([over last 30 days](#)) |
| Monthly Earnings | 80.4 ETH | 36.48 ETH | 19.14 ETH |
| Monthly DA Costs | 75.52 ETH | 10.68 ETH | 0.67 ETH |
| Monthly Sequencer Costs | 12 ETH | 2 ETH | 2 ETH |
| OP Collective Contribution | N/A | 3.87 ETH | 2.77 ETH |
| **Monthly Net Revenue (Deducting sequencer and DA costs)** | **-7.12 ETH** | **19.93 ETH** | **13.7 ETH** |

## Competitive Landscape
The competition within the specialized DeFi and Finance blockchain space is very competitive. Synthetix is currently competing for users and traders attention from multiple Perp AMM Dexes and specialized DeFi chains.

A great case study for a Perpetuals App-Chain is Dydx V4 which is Cosmos SDK based. There were concerns that when Dydx moved away from Ethereum, it might struggle to recoup the same level of activity. V4 launched in November 2023, the total trade volume since launching V4 is 17.8$ billion. By transitioning to a Cosmos SDK App-Chain, Dydx improved its trading throughput, reduced transaction costs, and customized its user experience for high-frequency traders.

| Chain | Block time | Avg Transaction Cost | Consensus | Interoperability |
|-----------|------------|----------------------|-------------|-------------------|
| Optimism | 2s | 0.06 | EVM Rollup | OP Superchain |
| Arbitrum | 0.25s | 0.09 | EVM Rollup | Arbitrum |
| Mode | 3s | 0.06 | EVM Rollup | OP Superchain |
| Dydx | 1.8s | 0.006 | Cosmos | IBC |
| Sei | 0.42s | 0.006 | Cosmos | IBC |
| Injective | 0.9s | 0.01 | Cosmos | IBC |

## Technical Specification

<!--The technical specification should outline the public API of the changes proposed. That is, changes to any of the interfaces Synthetix currently exposes or the creations of new ones.-->

### Execution Layer

We propose utilizing Optimism's Superchain stack to tap into the Superchain which will include permissionless fault proofs coming to OP in June, Interopability layer with Superchain ecosystem L2's via OP Plasma.

### Data Availability

Utilize ETH DA, Optimism’s span batching, and 4844 for maximum security and decentralization benefits.

By utilizing ETH DA, we can retain future Superchain composability.

### Oracle

We propose to utilize the Multi-Chain oracle provider Pyth to help Synth Chain access reliable and low-latency market data for prices. Synthetix uses Pyth benchmarks in an innovative way for delayed settlements which prevents any execution lag for customers. The same would be true for Synth Chain products.

Pyth provides over 400 price feeds across crypto, FX, equities, and more. All feeds are available for use on any blockchain integrated with Pyth and this would apply to SynthChain as well.

**Stats since Synthetix started using Pyth:**
- 75+ markets supported
- 40$B trading volume on Synthetix

### Transaction Execution Speed
Currently, Synthetix Perpetual trades confirm/finalize within 3 seconds with Pyth pricing oracles. Traders want this to be reduced ideally to within < 2 seconds for arbitrage trading between DEXes and CEXes.

During periods of extreme volatility in the market, we have observed that gas prices spike due to congestion on the OP mainnet. There are liquidations that are not “profitable” for liquidation bots to execute because the gas costs are too high on the OP rollup.

We want to ensure that Synthetix Perp trades are executed in a timely manner and liquidations are executed during extreme volatility in the market.

### L2 Appchains enable ultra cheap transactions on EVM

In order to onboard as many users as CEXes have, our architecture needs to scale to support 100,000’s of users and potentially algo trading bots executing simultaneously during periods of volatility.

With Infinex focusing on providing CEX user experience and account abstraction, a Synthetix L2 would support the option to provide gas-less transactions for traders.

**Paymasters:** Tools like ThirdWeb, Alchemy, Biconomy already support account abstraction and gas-less transactions, subsidizing user’s transactions on your app with smart accounts.
The current elections system for Synthetix V2X is limited to Optimism Mainnet, causing inefficiencies in governing deployments across multiple networks. This SIP proposes deploying Synthetix Chain as a solution to this issue.
The primary goal of Synthetix Chain is to create a neutral platform for streamlined governance. It will manage Synthetix deployments across both EVM and non-EVM networks, addressing the current limitations of the election system.
While not part of this SIP, future plans for Synthetix Chain include becoming the main hub for SNX staking and fee collection. It can host deployments of Synthetix V3, Perps, and Orderbook Perps. Additionally, Synthetix Chain is expected to integrate with the Optimism Superchain for the benefits of interoperability (crosschain liquidity & trading).

Other use cases for SNX token could be developed, for example, staking SNX tokens for sponsored gas transactions for users on Infinex / Kwenta.
Refer to “Future Plans” for additional information.

The gas subsidies of this would be in theory covered by the sequencer fees that the SNX sequencer is collecting.
## Specification

**Trailing 90 days OP Chain Base Gas Fees:**
### Architecture

### Rebated Sequencer Fees for Perps Traders
As a priority chain for DeFi Traders and users offering low congestion on OP Stack, Synthetix Superchain will provide liquidity and rebated sequencer fees for perp traders on the Appchain.
Key components include:

### Synthetix Chain Ecosystem
Opportunities to support a DeFi ecosystem with Synthetix’s liquidity layer as the underlying basis for many other protocols to build on top of Synthetix perp markets. Synthetic AppChain will have partner applications like Uniswap, Curve, and other Defi partners to help boost the ecosystem's users, transactions, and growth.
**Execution Layer**: Optimism's Superchain stack.
**Data Availability**: ETH DA, Optimism’s span batching, and EIP-4844.
**Oracle**: Multi-Chain oracle provider Pyth for low-latency market data.
**Cross Chain**: Wormhole Messaging & Queries.
**Chain ID**: `2192` ;)

### User Interfaces:
- Infinex
- Kwenta
- PolynomialFi
Synthetix Chain will be deployed as a "vanilla OP Chain" using Ethereum L1 for both settlement and data availability. The deployment will follow the architecture outlined in the [OP Stack documentation](https://docs.optimism.io/stack/explainer).

### DeFi Protocols
- Thales / Overtime
- Lyra Finance
- Dhedge
- Ethena
- Amphora
- TLX leverage tokens
- Atlantean
- Liquidity DEX on Appchain > Curve / Uniswap / Velodrome
Additionally, relying on Ethereum for Settlement and DA will maximize the decentralization of the chain & ensure compliance with the Optimism Superchain Standards to enable interoperability in the future.

### Bootstrapping Liquidity
### Governance and Operations

Liquidity that is on Ethereum L1 and other major chains where SNX deposit contracts will be present. Infinex recent launch has shown ability to take deposits of USDC from EVM chains, Polygon sidechains and Solana.
Synthetix will host the new governance implementation and the initial deployment will only include governance-related operations. For this initial SIP we propose to use Conduit to deploy Synthetix Chain and manage its infrastructure.

### Interoperability - Cross-Chain Messaging for Liquidity Deposits
We propose utilizing cross-chain messaging to create the best trader UX.
**Any future upgrades and deployments of other components will require separate SIPs.**

### Trader UX:
User deposit margin on any EVM L1 or Solana chain
Give them a “loan” on Synthetix Chain for the deposited margin to trade with and take a small amount of the margin to give them gas to trade with on the destination chain for a smoother experience.
Settle the margin amounts after PnL and withdraw on the source chain they deposited on.
### Election Start Date

### Technical Requirements:
Cross-chain messaging and validators need to confirm the margin amount to be settled is correct.
Nuances with different blockchain security and limits on each to prevent infinite mints.
To align with Wormhole's cross-chain release guidance, we propose the following election schedule:

### App-Chain Strategy
```
Nominations Start: Fri Aug 30 22:54:58 2024 UTC
Voting Start: Thu Sep 05 22:37:06 2024 UTC
New Epoch Start: Sun Sep 15 22:37:06 2024 UTC
```

**We want to incentivize:**
Future elections will follow the above schedule, with epochs remaining at 4 months.

- Traders using the new Synthetix Superchain to trade to generate fees and activity.
- Liquidity providers on the appchain to provide assets for sufficient liquidity.
- Users can create a new LP and long tail markets on Synthetix V3 that are supported by Pyth price feeds.
## Test Cases

### Test Cases
- **Scenario 1**: Successful deployment and operation of governance contracts on Synthetix Chain.
- **Scenario 2**: Successful cross-chain interaction between Synthetix Chain and existing Synthetix deployments.
- **Scenario 3**: Cost analysis and performance metrics post-EIP-4844 vs third parties.

<!--Test cases for an implementation are mandatory for SIPs but can be included with the implementation..-->
## Future Plans for Synthetix Chain (Out of Scope for Current SIP)

Relevant tests will be developed during implementation.
While Synthetix Chain is initially focused on governance, it has the potential for broader applications. The following are planned future developments, not included in the current proposal. Any future upgrades and deployments of other components will require separate SIPs:

### Configurable Values (Via SCCP)
1. Cross-chain SNX Staking and Fee Collection
Replace Optimism as the primary hub for SNX staking
Centralize fee collection from multiple EVM & non EVM chains.

<!--Please list all values configurable via SCCP under this implementation.-->
2. Multi-chain Liquidity Sharing
Pool SNX liquidity on opSNXchain
Support trading and liquidity sharing across multiple chains

N/A
3. Optimism Superchain Integration
Implement cross-chain trading support across Optimism Superchain
Enable traders to operate from any supported chain
Make opSNXchain the central hub for yield generated across the Synthetix ecosystem

## Copyright

Expand Down

0 comments on commit d614732

Please sign in to comment.