Skip to content
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

feat: improve close factor #1322

Merged
merged 17 commits into from
Sep 7, 2022
Merged

feat: improve close factor #1322

merged 17 commits into from
Sep 7, 2022

Conversation

toteki
Copy link
Member

@toteki toteki commented Sep 1, 2022

Description

closes: #1166


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • added appropriate labels to the PR
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2022

Codecov Report

Merging #1322 (bcaff3f) into main (e9782df) will increase coverage by 0.12%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1322      +/-   ##
==========================================
+ Coverage   52.09%   52.22%   +0.12%     
==========================================
  Files          69       69              
  Lines        6816     6824       +8     
==========================================
+ Hits         3551     3564      +13     
+ Misses       2988     2984       -4     
+ Partials      277      276       -1     
Impacted Files Coverage Δ
x/leverage/keeper/liquidate.go 83.03% <75.00%> (+4.04%) ⬆️
x/leverage/keeper/collateral.go 69.17% <100.00%> (ø)
x/leverage/types/token.go 72.52% <100.00%> (ø)

@toteki toteki marked this pull request as ready for review September 2, 2022 16:57
@toteki toteki requested review from a team as code owners September 2, 2022 16:57
Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good update. I've added few suggestions with docs improvements.
Also, I really think we must not allow that a token.settings.liquidation_threshold >= 1

x/leverage/keeper/liquidate.go Outdated Show resolved Hide resolved
x/leverage/keeper/liquidate.go Outdated Show resolved Hide resolved
x/leverage/keeper/liquidate.go Outdated Show resolved Hide resolved
x/leverage/keeper/liquidate_test.go Show resolved Hide resolved
x/leverage/keeper/liquidate_test.go Outdated Show resolved Hide resolved
x/leverage/keeper/liquidate_test.go Show resolved Hide resolved
x/leverage/keeper/liquidate_test.go Show resolved Hide resolved
toteki and others added 9 commits September 3, 2022 10:31
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
@toteki
Copy link
Member Author

toteki commented Sep 3, 2022

Should be good to review again now

Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@mergify mergify bot merged commit d3f634c into main Sep 7, 2022
@mergify mergify bot deleted the adam/close branch September 7, 2022 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

leverage: improve complete_liquidation_threshold
4 participants