Skip to content

fix(chain): harden transfer IDs, repurchase remainder, and seed minting - #269

Merged
ThatAlexPalmer merged 3 commits into
mainfrom
fix/pashov-audit-high-impact
Aug 22, 2026
Merged

fix(chain): harden transfer IDs, repurchase remainder, and seed minting#269
ThatAlexPalmer merged 3 commits into
mainfrom
fix/pashov-audit-high-impact

Conversation

@ThatAlexPalmer

@ThatAlexPalmer ThatAlexPalmer commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

Closes the three confirmed high-impact Pashov findings without changing proxy storage layout.

  • Multi-lot transferStock salts issuance and security ids with an in-memory issuanceOrdinal so FIFO legs no longer collide.
  • Partial repurchaseStock writes the remainder certificate into balance_security_id (bytes16(0) on a full buyback).
  • mintSharesAuthorized / mintActivePositions are one-shot and must agree: every current stock class, issued ≤ authorized, live lots match issued counters.

Invariant handler now transfers, repurchases, cancels, retracts, and reissues. Contract comments are interface NatSpec (spell onchain). Docs record the ledger rules and that a solc 0.8.36 bump is a separate PR (rebuild, storage-layout diff, new impl, beacon upgrade, re-verify).

Closes #268.

Test plan

  • forge test --no-match-contract CapTableInvariants
  • forge test --match-contract CapTableInvariants (256 runs, 0 handler reverts)
  • Reviewers: confirm ordinal uniqueness on self-transfer and that seed.js still matches the complete-class seed requirement

Close the Pashov high-impact gaps without changing proxy storage layout:
multi-lot transfers salt issuance/security ids with an in-memory ordinal,
partial repurchases store the remainder certificate in balance_security_id,
and manifest seed is one-shot with issued counters matching live holdings.

Invariant handler now transfers, repurchases, cancels, retracts, and
reissues. Contract comments follow interface NatSpec (onchain spelling).
Document transfer ordinals, repurchase remainder ids, one-shot seed,
invariant handler coverage, onchain comment style, and that a compiler
bump is a separate PR (rebuild, layout diff, beacon upgrade, re-verify).
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Aug 22, 2026 9:35pm
tap-cap-table-app Ignored Ignored Preview Aug 22, 2026 9:35pm

Request Review

Exclude Foundry deps without skipping TAP libraries. Report is 1 High
(false-positive unique-id keccak) and 9 Low; document accepted findings.
@ThatAlexPalmer
ThatAlexPalmer merged commit 5bea590 into main Aug 22, 2026
6 checks passed
@ThatAlexPalmer
ThatAlexPalmer deleted the fix/pashov-audit-high-impact branch August 22, 2026 21:37
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.

audit(pashov-ai-skills): harden transfer IDs, repurchase remainder, and seed minting

1 participant