Recently, the team behind Cardano-powered decentralized trading protocol SundaeSwap took a closer look at the hotly-anticipated Vasil upgrade (aka “Vasil hard fork”).
On 10 December 2021, Charles Hoskinson, Co-Founder and CEO of Input Output Global (“IOG”), the company responsible for Cardano’s research and development, explained that he was going to honour his Bulgarian friend and Cardano ambassador Vasil Stoyanov Davov — who sadly passed away in his apartment in Plovdiv, Bulgaria on 3 December 2021 “after a long combat with pulmonary embolism” — by naming the next hard fork after him. Vasil was an artist, entrepreneur, blockchain consultant, Haskell practioneer, and ginkgologist. Furthermore, it would not be an exaggeration to say that he was a highly beloved and respected member of the Cardano community.
Then, on June 6, IOG paid further tribute to Vasil by releasing a beautiful short video in which Tim Harrison, Vice President Community & Ecosystem at IOG, talked about Vasil’s legacy.
On July 20, the SundaeSwap team published a blog post that explained Cardano’s network upgrade process, how the Vasil upgrade would impact already deployed dApps, and how the Vasil upgrade would affect SundaeSwap.
Here is what they had to say about Cardano’s unique hard fork combinator (HFC) tehcnology:
“One core principle held by Cardano’s developers is in the importance of ‘smooth’ code updates. So they came up with an ingenious way of ‘softening’ the impact of hard forks on their chain and eliminating the ‘trauma’ associated with these on-chain events: the hard fork combinator (HFC). This piece of technology does exactly what it says on the tin: it combines two protocols into one single protocol. Cardano engineers refer to this as ‘sequential combination.’ In practice, following the forking event, the chain runs the original protocol for a time before switching over to the updated protocol.
“Herein lies the uniqueness of the HFC. Since block production does not stop, there is no break on the chain, leading to a smooth and graceful transition between protocols. As an analogy, think of the evolution of the Cardano blockchain as a relay race, with every hard fork representing the point when one runner hands the baton over to the next one. And for a few moments, both run in perfect synchrony, to ensure the baton handover goes smoothly. Then, the relay runner takes off. On Cardano, these events happen a few times a year, and so are often given specific names. The next one, happening soon, is the ‘Vasil’ hard fork.“
Next, they pointed out that “Vasil has been running on a testnet since 20:20 UTC on July 4,” and that it will “bring increased functionality, performance, scalability and interoperability to Cardano through several mechanisms, including diffusion pipelining and four Cardano Improvement Proposals (CIPs), CIP-31, CIP-32, CIP-33 and CIP-40.”
On July 4, Tim Harrison, VP of Community & Ecosystem at IOG, published a blog post in which he talked “the significant performance and capability enhancements to Cardano” that the Vasil upgrade (which he called “the most significant network upgrade since the deployment of staking via Shelley“) — expected to go live on the Cardano mainnet at the end of July — will deliver.
Harrison said:
“As well as bringing improvements to smart contracts, the upgrade is part of the Basho phase of the Cardano roadmap, which focuses on scaling and network & ledger optimization and will bring multiple improvements to the ledger. Vasil will be deployed at the protocol level using Cardano’s hard-fork combinator (HFC) – innovative technology which enacts seamless protocol transitions and ledger upgrades minimizing disruption for end-users…
“The upgrade… will implement widely anticipated features such as diffusion pipelining and upgrades to Plutus – Cardano’s core smart contract language. Many of the improvements have been scoped and developed with the support of the wider development community and stem from Cardano Improvement Proposals (CIPs). Additionally, a number of new cryptographic primitives will be provided, and script validation processes will further see adjustments and optimizations contributing to consistency in block propagation times and higher transaction processing rates.“
With regard to diffusion pipelining, he had this to say:
“In essence, it streamlines the process of sharing information about newly created blocks among network participants by ensuring that blocks can be shared (propagated) in the network well within five seconds after their creation. For this, diffusion pipelining propagates blocks before their full validation, thus ‘overlapping’ the time spent on diffusion with the time needed on validation.
“Pipelining also ensures that the block header referencing the hash of a previous block is propagated correctly. The body of the block is retained within the metadata included in the next block, which is essential for DDoS attack resistance even without full block confirmation. Ultimately, diffusion pipelining will add scalability by enabling further block size increases and Plutus script improvements, as IOG continues to optimize the network throughout the rest of the year.“
Harrison then went to talk about Plutus script enhancements as well miscellaneous other important enhancements, such as Script collateral adjustment (CIP-40).
The SundaeSwap team says that “following the update, Cardano will become more scalable and flexible for developers to create newer and better DApps to suit more use cases.” However, they also explained how the Vasil hard fork will affect existing dApps:
“One common question is how the hard fork and the new features it brings will impact already deployed dApps. The simple answer is that it won’t: the Cardano blockchain remains backwards compatible, and can still execute these transactions as before.
“The more nuanced answer is, of course, also the more interesting. First, while existing contracts will continue to work, they will be unable to make use of the new features: any transaction using a reference script or an inline datum, for example, must only include funds locked by a Plutus V2 script. This means that there’s no risk that these new features change the security guarantees of the old contracts, but also means that dApp developers will have to change their contracts to benefit. We anticipate this will likely require a new audit, for example.
“Additionally, while on-chain code is unaffected, many dApps work hand-in-hand with “off-chain” systems. These systems do things like construct transactions, or roll-up statistics about the global state of the dApp. The off-chain code of a dApp needs to be updated to recognize and correctly interpret the new post-hard-fork transaction formats. Depending on the dApp, this can be simple, or very complex, and often there are multiple organizations who have to coordinate. At SundaeSwap, we’ve been hard at work on this, and thought it might be interesting to outline some of this work and give a glimpse into what each dApp developer and ecosystem builder has likely been up to.“
As for how the Vasiul hard fork would affect SundaeSwap, the blog post mentioned that “on-chain contracts (the most security-sensitive area of the dApp) are unaffected,” but they had to update “some of the off-chain systems” (such as “‘Ogmigo’, their Go client library for reading from Ogmios to recognize the newly added fields”).
Also, the blog post pointed out that “while the currently deployed contracts can’t take advantage of the savings and scalability improvements,” the team is “already working on a new version of the contracts.”Although this work is still at an early stage,” it “includes some dramatic improvements and new ideas,” and is “designed to take full advantage of the Vasil features once they are finished, fully audited and released.”