-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
program: account for contract tier in liquidate_perp_pnl_for_deposit (#…
…368) * bigz/add-tiers-for-liq-perp-pnl * update idl * improve liquidation.rs order, rename highest->safest * add basic rust test * fmt * separate margin calc w/ safest tier calc * finish asset tier test, fix liability only spot bug * contract tier function impl, incorp other cleanup feedback p1 * tests/liquidatePerpPnlForDeposit.ts: fix for new tier rules * liqudiation.rs: return early instead of erring on contract tier violation if orders got cancelled * add tests for asset tier, revert liqPerpPnl margin check to top level one * cleanup * fix import * CHANGELOG --------- Co-authored-by: Chris Heaney <chrisheaney30@gmail.com>
- Loading branch information
1 parent
129c3e2
commit 5667feb
Showing
10 changed files
with
685 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.