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

fix: adapt MaxBorrow to limit it considering MinCollateralLiquidity and MaxSupplyUtilization #1954

Merged
merged 17 commits into from
Mar 29, 2023

Conversation

kosegor
Copy link
Contributor

@kosegor kosegor commented Mar 27, 2023

Description

closes: #XXXX


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
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #1954 (8557750) into main (863b5f9) will increase coverage by 0.07%.
The diff coverage is 78.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1954      +/-   ##
==========================================
+ Coverage   66.78%   66.86%   +0.07%     
==========================================
  Files         100      100              
  Lines        7951     8024      +73     
==========================================
+ Hits         5310     5365      +55     
- Misses       2227     2239      +12     
- Partials      414      420       +6     
Impacted Files Coverage Δ
x/leverage/keeper/msg_server.go 78.86% <66.66%> (-0.25%) ⬇️
x/leverage/keeper/limits.go 66.87% <76.00%> (+1.43%) ⬆️
x/leverage/keeper/collateral.go 72.88% <82.75%> (-1.11%) ⬇️
x/leverage/keeper/borrows.go 78.57% <82.85%> (+1.12%) ⬆️
x/leverage/keeper/grpc_query.go 67.21% <100.00%> (ø)

@kosegor kosegor marked this pull request as ready for review March 28, 2023 14:21
@kosegor kosegor requested review from a team as code owners March 28, 2023 14:21
x/leverage/README.md Outdated Show resolved Hide resolved
x/leverage/keeper/limits.go Outdated Show resolved Hide resolved
x/leverage/keeper/limits.go Outdated Show resolved Hide resolved
kosegor and others added 6 commits March 28, 2023 13:08
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
@kosegor kosegor requested a review from toteki March 28, 2023 17:08
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.

Looks good

@kosegor kosegor added this pull request to the merge queue Mar 29, 2023
Merged via the queue into main with commit f379034 Mar 29, 2023
@kosegor kosegor deleted the egor/maxborrow branch March 29, 2023 20:37
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