Skip to content

[NF-08] Add Emergency Unlock mode to vault_l3 - #133

Merged
wumibals merged 3 commits into
LadderMine:mainfrom
bellabuks:feat/nf-08-emergency-unlock-mode
Jul 18, 2026
Merged

[NF-08] Add Emergency Unlock mode to vault_l3#133
wumibals merged 3 commits into
LadderMine:mainfrom
bellabuks:feat/nf-08-emergency-unlock-mode

Conversation

@bellabuks

Copy link
Copy Markdown
Contributor

Summary

Adds a Guardian-gated Emergency Unlock mode to vault_l3 so depositors can exit locked positions fee-free during a declared incident, without waiting for maturity.

Changes

  • contracts/vault_l3/src/lib.rs: added DataKey::Guardian and DataKey::EmergencyUnlock (bool, default false)
  • initialize now accepts a guardian address
  • New set_emergency_unlock(active: bool) - Guardian-only toggle, independent of the NF-07 pause flag
  • New emergency_unlock() -> bool read-only view
  • early_exit: when EmergencyUnlock is active, skips the 0.5% fee and returns full principal
  • withdraw: when EmergencyUnlock is active, skips the LockNotExpired check
  • Balance and share accounting is unchanged in both paths
  • contracts/vault_l3/src/test.rs: updated setup() + 6 new tests covering all acceptance criteria

closes #83

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@bellabuks is attempting to deploy a commit to the wumibals' projects Team on Vercel.

A member of the Team first needs to authorize it.

@wumibals wumibals left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good

@wumibals
wumibals merged commit baa1ca4 into LadderMine:main Jul 18, 2026
3 of 4 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.

[NF-08] [CONTRACT] Emergency Unlock Mode

2 participants