Currently smart contracts in Cardano have no standard design pattern for upgradability which is problematic for DAOs or dApps in-testing. This proposal seeks to create a standard for upgradability of Cardano smart contracts.
The Solution
Smart contract upgradability is a key piece of functionality that all serious DeFi dApps require. Most smart contracts are immutable by default, meaning that once they have been created, they cannot be altered, effectively acting as an unbreakable contract among participants. However, some situations call for the modification of the smart contracts. For instance, one needs to modify smart contracts to add features, fix a bug or change its rules.
The EUTxO model poses unique problems for contract upgradability which do not exist in the account-based model. These issues have not been addressed in the Plutus ecosystem, and therefore, new smart contract developers are currently left with no alternative solution. With something as risky as upgrading contracts, using well known design patterns it is vital to ensure that developers do not make any obvious mistakes that will end up becoming major security issues.
To fix a bug in a contract that cannot be upgraded, one would need to deploy a new version of the contract, manually migrate all state from an old contract to the new one, update all contracts that interacted with the old contract to use the new address, reach out to all users to persuade them to start using the new deployment. This is quite a tedious exercise. To avoid this, there is a need to build contract upgrades while preserving their addresses, state and balance.
This proposal has been put forward by dcSpark, who will spend time researching and developing the required design patterns to safely implement dApp smart contract upgrading. The team will produce an example smart contract that show off how to implement upgrading, and also surrounding material to explain how the process works and how other developers can go about implementing it in their own dApps.
The Team
This proposal has been submitted by Robert Kornacki and Nicolas Arqueros, who are co-founders, CTO and CEO of dcSpark, a product based blockchain company focused on building critical products and solutions on top of the most promising crypto projects in the space. The team members are well-known ex-Emurgo and ex-IOHK employees who have been building the Cardano ecosystem for the past several years.
dcSpark is one of the most active project developers on Project Catalyst, having contributed to many other proposals in different categories. The team is also available for changes as well as to answer user questions. Their experience will play a huge role in the development of this project, as they know the challenges faced by Cardano users.
The team is requesting funding in the amount of $15,000 and expects that the proposal will be released publicly open source, on github, for anyone to benefit from Q1 2022. There is no further breakdown of the funds on how they will be used.
Final Thoughts
DAOs or dapps in testing need to constantly change smart contracts to either add new features or fix issues experienced during the testing phase. Without proper design patterns for upgradability, it would be tedious to manually migrate all states from an old contract to a new one as well as update all contracts in order to use the new one. This can dissuade developers as well as users from using the Cardano blockchain and opting for a platform that supports smart contract upgradability.
The proposal acknowledges that smart contract upgradability is a key piece of functionality required by all serious DeFi dapps. For Cardano to therefore attract DeFi projects, this upgrade will be essential. The project is led by experienced developers, who have knowledge on the Cardano ecosystem and have worked with renowned companies affiliated with Cardano. Therefore, users can expect the best from dcSpark.
Read the full proposal from dcSpark here.