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(leverage): liquidation threshold must be bigger than collateral_weight #1956

Merged
merged 10 commits into from
Mar 28, 2023

Conversation

robert-zaremba
Copy link
Member

@robert-zaremba robert-zaremba commented Mar 27, 2023

Description

  • We must not accept liquidation_threshold == collateral_weight because that will trigger immediate liquidation.

@robert-zaremba robert-zaremba requested a review from a team as a code owner March 27, 2023 14:49
@robert-zaremba robert-zaremba changed the title Robert/liquidation th feat(leverage): liquidation threshold must be bigger than collateral_weight Mar 27, 2023
@robert-zaremba robert-zaremba requested a review from a team as a code owner March 27, 2023 14:52
@toteki
Copy link
Member

toteki commented Mar 27, 2023

check failing tests

x/leverage/keeper/msg_server.go Outdated Show resolved Hide resolved
Copy link
Member

@toteki toteki left a comment

Choose a reason for hiding this comment

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

pre-approving

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #1956 (d19e73e) into main (20f881f) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1956      +/-   ##
==========================================
+ Coverage   66.86%   66.91%   +0.04%     
==========================================
  Files          98       98              
  Lines        7908     7910       +2     
==========================================
+ Hits         5288     5293       +5     
+ Misses       2207     2205       -2     
+ Partials      413      412       -1     
Impacted Files Coverage Δ
x/leverage/client/tests/suite.go 100.00% <100.00%> (+4.10%) ⬆️
x/leverage/client/tests/tests.go 100.00% <100.00%> (ø)
x/leverage/types/token.go 75.00% <100.00%> (+0.58%) ⬆️

@robert-zaremba robert-zaremba added this pull request to the merge queue Mar 28, 2023
Merged via the queue into main with commit cde697d Mar 28, 2023
@robert-zaremba robert-zaremba deleted the robert/liquidation-th branch March 28, 2023 17:16
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.

2 participants