Scaling DeFi with Optimistic Rollups is not the best option, says Matter Labs CEO
Ethereum needs to scale with layer-two in the short-term, and ZK Rollups can pick up the slack.
Since Ethereum 2.0 is likely to take a few more years to begin increasing the throughput of the network, community focus is centering on layer-two solutions that could take some of the burden in the short-term.
Several solutions that support token transfers are already implemented live, including Matter Labs’ ZkSync and OMG Network’s Plasma. But the “holy grail” of layer two is generalized smart contract support, which would let DApps and DeFi move out of the increasingly costly blockchain. Both Plasma and ZK Rollups are traditionally considered to be lacking in that aspect, which is why community enthusiasm largely shifted in 2019 to the upcoming Optimistic Rollups, which would feature their own virtual machine with a generalized smart contract environment.
In a conversation with Cointelegraph, Matter Labs’ Alex Gluchowski said that a major breakthrough in enabling ZK Rollup smart contracts was achieved this year. Generalized smart contracts require the ability to create recursive zero knowledge proofs — essentially proofs of proofs — which previously were believed to be too expensive from a computational point of view.
Gluchowski said that Matter Labs demonstrated a live and practical example of recursive SNARKs on Ethereum’s Rinkeby testnet for Reddit’s scaling bake-off. “I think [community members] aren’t considering the breakthroughs in recursion achieved this year,” he added.
That seems to have blown the door wide open for smart contracts on ZK Rollups, with Gluchowski saying that it’s now “purely a question of engineering, there are no more fundamental problems left to solve.”
Matter Labs’ smart contracts would use a different language called Zinc, which Gluchowski said is very similar to Solidity, but it has some additional limitations on recursion and loop sizes. “In part this is even an advantage as it avoids Solidity bugs,” he said. “But anything that can be done on Vyper today can be ported one-to-one to Zinc.”
Vyper is an alternative language to Solidity that compromises on its feature richness to improve security. In Zinc’s case, however, the limitations come from the zero knowledge proofs, Gluchowski said.
With these advances, competition between smart contract-enabled rollups could get intense. Gluchowski believes that Optimistic Rollups have a series of disadvantages to them ranging from technical to crypto-economical.
“It’s unclear how successfully Optimistic Rollups will execute on their promise of 100% composability. We haven’t seen that so far as there are many hidden pitfalls there. The technology is not as simple as it may seem.”
But even if the promise of composability is kept to a meaningful extent, he added, the core mechanism of Optimistic Rollups may be a major deterrent to adoption.
Optimistic Rollups take their name from the idea that instead of verifying the correctness of each action, they are simply assumed to be valid by default. Users only need to submit “fraud proofs” if they see any mathematically verifiable misbehavior. But in order to give time for these proofs to be submitted, exiting the system requires a one week waiting period.
Gluchowski conceded that this issue could be fixed through liquidity providers who facilitate instant withdrawals for a fee. But he noted that they would need to match each order separately in a similar manner to decentralized exchanges using order books. Given that these traditionally lack in liquidity, a similar issue may be seen for fast withdrawals, he claimed.
“So by default we assume that withdrawals will take one week. That is very unpleasant since working with other systems [outside the Rollup] becomes inconvenient. On ZK Rollups, withdrawals take minutes.”
In the timeframe that Optimistic Rollups are released and tested, Gluchowski said that “we will certainly deploy smart contracts on ZK Rollups.” The race appears to be on to be the first scaling solution for DeFi smart contracts, which are currently some of the largest gas consumers.