Skip to content

Track locker-side PUSH reversals and block untracked recovery#23

Open
Zartaj0 wants to merge 1 commit into
mainfrom
fix-recovery-tracking
Open

Track locker-side PUSH reversals and block untracked recovery#23
Zartaj0 wants to merge 1 commit into
mainfrom
fix-recovery-tracking

Conversation

@Zartaj0

@Zartaj0 Zartaj0 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

This PR fixes the locker-side accounting gap where PUSH could leave MigrationLocker without being reflected in the off-chain claim builder.

Changes

  • track locked balance per sender + recipient + epoch
  • add Unlocked(sender, recipient, amount, epoch)
  • add refundLockedFunds(...) to return PUSH to the original sender through an explicit tracked path
  • block recoverFunds(PUSH_TOKEN, ...)
  • update the single-locker event builder to generate claims from Locked - Unlocked
  • update deployment/init flows to pass refundsEnabled

Scope

  • no change to MigrationRelease
  • no change to Merkle leaf format
  • no change to release-side claim flow

- Add lockedBySenderRecipientEpoch to track net claimable balance per
  sender/recipient/epoch so refunds can be validated against real deposits
- Add refundLockedFunds (onlyOwner) to return PUSH to original sender
  and emit Unlocked event, decrementing the tracked balance
- Block recoverFunds(PUSH_TOKEN, ...) to prevent invisible PUSH outflow
  that would silently break the off-chain balance-delta validation
- Add refundsEnabled flag at initialize time so refund capability is
  explicit and per-instance
- Update event builder to fetch and net Unlocked events against Locked
  events by sender/recipient/epoch before producing the claims file
@Zartaj0 Zartaj0 requested a review from zaryab2000 June 30, 2026 19:21
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