You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Store transfers: a negative min without members is accepted, so every signed-in user can mint #974
Severity: low (configuration footgun; the sum is still conserved). Found in an adversarial review of transfers (#926/#943).
Runtime revision and environment
origin/main ba9f3204, Node 26.10, macOS.
What happens
The docs describe a negative min only as an issuer on a members-gated transfer ("A negative min on a members-gated transfer is an issuer", README and schema description). Activation accepts a negative min with no members, so on an owned collection any signed-in principal can debit their own empty record below zero and credit anyone, i.e. mint credit (more with more records).
Minimal reproduction
transfers:
pay: { amount: balance, min: -500 } # no members
normalize('wallets', spec) → accepted (no error).
eve (no membership): POST /api/wallets/transfers/pay {from: <eve's new wallet>, to: <other>, amount: 500} → 200, eve's balance -500, recipient 500.
Root cause
packages/store/src/collection.tstransfersOf (≈line 604) checks min is a safe integer but not min < 0 && members === undefined.
Suggested fix
Refuse a negative min without members at activation (with a test), or document explicitly that it lets every caller mint.
Activity
fix(store): owner ids only to members; transfers independent of the r…