Skip to content

feat(contracts): add coordinator rotation, reentrancy guard, balance invariants and upgradeability - #208

Merged
chiscookeke11 merged 2 commits into
Kaycee276:masterfrom
Junman140:feature/escrow-security-hardening
Aug 29, 2026
Merged

feat(contracts): add coordinator rotation, reentrancy guard, balance invariants and upgradeability#208
chiscookeke11 merged 2 commits into
Kaycee276:masterfrom
Junman140:feature/escrow-security-hardening

Conversation

@Junman140

@Junman140 Junman140 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements four contract enhancements to the Chesster Soroban escrow:

Also fixes pre-existing compile-blocking corruptions in lib.rs (malformed struct definitions / duplicate enum discriminant) and a corrupted test.rs tail, so the crate compiles and the full test suite passes.

Verification

  • cargo test -p escrow — all tests pass (41)
  • cargo fmt -- --check — clean
  • cargo clippy — zero warnings

Closes #100
Closes #102
Closes #103
Closes #104

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@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 Junman140 changed the title feat(contracts): Escrow security hardening — coordinator rotation, reentrancy guard, balance invariants, upgradeability feat(contracts): add coordinator rotation, reentrancy guard, balance invariants and upgradeability Aug 26, 2026
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

…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
Junman140 force-pushed the feature/escrow-security-hardening branch from de37fbf to 03f1eab Compare August 26, 2026 14:41
@chiscookeke11
chiscookeke11 merged commit 87fbad8 into Kaycee276:master Aug 29, 2026
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment