Skip to content

L-01: Document that consumption operations and the owner unlock must … - #130

Open
haseebrabbani wants to merge 1 commit into
audit-m1-02-l05from
audit-m1-02-l01
Open

haseebrabbani wants to merge 1 commit into
audit-m1-02-l05from
audit-m1-02-l01

Conversation

@haseebrabbani

Copy link
Copy Markdown
Collaborator

Addresses #86 (L-01). Stacked on #116, base audit-m1-02-l05.

Docs only. The workflows credit the view a consumption operation returns, and holdingOwnerUnlockImpl never archives self. Neither can check that a holding left the ledger, because fetching an archived contract aborts.

  • HoldingOps doc and module trust boundary: fundHolding, deliverHolding and returnHolding must each archive the holding they receive, with a template-typed archive or a consuming choice, and the owner-unlock choice must be consuming. Breaking either creates tokens on transfers, allocations, settlements, returns and owner unlocks, counts a repeated input id once per occurrence, and makes a burn destroy nothing.
  • holdingOwnerUnlockImpl and debitHoldings point at the law.
  • token-cip112-utils README trust boundary lists the same two requirements.

Live-checked on a wall-clock sandbox: a compliant consumer keeps supply unchanged on every path, and a non-archiving operation or a nonconsuming unlock creates tokens. No CHANGELOG entry, since this is documentation only.

…archive the holding

The workflows credit the view a consumption operation returns and create
new holdings from it, and `holdingOwnerUnlockImpl` creates the unlocked
replacement without archiving the locked holding. Neither can check that
the holding left the ledger, since fetching an archived contract aborts.

State both laws in the `HoldingOps` doc comment, the module's trust
boundary, `holdingOwnerUnlockImpl`, `debitHoldings`, and the
`token-cip112-utils` README trust boundary: each consumption operation
must archive the holding it receives with a template-typed archive or a
consuming choice, and the owner-unlock choice must be consuming. Breaking
either creates tokens on transfers, allocations, settlements, returns and
owner unlocks, counts an input id repeated in one call once per
occurrence, and leaves a burn destroying nothing.
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.

1 participant