Skip to content

Commit

Permalink
add no-liability check
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspluna committed Apr 25, 2024
1 parent d09c98a commit ea37d46
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion pool/src/auctions/bad_debt_auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ pub fn fill_bad_debt_auction(
let backstop_client = BackstopClient::new(e, &backstop_address);
let backstop_token_id = backstop_client.backstop_token();
let lot_amount = auction_data.lot.get(backstop_token_id).unwrap_optimized();
let backstop_client = BackstopClient::new(e, &backstop_address);
backstop_client.draw(
&e.current_contract_address(),
&lot_amount,
Expand Down
1 change: 1 addition & 0 deletions pool/src/pool/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub fn execute_submit(
// panics if the new positions set does not meet the health factor requirement
// min is 1.0000100 to prevent rounding errors
if check_health
&& new_from_state.positions.liabilities.len() > 0
&& PositionData::calculate_from_positions(e, &mut pool, &new_from_state.positions)
.is_hf_under(1_0000100)
{
Expand Down
13 changes: 13 additions & 0 deletions total =
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[user]
name = markuspluna
email = [email protected]
[credential]
helper =
helper = /usr/local/share/gcm-core/git-credential-manager
[credential "https://dev.azure.com"]
useHttpPath = true

0 comments on commit ea37d46

Please sign in to comment.