Skip to content

Commit

Permalink
program: increase full perp liquidation threshold (#807)
Browse files Browse the repository at this point in the history
* bigz/increase-full-perp-liq-buffer

* CHANGELOG

---------

Co-authored-by: Chris Heaney <[email protected]>
  • Loading branch information
0xbigz and crispheaney committed Jan 5, 2024
1 parent 1d80b21 commit 6a9a7d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- program: increase full perp liquidation threshold ([#807](https://github.com/drift-labs/protocol-v2/pull/807))

### Fixes

### Breaking
Expand Down
4 changes: 2 additions & 2 deletions programs/drift/src/controller/liquidation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ pub fn liquidate_perp(
calculate_base_asset_value_with_oracle_price(user_base_asset_amount.cast()?, oracle_price)?
.cast::<u64>()?;

// if position is less than $10, liquidator can liq all of it
let min_base_asset_amount = if base_asset_value > 10 * QUOTE_PRECISION_U64 {
// if position is less than $50, liquidator can liq all of it
let min_base_asset_amount = if base_asset_value > 50 * QUOTE_PRECISION_U64 {
0_u64
} else {
user_base_asset_amount
Expand Down

0 comments on commit 6a9a7d3

Please sign in to comment.