-
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
bigz/update-spot-tvl-invariant-check #525
Conversation
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.
are there any cargo tests we wanna write for this?
programs/drift/src/controller/pnl.rs
Outdated
@@ -129,7 +129,12 @@ pub fn settle_pnl( | |||
user_unsettled_pnl, | |||
now, | |||
)?; | |||
|
|||
crate::dlog!( |
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.
would be nice to remove if not intentional
@@ -252,7 +252,7 @@ pub fn update_spot_balances( | |||
} | |||
} | |||
|
|||
if let SpotBalanceType::Borrow = update_direction { | |||
if force_round_up && update_direction == &SpotBalanceType::Borrow { |
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.
should we change the name for force_round_up to better capture when it should be on/off?
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.
dont we need to change fulfill_with_external_market for spot to use this?
depositors_amount, | ||
borrowers_amount | ||
)?; | ||
// validate!( |
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.
delete
* sdk: create rpc method to get transactions to avoid some web3.js overhead * sdk: custom parse logs logic
* program: add post only slide for perps * tests * add to ts types * CHANGELOG
* program: add cancelOrdersByIds * CHANGELOG
* sdk: fix liq price issue * incorp getPerpPositionWithLPSettle across sdk/margin calc properly * rename burnLpShares, in getPerpPositionWithLPSettle * CHANGELOG --------- Co-authored-by: 0xbigz <[email protected]> Co-authored-by: Chris Heaney <[email protected]>
todo
add more tests for transfers/withdraw invariants