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!: Add MaxCollateralShare, MaxSupplyUtilization, and MinCollateralLiquidity #1141

Closed
wants to merge 19 commits into from

Conversation

toteki
Copy link
Member

@toteki toteki commented Jul 18, 2022

Description

  • Adds new params to proto

Also

  • Implements MaxSupplyUtilization
  • Does not implement the other new params

closes: #1093 #1095 #1036 and some other things that weren't made into issues first

Currently backtracks on #1107 due to second thoughts - see discussion


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)

CHANGELOG.md Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2022

Codecov Report

Merging #1141 (19a5b1d) into main (4613901) will increase coverage by 0.07%.
The diff coverage is 81.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
+ Coverage   43.82%   43.89%   +0.07%     
==========================================
  Files          65       65              
  Lines        8393     8417      +24     
==========================================
+ Hits         3678     3695      +17     
- Misses       4472     4477       +5     
- Partials      243      245       +2     
Impacted Files Coverage Δ
x/leverage/keeper/genesis.go 2.58% <0.00%> (ø)
x/leverage/keeper/interest.go 72.00% <ø> (ø)
x/leverage/keeper/invariants.go 57.57% <0.00%> (ø)
x/leverage/keeper/keeper.go 43.24% <36.36%> (-0.68%) ⬇️
x/leverage/keeper/iter.go 53.33% <75.00%> (ø)
x/leverage/client/tests/tests.go 100.00% <100.00%> (ø)
x/leverage/keeper/borrows.go 79.09% <100.00%> (+2.09%) ⬆️
x/leverage/types/token.go 75.00% <100.00%> (+2.41%) ⬆️

@toteki toteki changed the title feat!: Add MaxCollateralShare, MaxBorrowUtilization, and MinCollateralLiquidity feat!: Add MaxCollateralShare, MaxSupplyUtilization, and MinCollateralLiquidity Jul 19, 2022
@robert-zaremba
Copy link
Member

This is an architecture change. I would strongly prefer that we do that changes step by step:

  1. discuss the mechanism
  2. update proto
  3. update implementation + tests.

@toteki toteki mentioned this pull request Jul 21, 2022
17 tasks
@toteki
Copy link
Member Author

toteki commented Jul 25, 2022

This PR as been split up:

After those merge, I will take the remaining code in this PR (i.e. the implementation of MaxSupplyUtilization and related calculations), turn them into a small PR, and close this.

@robert-zaremba
Copy link
Member

seams like we can close now to avoid confusions. You can keep your branch locally.

@toteki toteki closed this Jul 25, 2022
@toteki toteki deleted the adam/tokenlimits branch September 21, 2022 04:28
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.

Max Collateral Share
3 participants