Skip to content

fix: claim-all post-condition bounds by remaining escrow, not stale claimable - #23

Merged
jayteemoney merged 1 commit into
mainfrom
fix/claim-all-post-condition
Jul 13, 2026
Merged

fix: claim-all post-condition bounds by remaining escrow, not stale claimable#23
jayteemoney merged 1 commit into
mainfrom
fix/claim-all-post-condition

Conversation

@jayteemoney

Copy link
Copy Markdown
Owner

What

Claim All failed on-chain (abort_by_post_condition) on every active stream.

The deny-mode post-condition capped the contract's outflow at the claimable amount sampled at click time — but claim-all pays claimable at execution time, which is higher (accrual continues every ~5s block while the tx waits to mine). Stale bound < actual payout → chain aborts. Hidden until now because earlier claims ran against finished streams (no accrual).

Fix

Bound by remaining escrow (deposit − withdrawn): it never grows (only shrinks on claims), so it always covers the payout while still capping outflow at exactly what the stream holds — the same protection the audit fix (M-3) intended. Cancel already used this bound (matches the contract's total cancel outflow recipient-amount + sender-refund = deposit − withdrawn); partial claim passes an explicit amount and was never affected.

Verify

  • typecheck + webpack build clean
  • Preview-first: real-wallet Claim All on an active mainnet stream via the Vercel preview before merge

…claimable

claim-all pays out the claimable balance at execution time, but the
deny-mode post-condition capped the contract's outflow at the claimable
amount sampled when the button was clicked. Claimable grows every ~5s
block, so by the time the tx mined the payout exceeded the stale bound
and the chain aborted with abort_by_post_condition — on any active
stream, every time. It never surfaced before because earlier claims ran
against finished streams, where accrual had stopped.

Bound by remaining escrow (deposit − withdrawn) instead: it only
shrinks, so it always covers the payout, while still capping outflow at
what the stream actually holds — the protection M-3 intended. The
cancel flow already used this bound and matches the contract's total
outflow exactly; partial claim sends an explicit amount and was never
affected.
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
stackstream Ready Ready Preview, Comment Jul 13, 2026 5:12pm

@jayteemoney
jayteemoney merged commit 2fb5360 into main Jul 13, 2026
2 of 4 checks passed
@jayteemoney
jayteemoney deleted the fix/claim-all-post-condition branch July 13, 2026 17:57
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