Skip to content
Code with Hou

Smart Contracts Development Process

Smart contracts are digital contracts that can validate the conditions of a legal contract between two or more parties and automatically trigger a transaction when a condition is met. Because they require no third-party intermediation, they can potentially help businesses save money. Transactions on the public blockchain are transparent and visible to anyone, and once deployed, smart contracts operate autonomously and independently.

Smart contracts development typically follows the industry Software Development Life Cycle (SDLC) framework but with some additional tasks that are specific for smart contracts. The process generally consists of the following stages:

  • Stage 1: Smart Contracts Requirement Gathering and Analysis
  • Stage 2: Smart Contracts Design
  • Stage 3: Smart Contracts Development
  • Stage 4: Smart Contracts Testing/Audit
  • Stage 5: Smart Contracts Deployment
  • Stage 6: Smart Contracts Maintenance

The remainder of this page provides more information on each stage.

Please note that the process/deliverables listed here may be adapted and thus different for each specific client engagement.

Stage 1: Smart Contracts Requirement Gathering and Analysis

The goal of Stage 1 is to assess the requirements for the smart contract system and to align the team on the specific problems the system should address.

Stage 1 Objectives

Stage 1 objectives may include, but are not limited to:

  • Gathering stakeholder feedback on the smart contracts system
  • Identifying the business logic and use cases to be automated with smart contracts
  • Evaluating the appropriateness of smart contracts/blockchain technology for the identified business use cases
  • Defining the smart contracts system goals, objectives, and high-level scope
  • Researching the market for audited, open-source smart contracts that could be customized to satisfy identified business use cases

Stage 1 Deliverables

Stage 1 deliverables may include, but are not limited to:

  • Non-Disclosure Agreement (NDA)
  • Smart Contracts Requirement Document, which describes the specific use cases and a technical design proposal for the smart contract system

Stage 2: Smart Contracts Design

The goal of Stage 2 is to design a well-architected and robust smart contract system to address the problem at hand.

Stage 2 Objectives

Stage 2 objectives may include, but are not limited to:

  • Creating epics and user stories for the proposed smart contract system
  • Translating user stories for each smart contract into associated tests
  • Developing Unified Modeling Language (UML) diagrams to visualize the smart contract system and to model behavior and structures in the smart contracts
  • Architecting the smart contract system based on requirements
  • Researching smart contract architecture best practices, common patterns, style guide, security tools, smart contract risks, gas optimization, and upgrade strategies
  • Planning sprints, delivery milestones, and a rollout execution strategy

Stage 2 Deliverables

Stage 2 deliverables may include, but are not limited to:

  • Smart Contracts Technical Design Document, which would typically include
    • epics and user stories,
    • UML diagrams,
    • system blueprints (i.e., platform, database, supporting frameworks, third-party libraries),
    • scalability and security requirements for the smart contract system, and
    • risk mitigation strategies

UML diagrams may include:

  • class or data model diagrams that illustrate the smart contracts' attributes, operations and how they are related to each other within the system
  • state diagrams that describe the possible states for an asset and show transitions from one state to another during the asset's lifecycle
  • activity diagrams that capture how actors within a system interact with one another and the flow of one activity to another
  • sequence diagrams that visualize the integration between objects in the sequence

Stage 3: Smart Contracts Development

The goal of Stage 3 is to translate the smart contract technical design into source code.

Stage 3 Objectives

Stage 3 objectives may include, but are not limited to:

  • Setting up and optimizing the dev team's development environment (e.g., installing and applying any automated smart contract security analysis and linting tools)
  • Developing the smart contract code using the chosen platform (e.g., Solidity/Ethereum, Rust/NEAR, Clarity/Stacks, etc.), which may involve writing unit tests for each smart contract, testing the smart contract system on local blockchains if possible, and optimizing the code for security, gas, and performance
  • Integrating the smart contract system with a web front-end (in the test environment), which may involve implementing a hot, cold, or multi-sig wallet solution; configuring layer one blockchain connections; building out a web front-end; and connecting the front-end to an indexing protocol (e.g., The Graph)
  • Writing documentation (e.g., user guides, troubleshooting guides, FAQ's, video tutorials)
  • Deploying the smart contracts system to a public test environment

Stage 3 Deliverables

Stage 3 deliverables may include, but are not limited to:

  • Unaudited smart contracts source code and associated tests
  • Smart contracts documentation
  • Deployment to a public test network

Stage 4: Smart Contracts Testing/Audit

The goal of Stage 4 is to ensure that the smart contract system is free from bugs, vulnerabilities, and security breaches.

Testing is a crucial part of the process to identify and fix any code exploits, as any bug in the contract can potentially lead to loss of resources or worse, customers’ funds, as well as to the loss of reputation. Smart contract validation may involve applying techniques such as fuzzing, automated code scans, static analysis as well as expert reviews by experienced auditors.

Stage 4 Objectives

Stage 4 objectives may include, but are not limited to:

  • Testing the deployed smart contracts system
  • Validating the smart contracts using an external smart contract security auditing service (e.g., Diligence)
  • Offering a bug bounty program to the community
  • Fixing any vulnerabilities or issues identified during the testing or audit

Stage 4 Deliverables

Stage 4 deliverables may include, but are not limited to:

  • Smart Contracts Audit Report
  • Audited/validated smart contracts system
  • Smart Contracts Approval & Sign-Offs

Stage 5: Smart Contracts Deployment

The goal of Stage 5 is to deploy the audited smart contract system to production

Keep in mind that due to the immutable nature of a blockchain, a deployed smart contract cannot be edited.

Stage 5 Objectives

Stage 5 objectives may include, but are not limited to:

  • Deploying the smart contracts system to the production environment
  • Setting up event monitoring to be notified of real-time changes in the system
  • Integrating the deployed smart contracts with the production front-end
  • Executing the rollout strategy

Stage 5 Deliverables

Stage 5 deliverables may include, but are not limited to:

  • Deployment to a production network
  • Event monitoring dashboards
  • Rollout execution

Stage 6: Smart Contracts Maintenance

The goal of Stage 6 is to ensure that the smart contract system continues to work as expected in a secure way for end users.

Stage 6 Objectives

Stage 6 objectives may include, but are not limited to:

  • Gathering stakeholder feedback on the smart contracts system
  • Performing ongoing smart contracts operations, administration, and monitoring
  • Prioritizing the product backlog, including smart contracts upgrades proposals

Stage 6 Deliverables

Stage 6 deliverables may include, but are not limited to:

  • Smart Contracts Maintenance Report
  • Smart Contracts Upgrades Proposal
  • Smart Contracts Incident Reports/Change Requests