-
Notifications
You must be signed in to change notification settings - Fork 193
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(perp): Make the collateral denom a stateful collections.Item #1656
Conversation
…d network migration
…biru into mat/make-quote-collection
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1656 +/- ##
==========================================
- Coverage 74.19% 73.82% -0.37%
==========================================
Files 191 192 +1
Lines 15114 15211 +97
==========================================
+ Hits 11214 11230 +16
- Misses 3264 3329 +65
- Partials 636 652 +16
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks good. Here are some suggested changes
…Chain/nibiru into mat/make-quote-collection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final note: All suggested changes have been addressed excepting #1656 (comment)
Description
Create a collateral object to use instead of the quote denom. Collateral is then accessed through Collateral[QuoteDenom]
MsgChangeCollateralDenom
to the perpMsgServer
, gated behindSudoKeeper.CheckPermissions
Purpose
The collateral denom for x/perp needs to be a collections.Item / KeySet to make it configurable.
This is necessary for setting the address for NUSD, which would look like "tf/[contract-addr]/nusd".
This change would also lower the possibility of mistakes arising from hard-coded denominations on all of the bank transfer logic in x/perp.
collections.Item
#1640