Skip to content

Bundled fixes: guardian multi-sig recovery + multi-asset reserves (#1153, #1152) - #1202

Merged
ONEONUORA merged 2 commits into
Fracverse:masterfrom
favvy994:feature/bundled-guardian-multisig-and-multi-asset-reserve
Aug 31, 2026
Merged

Bundled fixes: guardian multi-sig recovery + multi-asset reserves (#1153, #1152)#1202
ONEONUORA merged 2 commits into
Fracverse:masterfrom
favvy994:feature/bundled-guardian-multisig-and-multi-asset-reserve

Conversation

@favvy994

Copy link
Copy Markdown
Contributor

Summary

Bundles fixes for both issues assigned to me into a single PR.

#1153 — Contract: Implement Guardian Multi-Sig Emergency Plan Recovery

  • Owners can now register up to 5 guardian addresses during plan creation via CreateInheritancePlanParams.guardians / guardian_threshold.
  • Implemented guardian_emergency_trigger which enforces the registered quorum threshold (each guardian signature is cryptographically validated at the ledger layer via require_auth), then triggers the plan's inheritance recovery flow (freezes loans, unlocks payout) mirroring trigger_inheritance.
  • Guardians continue to be grantable/updatable through the existing set_guardians.

#1152 — Contract: Implement Multi-Asset Reserve Management in Lending Contract

  • Added per-token ReserveConfig tracking (XLM, USDC, EURC, ...) with isolated ltv_bps, liquidation_threshold_bps, total_borrowed and total_collateral.
  • Implemented add_reserve (admin) which registers a reserve and whitelists the token as collateral, plus get_reserve_config query.
  • Reserve borrow/collateral tallies are updated on borrow and repay.

Validation

  • cargo build -p inheritance-contract, cargo clippy -p inheritance-contract, cargo fmt --check: pass
  • cargo build -p lending-contract, cargo clippy -p lending-contract, cargo fmt --check: pass
  • cargo test -p lending-contract: 136 passed
  • (Test snapshot JSON drift observed during runs was unrelated to these issues and was reverted rather than committed.)

Closes #1153
Closes #1152

Allow owners to register up to 5 guardians during plan creation and add
guardian_emergency_trigger, which enforces the configured quorum threshold
and triggers plan recovery when guardians collectively authorize it.

Refs Fracverse#1153
Add per-token reserves (XLM, USDC, EURC, ...) with isolated LTV, liquidation
threshold, total_borrowed and total_collateral tracking. add_reserve registers
a reserve and whitelists the token as collateral; reserve tallies are updated
on borrow and repay.

Refs Fracverse#1152
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@favvy994 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

@ONEONUORA ONEONUORA 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.

Great job @favvy994

@ONEONUORA
ONEONUORA merged commit be0626a into Fracverse:master Aug 31, 2026
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.

Contract: Implement Guardian Multi-Sig Emergency Plan Recovery Method Contract: Implement Multi-Asset Reserve Management in Lending Contract

2 participants