Published
- 7 min read
SOQ paln
This solution balances security, transparency, and cost-effectiveness, making it easy for both developers and end users to understand the structure and interactions.
1. Entities and Permissions
The following table defines each entity type, its role in the system, and the permissions assigned to ensure secure, controlled access across the platform.
Entity Type | Description | Permissions | On-Chain Data | Off-Chain Data |
---|---|---|---|---|
User | Represents individual users with different roles (e.g., Admin, Project Manager, Contractor). | Can create or manage projects (Admins), submit RTS/RFP, and view project details (based on role). | User ID, role, permissions metadata (e.g., admin or contractor). | User profile details (contact info, team affiliation). |
Project | Each construction or project-based work initiative, with its own budget and objectives. | Project managers can create/manage projects, issue RFPs, approve RTS, and oversee escrow. | Project ID, basic metadata (name, budget cap), links to other entities. | Full project descriptions, timelines, attached documents, and detailed budget breakdown. |
Contractor | Service providers bidding on or completing project work, issuing RTS for payments. | Can respond to RFPs, submit RTS, view relevant project details, and participate in escrow milestones. | Contractor ID, linked project ID, RFP/RTS references. | Proposal details, itemized costs, contact information. |
Vendor | Suppliers providing materials or equipment for projects. | Can issue RTS for material/equipment sales, participate in escrow, and manage invoices. | Vendor ID, linked project ID, RTS references. | Product catalogs, prices, itemized sales invoices. |
Safety Officer | Ensures compliance with safety protocols on construction sites. | Can submit safety checklists, upload compliance reports, and request adjustments if needed. | Safety record references, linked project ID. | Safety checklist details, compliance documentation. |
2. Core Actions and Transactions
This table details each major action within the system, specifying the entity permissions, on-chain/off-chain data requirements, and the cost-effectiveness strategy.
Action/Transaction | Description | Involved Entities | Permissions Required | On-Chain Data | Off-Chain Data |
---|---|---|---|---|---|
Create User Entity | Registers a new user in the system, assigning a unique ID and permissions. | User | Admins can create users. | User ID, role/permissions. | Full profile details (contact, department, etc.). |
Create Project | Initializes a new project with basic metadata, budget, and assigned team members. | Project, User | Only Admins or Project Managers. | Project ID, basic metadata (name, budget cap). | Detailed descriptions, timelines, supporting documents. |
Issue RFP | Project entity issues RFP for specific tasks, inviting bids from contractors. | Project, Contractor | Only Project Managers can issue RFPs. | RFP ID, project link, high-level requirements. | Full proposal details, itemized budgets, attached documents. |
Submit Proposal | Contractors respond to an RFP with bids that include timelines, cost estimates, and resources needed. | Contractor, Project | Contractors with valid permissions. | RFP response reference, contractor ID. | Proposal breakdown (itemized costs, timeline, resource details). |
Approve and Select Proposal | Project Manager reviews and approves selected proposals, which becomes part of the project contract. | Project, Contractor | Project Manager approval required. | Approved proposal reference, project link, contractor ID. | Full proposal details stored off-chain with link to on-chain reference. |
Set Up Escrow for Project | Establishes escrow funds for milestone-based payments based on the approved proposal terms. | Project, Contractor/Vendor | Admin or Project Manager required to initiate escrow. | Escrow ID, linked project, milestone breakdown, fund status. | Supporting documents for milestones (e.g., contract terms, media proof). |
Create RTS (Request to Sell) | Contractors or Vendors issue an RTS for completed work, materials, or services delivered for the project. | Contractor, Vendor, Project | Contractors/Vendors issue RTS; Project Manager approves. | RTS ID, project link, high-level payment request (amount, due date, status). | Detailed RTS breakdown, supporting documents (invoices, receipts). |
Approve RTS and Release Payment | Project Manager reviews RTS, approves, and initiates the release of escrow funds for milestone completion. | Project, Contractor/Vendor | Project Manager approval required. | Approved RTS ID, escrow release status, milestone confirmation. | Off-chain documentation for milestone completion, including media. |
Submit Variation Request | Contractors or project managers submit variation requests to adjust project scope, budget, or resources due to changes. | Contractor, Project | Contractors can submit; Project Managers approve. | Variation ID, project link, adjustment status (approved/rejected), cost adjustment. | Full description and justification for the variation request. |
Safety Compliance Submission | Safety Officer completes safety checks, submits compliance data, and requests adjustments if needed. | Project, Safety Officer | Safety Officers submit compliance data. | Safety checklist reference, linked project ID. | Detailed checklist items, compliance documentation, inspection reports. |
Log Daily Activity and Site Updates | Project team logs daily activities, including progress updates, issues, and environmental conditions. | Project, Contractor | Accessible to all assigned team members. | - | Daily logs, conditions, crew size, tasks completed. |
Project Milestone Completion | Project milestones are marked as complete, triggering payment or fund release from escrow. | Project, Contractor | Project Manager marks completion. | Milestone ID, linked project, completion status, escrow release trigger. | Documentation of milestone achievement, photos/videos of work. |
Final Project Closure | Concludes the project, releasing final payments, generating audit summaries, and archiving the project on-chain. | Project, Contractors, Vendors | Project Manager finalizes closure. | Project completion status, final payment details, total budget used, contractor rating. | Full closure report, final budget breakdown, all project documentation. |
3. On-Chain vs Off-Chain Data Summary
The following table provides a high-level summary of data categories and where they are stored, helping to maintain a secure and cost-effective system.
Data Category | On-Chain | Off-Chain | Reasoning |
---|---|---|---|
User Data | User ID, role, permissions metadata. | Detailed profile information. | Secure role-based access control on-chain, while detailed profiles are off-chain to reduce costs. |
Project Metadata | Project ID, budget cap, linked entities (e.g., contractor, vendor IDs). | Full descriptions, timelines, supporting documents. | Basic project data on-chain provides transparency, while descriptions remain flexible and off-chain. |
RFP and Proposal References | RFP ID, project link, selected proposal reference. | Full proposals with itemized costs, timeline, attached documents. | Ensures a transparent record of RFP issuance without high storage costs for proposals. |
RTS Payment Requests | RTS ID, project link, high-level payment info (amount, status). | Detailed RTS breakdown, invoices, receipts. | High-level payment requests on-chain for accountability; breakdowns stored off-chain for cost savings. |
Escrow and Milestone Data | Escrow ID, milestone references, fund status, release approvals. | Supporting milestone documents, media proof. | Critical financial data on-chain for security; proof-of-completion documents off-chain. |
Variation Requests | Variation ID, project link, status (approved/rejected), cost adjustment (if significant). | Detailed justifications, cost estimates, impact on schedule. | Only approved significant variations on-chain; other details off-chain to save costs. |
Safety Compliance and Daily Logs | Compliance status references, milestone approvals if related to safety compliance. | Daily log entries, detailed safety checklists, compliance documentation. | Safety completion tied to milestone payments is on-chain, while daily logs and checklists are off-chain. |
Project Completion Summary | Project completion status, final payments, overall budget usage, contractor rating. | Detailed closure report, budget breakdown, attached documentation. | Basic summary on-chain provides transparency; full project history remains off-chain for cost efficiency. |
**4. Developer and
User Guidelines for Cost-Efficiency**
The following considerations provide guidance for developers and users to maintain a cost-effective, secure hybrid solution:
- Minimize On-Chain Transactions:
- Only store critical transactions (such as project creation, RFP issuance, RTS approval, escrow releases) on-chain.
- Avoid frequent updates on-chain by keeping dynamic data (e.g., daily logs, safety checklists) off-chain.
- Use Decentralized Storage for Off-Chain Data:
- Employ a decentralized file storage solution (e.g., IPFS or Arweave) for documents and media attachments linked to milestones or compliance.
- Store large or non-essential data off-chain, linking it with hashes to verify integrity without the cost of on-chain storage.
- Automate Data Syncing:
- Use APIs or data-sync mechanisms to maintain consistency between on-chain and off-chain data, ensuring that on-chain actions link to up-to-date off-chain details.
- Automate milestones, RFP, and RTS status updates, making it easy to reflect changes on-chain only when necessary.
- Role-Based Access and Permissions:
- Set clear permissions on-chain to control who can create projects, issue RFPs, or approve payments, ensuring accountability without frequent access changes.
- Use smart contracts to enforce permissions on high-value transactions like escrow releases and milestone approvals, improving security and transparency.
- Optimize Milestone-Based Escrow:
- Define milestones with clear completion criteria that trigger escrow releases only after verified achievements, minimizing the number of on-chain transactions.
- Link milestone verification off-chain (e.g., media uploads as proof of completion) while only storing completion status on-chain.
Final Summary
This hybrid architecture efficiently balances on-chain security with off-chain flexibility, providing a scalable and cost-effective solution for managing complex SOQ-based workflows:
- On-Chain: Key transactions, permissions, and financial data that require trust and transparency.
- Off-Chain: Large, frequently updated, or detailed data that does not require immutability, reducing costs while maintaining scalability.
By following these guidelines, the SOQ system will be secure, transparent, and cost-efficient, suitable for real-world applications where both financial accountability and operational flexibility are essential. This structure serves as the next level of decentralized project and resource management, benefiting both software developers in terms of implementation and users in terms of cost savings and ease of use.