Skip to content

Correct the V2 protocol profile against the contract source - #12

Merged
armandocodecr merged 1 commit into
mainfrom
fix/v2-contract-audit-corrections
Sep 11, 2026
Merged

armandocodecr merged 1 commit into
mainfrom
fix/v2-contract-audit-corrections

Conversation

@armandocodecr

@armandocodecr armandocodecr commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes found by auditing skills/protocol/v2.md and constitution.md against the contract source on single-release-develop-v2 (bfa7df4) and multi-release-develop-v2 (1141b88). Documentation only; no contract code changes.

Corrections

The mutability lock is the cumulative funded amount, not the token balance. The profile said properties and roles can change "while the contract balance is zero". The contracts gate on FundedAmount, which every fund call increases and nothing ever decreases. So the first fund freezes properties, roles and milestone edits permanently — releasing does not unfreeze them — while tokens sent directly to the contract without fund do not trigger the lock at all. V1 checked the live balance, so this is a real behavioural difference between versions, and the profile now says so. Appending milestones also stays allowed after funding; only edits and property updates are blocked.

Manage milestones cannot remove. The profile said "add, edit or remove". There is no removal path: milestones can be appended, and edited (description in single-release; description and amount in multi-release).

Withdraw is a full sweep in V2. Distributions must sum to the entire remaining balance (DistributionsMustEqualEscrowBalance). V1 allowed partial withdrawals; the profile previously said the balance checks "match V1".

Dispute authority was under-documented. releaseSigners and platform can raise disputes — the contract authorizes approvers, service providers, release signers, the platform and the (milestone) receiver, and rejects dispute resolvers. The role table listed the authority only for approvers, service providers and the receiver.

One addition: a single-release escrow deployed without milestones cannot release (NoMilestoneDefined) until milestones are added — relevant now that V2 allows milestone-less deploys.

The constitution's compressed V2 section carries the same corrections.

The rest of the audit passed: the role model and its composition constraints, threshold approvals, the state model, resolver dispute-blocking, terminal withdraw states, the reentrancy guard, and the approve-and-release dual-role requirement all match the contract source as documented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f32ba030-3fc4-48ce-be84-544c7dc694dc


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@armandocodecr
armandocodecr merged commit f4ab5cd into main Sep 11, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants