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

porgram: add high leverage mode #1240

Merged
merged 18 commits into from
Oct 10, 2024
Merged

porgram: add high leverage mode #1240

merged 18 commits into from
Oct 10, 2024

Conversation

crispheaney
Copy link
Member

No description provided.

@@ -108,6 +108,7 @@ pub fn calculate_lp_shares_to_burn_for_risk_reduction(
quote_oracle_price: i64,
margin_shortage: u128,
user_custom_margin_ratio: u32,
user_high_leverage_mode: bool,
Copy link
Member

Choose a reason for hiding this comment

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

can we use margin mode enum?

pub struct HighLeverageModeConfig {
pub max_users: u32,
pub current_users: u32,
pub padding: [u8; 32],
Copy link
Member

@0xbigz 0xbigz Oct 7, 2024

Choose a reason for hiding this comment

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

thinking of other useful things to have here:

maybe there should be a reduce only mode, so can allow number go down naturally to smaller set over time

@crispheaney crispheaney merged commit e230ee8 into master Oct 10, 2024
10 of 11 checks 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.

2 participants