feat(contracts): add coordinator rotation, reentrancy guard, balance invariants and upgradeability - #208
Merged
chiscookeke11 merged 2 commits intoAug 29, 2026
Conversation
|
@Junman140 is attempting to deploy a commit to the kaycee276's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Junman140 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! 🚀 |
…entrancy guard, balance invariants, upgradeability Implements four contract enhancements to the Chesster Soroban escrow: - Coordinator Key Rotation Protocol with Multi-Sig Approval (Kaycee276#100): dual authorized-signer approval required before the coordinator address is updated. Adds admin signer management and pending-rotation tracking. - Reentrancy Guard on critical escrow functions (Kaycee276#103): instance-storage lock prevents cross-contract re-entry during fund movements. - Contract Balance Invariant Assertions (Kaycee276#104): per-token escrowed balance tracking with assertions that the contract never holds less than its active wager obligations before/after resolution. - Contract Upgradeability Pattern (Kaycee276#102): coordinator-gated upgrade() using env.deployer().update_current_contract_wasm with a WASM hash. Also fixes pre-existing syntax errors in lib.rs (malformed struct definitions / duplicate enum discriminant) and a corrupted test.rs so the crate compiles and all tests pass. Closes Kaycee276#100 Closes Kaycee276#102 Closes Kaycee276#103 Closes Kaycee276#104
Junman140
force-pushed
the
feature/escrow-security-hardening
branch
from
August 26, 2026 14:41
de37fbf to
03f1eab
Compare
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
Implements four contract enhancements to the Chesster Soroban escrow:
propose_coordinator_rotation/approve_coordinator_rotationrequire two distinct authorized signers before the coordinator address updates. Adds admin-signer management and pending-rotation tracking.upgrade(new_wasm_hash)usingenv.deployer().update_current_contract_wasm.Also fixes pre-existing compile-blocking corruptions in
lib.rs(malformed struct definitions / duplicate enum discriminant) and a corruptedtest.rstail, so the crate compiles and the full test suite passes.Verification
cargo test -p escrow— all tests pass (41)cargo fmt -- --check— cleancargo clippy— zero warningsCloses #100
Closes #102
Closes #103
Closes #104