You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expire and protect pending emergency drain proposals #1160
propose_emergency_drain overwrites any existing PendingEmergencyDrain silently, and proposals never expire once execute_after passes.
Why this matters
An old drain proposal to a since-compromised treasury remains executable indefinitely, and a replacement proposal resets nothing visible to watchers because no 'replaced' signal is emitted.
Scope
Reject proposing while one is pending (require cancel first) or emit a drain_replaced event; add expires_at with a bounded grace window and a dedicated error when executing after expiry.
Relevant code in CalloraOrg/Callora-Contracts:
contracts/revenue_pool/src/lib.rs
contracts/revenue_pool/src/emergency.rs
Priority
Medium
Acceptance criteria
Second propose without cancel fails or emits replacement event
Execution after expiry fails and clears the proposal
PendingEmergencyDrain exposes expiry
Tests cover both behaviours
Validation
cargo test -p callora-revenue-pool emergency
Non-goals
Typo-only, formatting-only, or cosmetic changes.
Unrelated refactors, dependency upgrades, or broad rewrites.
Removing safeguards or weakening validation to make tests pass.
Contributor application
Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.
PR requirements
Use a feature branch and include Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.
Quality review
A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.
changed the title [-]Add focused test coverage for contracts/hot/tests/auth_snap.rs[/-][+]Expire and protect pending emergency drain proposals[/+]on Sep 27, 2026
@michljoe has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
I would like to work on this issue because, I’ve reviewed the issue details and understand what needs to be done. I’m confident I can work toward resolving it and would appreciate the opportunity to contribute.
@spartan124 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
I have strong experience with Soroban smart contract development, timelock patterns, and state lifecycle validation in Rust. Approach:
Update PendingEmergencyDrain in contracts/revenue_pool/src/emergency.rs to include an explicit expires_at timestamp.
In propose_emergency_drain, reject new proposals if an active, unexpired proposal exists (requiring explicit cancellation first) or emit a dedicated drain_replaced event.
In execute_emergency_drain, verify env.ledger().timestamp() <= proposal.expires_at, failing with a dedicated error (e.g., DrainProposalExpired) and clearing the expired record.
Add unit and integration tests covering the rejection/replacement behavior, expiration enforcement, and state cleanup via cargo test -p callora-revenue-pool emergency. ETA: 2–3 hours
@Codex723 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
I’d love to secure emergency drain proposals by preventing silent overwrites, enforcing expiry, and testing cancellation and cleanup paths; I estimate 2–3 hours for the implementation and tests, so kindly assign it to me.
@jamal-exe has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi, I’ve carefully examined the issue details and requirements, and I’m confident I can develop a clean, efficient, and maintainable solution. I’ll make sure to consider the existing implementation, follow the project’s conventions, and properly validate the changes before submitting my contribution.
Activity
[-]Keep leaderboard rank pages deterministic[/-][+]Add focused test coverage for contracts/hot/tests/auth_snap.rs[/+][-]Add focused test coverage for contracts/hot/tests/auth_snap.rs[/-][+]Expire and protect pending emergency drain proposals[/+]michljoe commentedon Sep 29, 2026
@michljoe has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @michljoe to this issue.
doncharlie commentedon Sep 30, 2026
@doncharlie has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @doncharlie to this issue.
MrNova50 commentedon Sep 30, 2026
@MrNova50 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @MrNova50 to this issue.
Rodrigoue9 commentedon Oct 3, 2026
Hi @maintainers! I'd like to work on this issue. Here is my proposed technical approach:
Proposed Technical Approach:
require_auth), and gas optimization.soroban-sdk::Envverifying both success and failure execution paths.Key Files:
contracts/**/src/lib.rs(contract entrypoints and interface implementations)contracts/**/src/types.rsorstorage.rs(types, data keys, and state)contracts/**/src/test.rs(unit tests and integration vectors)Verification & Testing:
cargo testacross all contract crates verifying 100% pass rate.cargo clippy --all-targets -- -D warningsandcargo fmt --check.soroban contract build.Relevant Track Record:
I have successfully implemented and merged multiple production PRs across the Stellar ecosystem and Web3 open-source projects (e.g., Bitcoindefi/OpenAO #218, cybermax4200/stellar-did-credit #898 & #900, and FindMalek/sonaraem #416).
Please feel free to assign this issue to me so I can proceed with the implementation. Thank you!
rupesh-kumar-sah commentedon Oct 7, 2026
Hi maintainers,
I reviewed this issue and would like to contribute the fix.
Implementation approach:
Could you please assign this issue to me? Looking forward to delivering a clean PR.
spartan124 commentedon Oct 16, 2026
@spartan124 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @spartan124 to this issue.
Dannnyhamps commentedon Oct 16, 2026
@Dannnyhamps has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Dannnyhamps to this issue.
lienhoatienphung-svg commentedon Oct 16, 2026
Hi! I have implemented and verified this in #1382 with full unit test coverage and rustfmt compliance.
feat(revenue_pool): expire and protect pending emergency drain propos…
Codex723 commentedon Oct 16, 2026
@Codex723 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Codex723 to this issue.
devcarole commentedon Oct 17, 2026
@devcarole has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @devcarole to this issue.
jamal-exe commentedon Oct 17, 2026
@jamal-exe has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @jamal-exe to this issue.
CodingBabe-1 commentedon Oct 18, 2026
@CodingBabe-1 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @CodingBabe-1 to this issue.
salimguga247-dotcom commentedon Oct 18, 2026
@salimguga247-dotcom has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @salimguga247-dotcom to this issue.