Skip to content

feat: admin migrate_developer_balance with timelock#546

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Songu3020:Add-admin-migrate-developer-balance-escape-hatch-with-timelock
Jun 27, 2026
Merged

feat: admin migrate_developer_balance with timelock#546
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Songu3020:Add-admin-migrate-developer-balance-escape-hatch-with-timelock

Conversation

@Songu3020

Copy link
Copy Markdown
Contributor

closes #494

Summary
Adds an admin-only, timelocked workflow for migrating a developer’s settlement balance to a replacement address for compliance recovery.
Changes
Added propose_balance_migration and execute_balance_migration.
Enforced a fixed 24-hour timelock.
Required current admin authorization at both stages, preserving Stellar multisig thresholds.
Snapshotted the approved balance to prevent later credits from being swept unintentionally.
Added checked arithmetic, atomic state updates, and replay prevention.
Added admin_migration_proposed and admin_migration audit events.
Added pending-migration query support.
Documented the workflow, errors, interface, and security semantics.
Restored missing settlement broadcast definitions and repaired stale settlement tests required for compilation.
Security Considerations
Source and destination must differ.
The settlement contract cannot be the destination.
Empty balances cannot be proposed.
Destination overflow safely reverts.
If the approved balance is spent before execution, migration fails without partial writes.
Re-proposing restarts the complete timelock.
Successful execution consumes the proposal.
Testing
✅ 12/12 migration tests pass.
✅ cargo check -p callora-settlement --lib
✅ Settlement release WASM builds successfully.
✅ WASM size: 59,515 bytes, below the 64 KiB limit.
✅ Interface JSON and changed-file formatting validated.
⚠️ Full settlement suite: 146 passed, 3 unrelated pre-existing failures.
⚠️ Workspace tests are blocked by pre-existing vault compilation errors.
⚠️ Clippy and coverage could not run because the installed toolchain reports those components as unavailable/inapplicable.
Commit
feat: admin migrate_developer_balance with timelock

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Songu3020 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me greatest0fallt1me merged commit baa2183 into CalloraOrg:main Jun 27, 2026
0 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.

Add admin migrate_developer_balance escape hatch with timelock

2 participants