Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osmosis-price-oracle: Add discount factor #168

Closed
maurolacy opened this issue Nov 21, 2023 · 1 comment
Closed

osmosis-price-oracle: Add discount factor #168

maurolacy opened this issue Nov 21, 2023 · 1 comment
Assignees

Comments

@maurolacy
Copy link
Collaborator

The simple price feed contract has a discount factor, so that cross-staking can be made a little less profitable than native staking.

Let's introduce this discount factor to the osmosis price feed contract as well.

@maurolacy
Copy link
Collaborator Author

maurolacy commented Nov 21, 2023

Correction: This is already being implemented at the converter level

/// We must first instantiate the price feed contract, then the converter contract.
/// The converter will then instantiate a virtual staking contract to work with it,
/// as they both need references to each other. The admin of the virtual staking
/// contract is taken as an explicit argument.
///
/// Discount is applied to foreign tokens after adjusting foreign/native price,
/// such that 0.3 discount means foreign assets have 70% of their value
#[msg(instantiate)]
pub fn instantiate(
&self,
ctx: InstantiateCtx,
price_feed: String,
discount: Decimal,
remote_denom: String,
virtual_staking_code_id: u64,
admin: Option<String>,
) -> Result<Response, ContractError> {

Closing.

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

No branches or pull requests

2 participants