Skip to content

Conversation

@markonmars
Copy link

No description provided.

@markonmars markonmars changed the title Amber Release-Candidate-1 Amber RC1 Sep 11, 2025
@markonmars markonmars requested a review from Copilot September 11, 2025 08:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for Slinky LSD (Liquid Staking Derivative) price sources in the Mars Oracle WASM contract. The implementation adds a new price source type that calculates LSD prices using redemption rates from Slinky LST oracle contracts combined with transitive asset pricing.

Key Changes:

  • Added SlinkyLsd price source variant with validation and pricing logic
  • Created mock LST oracle contract for testing purposes
  • Updated contract version from 2.2.3 to 2.3.2 with corresponding migration

Reviewed Changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
schemas/mars-oracle-wasm/mars-oracle-wasm.json Added schema definition for new SlinkyLsd price source
contracts/oracle/wasm/src/price_source.rs Implemented SlinkyLsd price source validation and querying logic
contracts/oracle/wasm/src/redemption_rate.rs Added helper functions for querying Slinky LST oracle contracts
contracts/mock-lst-oracle/ Created new mock contract to simulate Slinky LST oracle for testing
packages/testing/src/wasm_oracle.rs Enhanced test robot with mock LST oracle support and helper methods
contracts/oracle/wasm/tests/tests/test_price_source.rs Added comprehensive tests for SlinkyLsd price source validation
contracts/oracle/wasm/src/migrations/v2_3_2.rs Added migration from version 2.2.3 to 2.3.2

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +6 to +12
/// The query message for the slinky LST oracle
/// This is the only type we need so we don't import the package
#[cw_serde]
enum QueryMsg {
GetRedemptionRate {},
GetLstAssetDenom {},
}
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment mentions 'slinky LST oracle' but should be more specific about which oracle interface this represents. Consider adding a reference to the actual oracle contract or repository for clarity.

Copilot uses AI. Check for mistakes.
) -> ContractResult<Decimal> {
let rr = query_slinky_lst_redemption_rate(&deps.querier, contract_addr.clone())?;

// We don't do any staleness checks here as slinky LST contract does not provide that.
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should explain the implications of not performing staleness checks and whether this poses any risks to price accuracy or system security.

Suggested change
// We don't do any staleness checks here as slinky LST contract does not provide that.
// We don't do any staleness checks here as the slinky LST contract does not provide staleness information.

Copilot uses AI. Check for mistakes.
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.

2 participants