25 acceptance criteria

Overview

These acceptance criteria define the "must pass" requirements for the platform. All features must meet these criteria before being considered complete.

Core Platform Rules

1

Cannot Mint Credit Units Beyond Cap

Requirement: Credit issuance must never exceed the governance-approved cap.

Implementation:

require(
    issued[tokenId] + amountUnits <= cap[tokenId],
    "Exceeds cap"
);

Test Cases:

  • ✅ Minting up to cap succeeds

  • ✅ Minting beyond cap fails

  • ✅ Multiple mints respect cumulative cap

  • ✅ Cap cannot be reduced below issued amount

Acceptance: All test cases pass.

2

Cannot Retire More Units Than Owned

Requirement: Users cannot retire more credits than they own.

Implementation:

require(
    balanceOf(msg.sender, tokenId) >= amountUnits,
    "Insufficient balance"
);

Test Cases:

  • ✅ Retiring owned amount succeeds

  • ✅ Retiring more than owned fails

  • ✅ Retiring after partial transfer respects balance

  • ✅ Retiring zero amount fails (or handled appropriately)

Acceptance: All test cases pass.

3

Credits Are Segregated Per Project

Requirement: Credits from Project A cannot be treated as Credits from Project B.

Implementation:

  • Credits use tokenId = ProjectRecord tokenId

  • Balances stored as balanceOf(user, tokenId)

  • Transfers between different tokenIds are separate operations

Test Cases:

  • ✅ Credits from tokenId 101 ≠ Credits from tokenId 102

  • ✅ Balance queries return correct tokenId-specific balances

  • ✅ Retirement affects only the specific tokenId

  • ✅ Transfers between tokenIds are separate (if enabled)

Acceptance: All test cases pass.

4

Project Cannot Be Issued Without PoAI Attached + Governance Approval

Requirement: No credits can be issued without PoAI verification and governance approval.

Implementation:

// In ProjectRegistry.mintProjectRecord()
require(poaiBundleHash != bytes32(0), "PoAI hash missing");

// In CarbonCredit1155.setProjectConfig()
require(
    projectRegistry.isPoAIApproved(tokenId),
    "PoAI not approved"
);

Test Cases:

  • ✅ ProjectRecord cannot be minted without PoAI hashes

  • ✅ Credits cannot be configured without PoAI approval

  • ✅ Credits cannot be minted without PoAI approval

  • ✅ PoAI approval check is enforced on-chain

Acceptance: All test cases pass.

5

Requirement: Every retirement must generate a certificate with on-chain proof reference.

Implementation:

  • Retirement emits CreditsRetired event

  • Indexer listens to event

  • Certificate service generates certificate

  • Certificate includes transaction hash and PoAI references

Test Cases:

  • ✅ Retirement event is emitted

  • ✅ Certificate is generated after retirement

  • ✅ Certificate includes transaction hash

  • ✅ Certificate includes PoAI proof hash reference

  • ✅ Certificate is downloadable (PDF + JSON)

Acceptance: All test cases pass.

6

Enterprise Can Buy Exact Decimals and Retire Exact Decimals

Requirement: Enterprises must be able to purchase and retire exact decimal quantities.

Implementation:

  • Fixed-point units (UNIT = 1e6 or 1e18)

  • UI converts tons to units for on-chain operations

  • UI converts units to tons for display

Test Cases:

  • ✅ Enterprise can purchase 12,437.62 tons (exact)

  • ✅ Enterprise can retire 12,437.62 tons (exact)

  • ✅ No rounding losses

  • ✅ Display shows exact decimals

Acceptance: All test cases pass.

7

Explorer/Audit View Can Trace Project Record → Issuance → Ownership → Retirement

Requirement: Complete audit trail from project to retirement must be traceable.

Implementation:

  • ProjectRecord stores project details and PoAI hashes

  • Credits reference ProjectRecord tokenId

  • Ownership tracked via balanceOf(user, tokenId)

  • Retirement events include project tokenId and user

Test Cases:

  • ✅ Can trace ProjectRecord → Credits issued

  • ✅ Can trace Credits issued → User ownership

  • ✅ Can trace User ownership → Retirement

  • ✅ All links include on-chain proof references

  • ✅ Audit view displays complete chain

Acceptance: All test cases pass.

PoAI Module Acceptance Criteria

1

PoAI-1: Project Cannot Move to On-Chain Mint Unless PoAI Approved

Requirement: PoAI case must be in APPROVED state with proof hashes before on-chain mint.

Test Cases:

  • ✅ Project with PoAI APPROVED can proceed to governance

  • ✅ Project with PoAI REJECTED cannot proceed

  • ✅ Project with PoAI PENDING cannot proceed

  • ✅ Project without PoAI proof hashes cannot proceed

Acceptance: All test cases pass.

2

PoAI-2: PoAI Module Must Provide Full Audit Trail

Requirement: Every PoAI decision must be logged with actor, action, and timestamp.

Test Cases:

  • ✅ All state transitions are logged

  • ✅ All checks are logged

  • ✅ All approvals/rejections are logged

  • ✅ Audit logs are accessible and exportable

Acceptance: All test cases pass.

3

Requirement: All PoAI checks must have evidence links.

Test Cases:

  • ✅ Each check has evidence URI

  • ✅ Evidence links are accessible

  • ✅ Evidence links are secure (access-controlled if needed)

Acceptance: All test cases pass.

4

PoAI-4: Revalidation Path Must Exist

Requirement: Expired PoAI cases must be able to be revalidated.

Test Cases:

  • ✅ EXPIRED → IN_REVIEW transition is possible

  • ✅ Revalidation follows same workflow as initial validation

  • ✅ Previous proof hashes are preserved

Acceptance: All test cases pass.

User Flow Acceptance Criteria

Retail Flow

Enterprise Flow

Project Owner Flow

PoAI Reviewer Flow

Governance Flow

Performance Acceptance Criteria

Response Times

Scalability

Security Acceptance Criteria

Smart Contract Security

Backend Security

Frontend Security

Compliance Acceptance Criteria

Transfer Policy

KYC/AML (If Required)

Documentation Acceptance Criteria

Last updated