Commit Graph

5 Commits

Author SHA1 Message Date
Maximilian Schneider c006948319
Enable self-trading protection (#533)
Co-authored-by: Christian Kamm <mail@ckamm.de>
2023-05-15 10:40:41 +02:00
Christian Kamm 5c7a2e3e10
Use the overflow-checks=true equivalent with the fixed crate (#476)
* Vendor `fixed` crate to have checked math in release mode
* remove all cm!()
* drop superfluous parens
* drop use of checked_math crate
* manual removal of redundant checked_* functions
2023-02-24 11:56:33 +01:00
Christian Kamm f6abd9579d
Perp cancel all: Don't error when orders are filled/expired (#453) 2023-02-14 10:44:51 +01:00
Christian Kamm a91a9ae998
Perp: Fix liq instructions (#424)
- Rename to perp_liq_base_or_positive_pnl and perp_liq_negative_pnl_or_bankruptcy
- Deal with situations where overall asset weight is zero and base position reduction
  would not improve liqee health
- Add ability for liqors to take over positive unsettled pnl if that improves liqee health
2023-02-02 09:00:37 +01:00
Christian Kamm d3cbb9e2ec
Create a single rust test binary (#425)
Speeds up the linking step, needs way less disk space for test binaries
and executes tests significantly faster.

Test execution went from 35s -> 29s for me and compilation improved a
lot.
2023-01-30 21:09:47 +01:00