Skip to content

fix: UV - fund migration vote races on balance re-query#248

Merged
Aman035 merged 2 commits into
audit-fixesfrom
F-2026-16962
May 21, 2026
Merged

fix: UV - fund migration vote races on balance re-query#248
Aman035 merged 2 commits into
audit-fixesfrom
F-2026-16962

Conversation

@Aman035
Copy link
Copy Markdown
Member

@Aman035 Aman035 commented May 21, 2026

Summary

Brings PR #209 (fix: Fund migration vote) onto audit-fixes for audit review.

The migration sweep amount is computed at signing time from the old vault's balance, but the broadcast path was re-querying the balance — racing with another validator's successful sweep would produce a different sweep amount and a different signed tx hash, so the vote would never reach quorum.

Changes

  • UnsignedSigningReq (universalClient/chains/common/types.go): add TSSFundMigrationAmount carried alongside Nonce from signing to broadcast (both are signing-time-decided values that must reach broadcast unchanged).
  • EVM tx_builder: store maxTransfer in the signing request; broadcast reuses it verbatim instead of recomputing from a re-queried balance.
  • sessionmanager: persist and forward TSSFundMigrationAmount through the signing session (+ tests).
  • txbroadcaster: pass the stored amount through to the broadcast call (+ tests).

Origin

Cherry-picked from squash-merge commit e9c68675 on main (PR #209). Fixes the same race surfaced by issue #208.

Test plan

  • go build ./... clean
  • go test ./universalClient/tss/sessionmanager/... ./universalClient/tss/txbroadcaster/... ./universalClient/chains/evm/... — all pass locally
  • CI green on the PR

Aman035 added 2 commits May 21, 2026 16:53
Brings PR #209 (pushchain/push-chain-node) onto audit-fixes for audit
review.

The migration sweep amount is computed at signing time from the old
vault's balance, but the broadcast path was re-querying the balance —
racing with another validator's successful sweep would produce a
different sweep amount and a different signed tx hash.

- UnsignedSigningReq: add TSSFundMigrationAmount carried alongside Nonce
  from signing to broadcast (both are signing-time-decided values that
  must reach broadcast unchanged)
- EVM tx_builder: store maxTransfer in the signing request; broadcast
  reuses it verbatim instead of recomputing
- sessionmanager: persist and forward TSSFundMigrationAmount through
  the signing session
- txbroadcaster: pass the stored amount to the broadcast call
@Aman035 Aman035 changed the title F-2026-16962 | fund migration vote races on balance re-query fix: UV - fund migration vote races on balance re-query May 21, 2026
@Aman035 Aman035 merged commit 58ed01b into audit-fixes May 21, 2026
4 of 5 checks passed
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