Ghostboard pixel

The Optimistic Ethereum Transition

The Optimistic Ethereum Transition

With the launch of Optimistic Ethereum (OΞ) mainnet in a few days we are entering a new era for the project, OΞ presents an opportunity to scale the protocol but it also presents a number of challenges. One of the most critical is how to gracefully transition from L1 to a protocol running on both L1 and L2 simultaneously. As discussed in a recent call there remain some unknowns. However, we believe we have a reasonable transition plan. It is not yet clear whether this plan needs to be included within the SIP or each transition phase should be its own SIP, but I will leave that discussion to the community. In addition this post will call out some of the considerations users should be aware of before transitioning to L2.

With this change we are trying to maintain a balance between risk to L1 and maintaining a coherent system across both layers. This conflict is fundamentally incompatible, so we have opted for initiating the transition with the absolute minimum risk to L1, and then adding functionality over the course of the next few months as we build confidence in OΞ.

As a starting point though I think it is worth identifying the end state we are targeting. If we can reach consensus on this target then the path between these two points can remain somewhat opaque while we address specific issues as they arise. The two components we need to focus on are staking and exchanges. We will almost definitely need to maintain exchanges on L1 for the foreseeable future, but we should be able to migrate staking to L2 though. It is significantly less complex to only support minting on a single network, and that network should ideally be the one with the lowest cost to ensure high staking participation. So this leaves us with supporting exchanges on both L1 and L2 but transitioning all minting activity to L2. In order to support this we will then need Synth Teleporters (coined by @theethernaut). These are contracts that allow for Synths to be moved between L1 and L2. If we can achieve this we will have a single protocol spanning two networks, with transfers and exchanges of Synths on both, but staking only on L2. I should point out two potential alternatives, the first is just a completely distinct parallel network on L2, this is low risk but would fragment liquidity and introduce complexity for users as Synths on both networks would be incompatible, so you would need L1sUSD to burn debt on L1 and L2sUSD to burn debt on OΞ. Crazy times. The second is to allow minting on either network indefinitely. This is a minor modification to the proposed configuration but it introduces complexity in order to allow stakers who feel more comfortable on L1 to remain there and still participate in staking.

Assuming we agree on the end state (we probably don’t), I will now sketch out a transition plan starting from mainnet deployment this week.


Phase 0
One way SNX bridge from L1 to L2 including escrowed SNX
SNX & sUSD will be non-transferrable on L2
Minting of non-fungible sUSD
Claiming of SNX (funded via the sDAO)

Once OΞ mainnet is live a new SNX deposit contract will be deployed by the pDAO on L1. This will be the bridge that allows SNX holders on L1 to migrate to L2. *WARNING* this will initially be a one way process for escrowed SNX and there will likely be no way to get escrowed SNX back to L1 for at least a few months. SNX sent to L2 will also not be transferable, so you will not even be able to transfer your SNX to a different wallet on the L2 network. The migration process will also transfer any escrowed SNX associated with that wallet. Additionally all debt must be paid before the migration can be initiated. In order to reduce the impact for smaller SNX holders we are also proposing that all addresses with less than 1,000 SNX in escrow is instantly vested. This is to avoid the need to pay $200-300 in gas to migrate vesting entries. Transfers of SNX will then be enabled after a few weeks once key components are validated to be working as expected. You will be able to stake SNX and mint sUSD. However, this sUSD will *NOT* be fungible with sUSD on L1. Yes, I said we needed to avoid this exact situation, but the good news is that phase0 is a walled garden so you can’t withdraw the sUSD to L1 yet anyway, so I could have totally lied and said they are 100% fungible but that would be cruel. To incentivise this transition SNX will be deposited into the L2 fee pool from L1 via the protocolDAO and will be funded by the synthetixDAO. The sDAO has committed to funding this transition until the community passes a SIP to divert inflation from L1 to L2. In order to minimise the amount of SNX on L2 at the outset the rewards will start small and scale up, with 10k SNX for each of the first two weeks and then 25k SNX a week for two more weeks. At that point an assessment must be made to decide whether to increase rewards to 50k SNX. Phase 0 optimises for safety while allowing for the core functionality of both the L2 chain and the OΞ Synthetix instance, while preparing the way for the introduction of exchanges.


Phase 1
Exchanging of sUSD to other Synths
Chainlink Oracle Support
Transferrable SNX and Synths on L2

The transition to phase 1 will likely take 4-6 weeks, with the main change being sUSD will now be exchangeable into other Synths. These Synths will still not be able to be withdrawn to L1. SNX and Synths will now be transferable within OΞ. The addition of exchanges also necessitates the deployment of Chainlink Oracles to OΞ to support multiple rates. This is another huge milestone, as they will be only the second protocol to support L2. Or will they? I honestly don't know, probably I would guess, but we will see, might be psyops.

Phase 2 (The V3 migration interlude)
Two way SNX bridge from L1 to L2 including escrowed SNX

It is likely that at the conclusion of Phase 1 we will be ready to make the transition to Synthetix V3.0, this creates some additional fun and games for everyone because if we don’t do this migration at this point we would have to do it across a unified L1 and L2 which would mean deploying migration contacts on both networks. Right now it feels like the safest approach is to have everyone withdraw back to L1 and then migrate to V3 and redeposit to OΞ. This adds friction but we are confident we can implement a simple interface for managing the entire process end to end for stakers. There is an issue with the one week withdrawal window from L2 though, as it is possible users will miss a fee period, we will attempt to minimise the impact of withdrawal delays from L2 to L1 as much as possible.

Phase 3
Unified debt pool
Debt pool snapshot syncing
Fungible Synths
Synth teleporter
Parallel minting on L1 and L2
SNX inflation redirection

Once the V3 migration has commenced we can deploy the new V3 contracts onto L2 enabling minting, burning, exchanging and claiming. Most importantly we will deploy the Synth teleporter on both L1 and L2. This handy little contract burns synths on one network and mints them on the other network allowing for the debt pools to be merged and for liquidity to flow across both networks. At this stage staking will still be occurring on L1 Ethereum. But we will use the inflationary supply to transition away from L1 staking by diverting increasing amounts of rewards to OΞ over the course of several fee periods.

Phase 4
L1 minting deprecated
Fee pool bridge
Position liquidation

At this stage we have a unified debt pool and a fully functional system on OΞ. We must continue to maintain exchanging on L1, but we can now deprecate staking. There are likely to be stakers who have lost private keys and other issues, so in order to deprecate staking we will need to enable liquidation. This will allow anyone to pay down the debt of a position in exchange for some of the staked SNX. This is in order to reduce the minted supply of synths on L1 down to 0 in preparation for disabling staking.

We have now reached the future state described at the start of the post, and are in a position to take advantage of L2 throughput as well as maintaining support for exchanges on L1 while we wait for the rest of DeFi to join us over in the magical land of OΞ. As I mentioned at the start it is possible we will need to modify these phases as we encounter various issues during implementation, but at a high level this plan should be robust enough to avoid significant deviations. Needless to say, exciting times ahead.