Skip to content

fix: oracle staleness, multi-asset aggregation, RBAC events, pause cooldown - #801

Merged
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
0xpreshh:fix/oracle-rbac-pause-improvements
Oct 18, 2026
Merged

Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
0xpreshh:fix/oracle-rbac-pause-improvements

Conversation

@0xpreshh

Copy link
Copy Markdown
Contributor

Summary

Four contract fixes across oracle, RBAC, and pause modules.

#777 — OraclePriceStale error for heartbeat interval violations

Added error variant OraclePriceStale = 16 to catch timestamp violations exceeding the asset's configured heartbeat interval. Supports use cases where oracles must refresh prices within a strict window.

#778 — Multi-asset price feed aggregation with deviation bounds

Added test suite for aggregating prices across independent oracle buffers for multiple assets, validating that deviation checks work correctly:

  • multi_asset_aggregation_with_independent_buffers: assets maintain separate observation queues
  • deviation_bounds_reject_excessive_spread: spread beyond tolerance returns error
  • deviation_bounds_accept_within_tolerance: spread within tolerance accepted

#779 — RBAC role revocation event logging and multi-admin guards

  • Added RoleRevokedEvent struct and revoke_with_event function that emits events on role revocation
  • Backward-compatible revoke wrapper for existing call sites
  • Added multi-admin guard tests:
    • multi_admin_prevents_revocation_of_last_admin: prevents governance freeze
    • multi_admin_guards_preserve_members_list: members list consistency across revocations

#780 — Unpause cooldown period to prevent rapid toggle attacks

  • Extended PauseState with unpaused_at and unpause_cooldown fields
  • Added set_paused_with_cooldown that enforces now >= last_unpaused_at + cooldown_seconds before re-pausing
  • Returns Err(PausedError::ContractPaused) if cooldown still active
  • Test: unpause_cooldown_prevents_rapid_re_pause verifies attack prevention

Closes #777
Closes #778
Closes #779
Closes #780

…ing, pause cooldown

- conduit-protocol#777: Add OraclePriceStale (16) error for timestamp exceeding heartbeat interval
- conduit-protocol#778: Add multi-asset price feed aggregation tests with deviation bounds checking
  across independent oracle buffers and price tolerance ranges
- conduit-protocol#779: Add role revocation event logging via revoke_with_event function emitting
  RoleRevokedEvent; add multi-admin guards tests verifying final admin protection
  and members list preservation across revocations
- conduit-protocol#780: Implement unpause cooldown period in pause.rs; set_paused_with_cooldown
  prevents rapid toggle attacks by enforcing cooldown between unpause and re-pause
@0xpreshh
0xpreshh requested a review from Jaydbrown as a code owner October 18, 2026 12:46
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@0xpreshh 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

@Jaydbrown
Jaydbrown merged commit fb8166f into conduit-protocol:main Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants