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

program: add-initial-oracle-invalid-margin-req-type #1196

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

0xbigz
Copy link
Member

@0xbigz 0xbigz commented Aug 20, 2024

todos:

  • - update spot_liquidator logic or test
  • - add less strict stable coin oracle staleness

@@ -342,14 +344,17 @@ pub fn calculate_margin_requirement_and_total_collateral_and_liability_info(
&spot_market,
&strict_oracle_price,
Some(signed_token_amount),
context.margin_type,
if !margin_calc_valid && context.margin_type == MarginRequirementType::Initial {
Copy link
Member

Choose a reason for hiding this comment

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

need to check if its a liquidation too?

Copy link
Member Author

Choose a reason for hiding this comment

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

do you mean check if its a liquidator account trying to take over a position and let it skip this check?

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