Summary
`contracts/tests/integration_tests.rs` has no test that verifies oracle price feed integration. The pool uses collateral valuations that depend on oracle prices, but no test covers what happens when:
- The oracle returns a stale price
- The oracle returns zero (divide-by-zero risk)
- The oracle price changes between collateral deposit and seizure check
- The oracle is unavailable (cross-contract call fails)
Missing Test Cases
- `test_stale_oracle_price_rejected`: pool should reject collateral valuations from stale oracle feeds
- `test_oracle_zero_price_handled`: oracle returning 0 should not cause divide-by-zero
- `test_price_change_between_deposit_and_seizure`: collateral value at seizure time reflects current oracle price
- `test_oracle_unavailable_fallback`: if oracle call fails, pool should return a safe error
Implementation Notes
- Use a mock oracle contract in the Soroban test environment
- The mock should be configurable to return specific prices, timestamps, and errors
- Tests should set up the mock, perform operations, then verify behavior
Acceptance Criteria
References
- `contracts/tests/integration_tests.rs`
- `contracts/pool/src/lib.rs` — oracle price usage in collateral valuation
Summary
`contracts/tests/integration_tests.rs` has no test that verifies oracle price feed integration. The pool uses collateral valuations that depend on oracle prices, but no test covers what happens when:
Missing Test Cases
Implementation Notes
Acceptance Criteria
References