Skip to content

Implement-oracle-backed-collateral-valuation#103

Merged
Cedarich merged 1 commit into
Zyntarivoid:mainfrom
MaryammAli:Implement-oracle-backed-collateral-valuation
Jun 21, 2026
Merged

Implement-oracle-backed-collateral-valuation#103
Cedarich merged 1 commit into
Zyntarivoid:mainfrom
MaryammAli:Implement-oracle-backed-collateral-valuation

Conversation

@MaryammAli

Copy link
Copy Markdown
Contributor

Summary

This PR implements oracle-backed collateral valuation to calculate borrowing power using asset prices instead of relying solely on raw deposited amounts.

Changes

  • Added support for price inputs through an oracle/read-model strategy.
  • Updated collateral valuation logic to use configurable oracle-backed asset values.
  • Integrated collateral checks based on current asset prices rather than deposited quantities.
  • Enforced borrowing constraints using oracle-derived collateral values.

Tests

Added test coverage for:

  • ✅ Correct collateral valuation using oracle prices.
  • ✅ Borrow limit enforcement under varying asset prices.
  • ✅ Validation of borrow constraints for undercollateralized positions.

Acceptance Criteria

  • Price inputs are available to the contract or read-model strategy.
  • Collateral checks use configurable oracle-backed values.
  • Borrow constraints are validated in tests.

Closes #31

Implement-oracle-backed-collateral-valuation
@MaryammAli

Copy link
Copy Markdown
Contributor Author

@Cedarich
approve workflow

@Cedarich Cedarich merged commit 3b8db69 into Zyntarivoid:main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement oracle-backed collateral valuation

2 participants