Skip to content

Use try_invoke for rate oracle calls with graceful fallback - #1682

Merged
blurbeast merged 7 commits into
LabsCrypt:mainfrom
Awosdot:feature/issue-1128-oracle-try-invoke
Aug 30, 2026
Merged

Use try_invoke for rate oracle calls with graceful fallback#1682
blurbeast merged 7 commits into
LabsCrypt:mainfrom
Awosdot:feature/issue-1128-oracle-try-invoke

Conversation

@Awosdot

@Awosdot Awosdot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a critical denial-of-service vulnerability where a reverting or panicking external rate oracle would trap all new loan and refinance requests in loan_manager.

Key Changes:

  • Safe Oracle Invocation: Switched compute_interest_rate to handle external oracle failures gracefully without trapping the execution path.
  • Fallback Routing: Ensured invocation failures correctly route to read_interest_rate (the configured default), matching documentation and preserving boundary checks.
  • Test Coverage: Added test verification for panicking/incompatible mock oracles.

closes #1128

@Awosdot
Awosdot force-pushed the feature/issue-1128-oracle-try-invoke branch from 741d50f to 895ee28 Compare August 30, 2026 17:11
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