Smart Contracts

The smart contracts are the core of CollabraChain, acting as the autonomous, on-chain backend. Deployed on the Base mainnet, they enforce the rules of every agreement, manage funds, and issue credentials without the need for a central intermediary.

Core Contract Architecture

Our on-chain logic is divided into three main contracts:

1. Project Factory (CollabraChainProjectFactory.sol)

This contract acts as a central registry and deployment engine. Its sole purpose is to create new, unique Project contracts for each collaboration. This pattern ensures that each project's logic and funds are securely isolated from one another.

2. Project Contract (CollabraChainProject.sol)

Each time a new project is created, the Factory deploys a unique instance of this contract. This is the contract that manages the entire lifecycle of a single project.

  • Holds funds securely in an escrow.

  • Tracks the status of each milestone (e.g., Active, Pending Approval, Complete).

  • Processes payments by releasing funds to collaborators upon approval.

  • Calls the Reputation contract to mint credentials upon final completion.

3. Reputation Contract (CollabraChainReputation.sol)

This contract is responsible for creating the on-chain record of achievement. It's an ERC-721 contract that mints Soul-Bound Tokens (SBTs)—a special type of non-transferable NFT. Each SBT represents a successfully completed project for a collaborator.

Example On-Chain Transactions

For a complete look at the code, please visit the Smart Contracts repository.

Last updated