-
Notifications
You must be signed in to change notification settings - Fork 91
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 buffer to calculating max perp if fee #635
Conversation
.unwrap_or(u32::MAX), | ||
) | ||
.safe_mul(19)? | ||
.safe_div(20)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you leave comment describing the reason for 5% off
- update CHANGELOG
@@ -574,7 +574,7 @@ mod calculate_perp_if_fee { | |||
) | |||
.unwrap(); | |||
|
|||
assert_eq!(fee, 39000); // 3.9% | |||
assert_eq!(fee, 37050); // 3.9% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix comment (with description?)
@@ -560,7 +560,7 @@ mod calculate_perp_if_fee { | |||
) | |||
.unwrap(); | |||
|
|||
assert_eq!(fee, LIQUIDATION_FEE_PRECISION / 50); // 2% | |||
assert_eq!(fee, 19000); // 2% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix comment (with description?)
.unwrap(); | ||
|
||
let market_after = perp_market_map.get_ref(&0).unwrap(); | ||
assert!(!user.is_being_liquidated()); | ||
// .5% * 100 =$0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix comment (with description?)
No description provided.