feat(contract): DAO force-cancel, bridge escape hatch, jump-rate curve, and rotation expiry cleanup - #887
Merged
Merged
Conversation
…mp-rate curve, and rotation expiry cleanup - Add governance-gated force_cancel_listing(listing_id) so the DAO can remove spam/malicious marketplace listings (tests: happy path + non-DAO caller rejection) - Add timelocked escape hatch for stranded bridge assets: 7-day challenge window + admin-signed clawback (tests: scenarios, Kani harness, SDK + docs) - Replace linear (utilisation / 50) interest model with configurable jump-rate curve (kink at 80% utilisation, 2x slope above kink) (tests: property tests around kink, SDK helpers, docs) - Fix pending admin key rotation expiry handling: expired requests are now pruned and audit-logged instead of left stale (tests: cargo test expiry case, Kani harness, doc note) Closes MettaChain#824, MettaChain#820, MettaChain#825, MettaChain#821
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR bundles four related contract hardening/feature items scoped for the current Stellar Wave cycle:
force_cancel_listing(listing_id)so the DAO can scrub spam/malicious marketplace listings without relying on the original lister.utilisation / 50linear model with a configurable kink curve (kink at 80% utilisation, 2x slope above kink), matching standard lending-market rate design.Changes
force_cancel_listinggovernance entrypoint with DAO-only auth check.cargo testexpiry case + Kani harness (rotation expiry).Why
Operational response and safety/UX gaps identified across governance, bridging, lending, and admin key management — bundled here since they touch overlapping contract state and test infrastructure.
Testing
cargo test(including new expiry and force-cancel cases)Closes #824
Closes #820
Closes #825
Closes #821