You've successfully subscribed to Synthetix Blog
Great! Next, complete checkout for full access to Synthetix Blog
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.

Decentralised synthetic assets

Why Optimism?

Why Optimism?

The emergence of DeFi has clearly demonstrated Ethereum needs to scale before we reach ETH2.0, but maintaining composability within the DeFi ecosystem also requires coordinating on a single scaling solution.

Thankfully the market is very good at anticipating and solving challenges like this and we now have many scaling technologies coming online. We’ve spoken to many of the teams working on the major scaling variants, and after reviewing each of them I believe Optimistic Ethereum is the scaling solution likely to reach consensus within the community.

This post will detail why I believe this but will also address concerns raised in the community about the Optimistic Ethereum rollout. It will also lay out the governance process required to implement an OVM variant of Synthetix on mainnet, as well as the circumstances under which I believe another scaling technology could supplant Optimistic Ethereum. The motivation being to ensure the community has the information it needs to reach consensus on the migration of Synthetix to Optimistic Ethereum.

[If you haven’t read Vitalik’s post “A rollup-centric ethereum roadmap” it is a good top down argument for what is laid out in this post. I have come at this from the bottom up, looking at what DeFi projects need to scale, and why Optimistic Ethereum satisfies those requirements.]

Social consensus

I feel like “Trade-offs all the way down” should be my new catch phrase. Yet it remains true — there is no silver bullet with scaling. Every approach has significant trade-offs, and specific implementations of each scaling technology have further low-level trade-offs. All of this against the backdrop of a high stakes meta-coordination game, because it is not enough to pick the right design and trade-offs — we must also optimise for the solution that is most likely to be chosen by everyone else. Thus scaling becomes more than just a technical challenge, it is also a social coordination game.

When I first read about Optimistic Rollups, we were not yet at red alert gas prices. It seemed like an elegant solution to both the technical and social challenges, but I was already mindful we needed to bring other projects with us no matter what scaling solution we chose. The Unipig demo with Uniswap gave Optimism a strong chance of gaining social consensus by incorporating one of the most high profile projects on Ethereum. So I chose to become part of the solution, not only in providing Optimism feedback on how to address DeFi-specific challenges, but to help lead social coordination within the community.


Technical considerations

Synthetix has both a blessing and a curse in Justin Moses. He sets an uncompromisingly disciplined engineering culture, but has an aversion to cognitive overhead the likes of which you rarely see outside the mollusc community. This means the rollout of Synthetix onto L2 needed to strike a delicate balance between minimising risk and reducing any and all modification to the code base. Zero fucking chance we were getting buy-in to run two distinct codebases on L1 and L2 in parallel during a transition that might not even materialise, negative zero if it meant rewriting the contracts in a different language.

Synthetix is one of the most complex smart contract suites on Ethereum which increases the impact of having to maintain separate codebases. This is something we discovered first hand with our ill-fated foray into porting the Havven network to EOS. https://twitter.com/kaiynne/status/1166234541616316417?s=21

We also needed to demonstrate to the community that this technology was viable and the right place to invest further resources before attempting to build consensus around this as our scaling solution, and the OVM trading demo helped to solidify this. But there remain members of the community that are rightly concerned with the approach, so while we have a pretty solid indication that community consensus is aligned on Optimistic Ethereum we have not yet reached the point where a SIP could test this.

But before I get into specific trade-offs I want to provide a high level overview of current scaling directions for smart contract execution:

  1. Fast Blockchains, aka “Ethereum Killers”, aka alternative L1’s, aka really fast blockchains
  2. ETH 2.0, aka see you in 2032 (Kidding, or psyops whichever suits your narrative)
  3. State/payment channels, aka “you want to do more than send tokens around? Really?”
  4. Sidechains, aka bow down before xDAI or die motherfucker
  5. Plasma, aka Omisego, aka better late than never.
  6. ZKrollups and other solutions in the zero knowledge menagerie, aka how much do you really love solidity?
  7. Optimistic Rollups, aka trigger warning: Optimistic Ethereum
  8. Lightning, aka lol, no.

Maybe there are a few things I’ve missed, in which case I apologise, in any case I fully expect to hear about them on twitter.

Given the constraints around being able to maintain a single code base during the transition period, most of the solutions above are immediately ruled out. Sure, many claim to be EVM compatible but this isn’t as easy as it sounds - even though Optimism has significantly over indexed on this particular constraint there have still been minor contract modifications required. But we can essentially rule out the following: Fast blockchains, ZKrollups, Lightning, state channels, and Plasma. Even if ZKrollups progressed at a breakneck pace, all variations currently require rewriting contracts in a new language. This is not insurmountable but the maturity of tooling around these languages is minimal, which significantly increases implementation risk.

There are probably some apoplectic fast blockchain advocates reading this right now, and yes it is true some are EVM compatible allowing for solidity contracts to be deployed, but most of these have other considerations that we felt reduced their viability. Including very novel consensus mechanisms that are not yet battle hardened enough to justify, or significantly reduced security.

Given the hard requirement of adhering to the property of existence, #2 is ruled out. And yes, I put ETH 2.0 in slot two because it was my list.

The requirement for generalised computation is a second strike against State/payment channels and Plasma for the time being.

This leaves us with sidechains and Optimistic Rollups. We ruled out sidechains like xDAI given we would be requiring hundreds of millions of dollars worth of asset security immediately and then orders of magnitude above this in the future. Flame me please.

Having looked at all of the alternatives we felt Optimistic Ethereum presented the best set of trade-offs and that the team were very well positioned to execute on their roadmap.

Phased Optimism

Obviously Optimistic Ethereum is not yet live so there is still significant execution risk, which is why I have not proposed a SIP to shut down Synthetix on L1. However, of all of the options listed above we believe it has the right combination of trade-offs and risks to justify putting significant effort into not just getting Synthetix to migrate but to bring the rest of DeFi with us. This was the reason I decided we needed to leverage our position as one of the most established DeFi protocols and take on the early implementation risk. I knew this would help build consensus in the community. So far, the reception has been broadly positive and no one has yet challenged the allocation of resources towards Optimistic Ethereum.

However, as we get closer to a potential mainnet transition three major concerns have been raised.

1) Fraud proofs
2) Centralisation
3) Withdrawal delays

The most critical technical concern is that of fraudulent state transitions. There have been some claims the current implementation phase does not include fraud proofs, in reality fraud proofs are included but auto-generated fraud submissions are not present. The Optimism team chose a phased approach in order to test specific functions like deposits and withdrawals, before increasing complexity. However, this could have been called out more clear in the testnet roadmap, to avoid any confusion. Fraud proof submission automation will be present before mainnet is live though. Without fully functional fraud proofs it is obvious that no mainnet funds can be deposited into the Optimistic Ethereum network. I would personally vote against any SIP that proposed moving to a network with low security guarantees and I urge everyone else in the community to do the same. This was one of the reasons why xDAI and other POA networks were dismissed as non-viable due to their lower security guarantees.

Another major source of concern is the sense that Optimistic Ethereum was presented as decentralised when it has aspects of centralisation. I believe this view is misguided but the concern is of course very valid. The community has invested huge time and resources into continuously decentralising the protocol over the last few years, taking a step backwards for the sake of gas costs or throughput would be a poor trade-off at this stage. That is not the case here though, the sequencer provides significantly improved user experience with minimal downside.

Where these concerns arise is from the perceived position of the sequencer in the Optimistic Ethereum network. It is important to note that the sequencer is not necessary to access  Optimistic Ethereum - it is there to provide significant UX improvements. Most people also assume a single sequencer means a single point of failure, which would be bad, but the failure case is just the shitty L1 UX we already have. Obviously falling back to L1 blocktimes is not ideal, but there are numerous potential solutions including backup sequencers that can step in if the active sequencer fails or is attacked. All of these concerns are only temporary, as the goal is still to move towards a network of sequencers as quickly as possible.

The final major concern is on the impact on cross-layer composability from withdrawal delays — a concern for basically all scaling solutions except alternate L1’s. These delays mean during the challenge period funds are locked in the L2 network, however, there are several workarounds to this. One is to have a network of validators provide funds on either side of the bridge and take on the risk of providing immediate withdrawals for a fee. In fact Connext has already begun work on this, more details can be found here. This does not fully solve composability concerns as funds would still need to be confirmed on mainnet before another transaction could be initiated, but again--this is fundamental to basically all scaling solutions, we just can’t escape it.  This is why I believe it is critical to have parallel versions of all of the major DeFi protocols live on Optimistic Ethereum as soon as possible. This will allow for almost all current DeFi transactions to happen on L2. It is also likely staking will migrate completely to L2 but the exchange contracts will continue to operate in parallel on both L1 and L2.

To be clear, everything required for a functional mainnet will be released before a SIP to begin the Optimistic Ethereum mainnet migration is proposed and I am personally confident this condition will be satisfied within the next few months.

Post Mainnet Transition

How Synthetix transitions to Optimistic Ethereum is still a matter for debate within the community. First we must reach consensus that a parallel and limited version of the network should be launched on L2 mainnet at all. Once we have achieved this we need to review the results of this initial mainnet launch and formalise the rest of the transition.

While the synthetixDAO will likely fund the first few weeks post mainnet, we will require a SIP to divert a percentage of the protocol rewards to Optimistic Ethereum eventually. Once we have protocol rewards diverted to this parallel network we can monitor adoption and let the market price the risk of migrating. Presumably the yield will be lower on Optimistic Ethereum given the reduced gas costs, but it is possible the platform risk results in a higher yield as the majority of SNX holders defer migration to a later date.

My view is that sUSD issued against Optimistic Ethereum SNX is not too dissimilar to sUSD issued against escrowed SNX. We made the decision to allow sUSD minting against escrowed SNX to maximise the available collateral. The SNX that is migrated to L2 can if required be migrated back at some point, which means it should be considered as valid collateral within the network simply in a different state to L1 SNX. Thus the sUSD minted on L2 should be fungible with L1 sUSD. There are of course arguments against this approach including the complexity of implementation. We must decide which approach makes the most sense as a community.

If this transition is effective we have a fairly strong lever to effect the rest of the migration: simply keep diverting a larger percentage of the inflationary rewards until 100% is being sent to L2 and all active SNX staking is happening on L2. By this time we will of course need to support exchanging of Synths on both L1 and L2. So there are a number of interrelated dependencies to manage in this process.

I have stated publicly I believe Optimistic Ethereum will be the DeFi chain between now and the launch of Eth2.0. If the rest of the Synthetix community finds this credible we need a plan to embrace this network and migrate away from L1 completely. We should of course do it with caution but the Synthetix Spartans have never shied away from asymmetrical bets, and I believe this is one of our biggest.

In order to execute on this we will need a series of SIPs and SCCPs that lay out the proposed changes in each release and the rationale behind each of them. This will ensure maximum transparency and buy in from all token holders.

Fallback plans

The race to scale Ethereum and smart contract platforms in general is a multi-billion dollar endeavour. There are many competing teams in this high-stakes game, so while we have confidence in Optimism it is possible another team could out execute them. If that is the case we must be prepared to shift our focus to this competing scaling technology, particularly if we find social consensus amongst DeFi projects shifting away from Optimistic Ethereum to an alternative.

We must also prepare ourselves for the worst case scenario: a failed or aborted launch of Optimistic Ethereum. In that case we must quickly divert resources into due diligence on other solutions while also working to optimise the existing L1 system. In fact we have already begun this process of building contingencies. The rapid implementation of the debt snapshot SIP was an example of an optimisation that had been left dormant for many months  that was accelerated to address immediate gas concerns on L1. Thankfully we have been given a temporary reprieve but this may not last long. If we cannot reach consensus on migrating to Optimistic Ethereum for any reason I believe we must come together as a community and select an alternative scaling solution and rally around that. I don’t believe this is likely but it would be imprudent to pretend it is not a possibility.

Conclusion

This post intended to address concerns raised by the community but also to hopefully contextualise how we got here and where exactly here is in terms of the overall migration process. Nothing is set in stone, and even an approved and implemented SIP can be rolled back if circumstances change. However, I strongly believe if we reach consensus on a SIP the entire community needs to commit if we want to help build the most viable network for scaling DeFi. I’m confident our community will achieve this, we are stronger than ever and have a huge amount to look forward to in 2021, not least of which is Synthetix running on a fully functional Optimistic Ethereum mainnet.


Kain Warwick

Kain Warwick

Kain is the founder of Synthetix.