Smart Contract Deployment Proposal
Babylon Genesis will initiate with a permissioned phase, allowing only approved smart contract code to be uploaded, and only whitelisted developer accounts to deploy smart contracts on the mainnet. This temporary measure is crucial for maintaining the integrity of the Babylon Bitcoin Staking Protocol, which protects billions of dollars in assets. It provides the necessary time for the Babylon Genesis network to stabilize, address any bugs, and implement security enhancements following audits.
Overview of the Process
Anyone wishing to deploy a CosmWasm smart contract must first initiate a forum discussion to facilitate community dialogue and submit an on-chain proposal.
Two preferred methods for deploying a smart contract to the Babylon Genesis chain are Code Upload and Account Whitelisting.
Code Upload Method
This method enables developers to request the upload of smart contract code from a governance address that has already been whitelisted. Upon approval, the governance account will automatically execute the code upload. The specific proposal type for this process is /cosmwasm.wasm.v1.MsgStoreCode
.
This approach is particularly well-suited for smart contracts that do not necessitate frequent updates or upgrades, thereby minimizing the risks and potential abuses associated with whitelisted accounts.
Account Whitelisting Method
The Account Whitelisting Method enables the inclusion of BABY accounts, which are usually restricted to a single address, allowing for the uploading and updating of smart contracts. This proposal entails modifying a parameter to add a new BABY address to the Addresses
array within the CosmWasm module parameters. Once approved, this parameter will be deployed automatically, facilitating developers in the seamless deployment of their CW contracts. The specific type of proposal associated with this method is /MsgAddCodeUploadParamsAddresses
.
This approach is ideal for large and complex projects that require a certain level of flexibility for software upgrades and patches. It is important to note that this method typically invites a more thorough review from the community.
A code repository, which includes a local deployment demonstration of this process, is available here.
Before You Submit
Before initiating a forum discussion, ensure you meet the following prerequisites:
- Your smart contract is deployed and tested on the testnet.
- A security audit has been completed and is available for review.
- Your smart contract is open-source (to ensure transparency and build trust within the community).
- You have confirmed funding for the deposit or secured a commitment from the community to contribute to the deposit.
Discuss and Submit
Once your proposal is prepared, you will need to present it for structured discussion at the Babylon Foundation Governance Forum at forum.babylon.foundation(public release soon). After a week, you can choose to submit an on-chain proposal via CLI or Web.