feat: add enabled/blacklist fields to tokens#913
Conversation
Codecov Report
@@ Coverage Diff @@
## main #913 +/- ##
==========================================
+ Coverage 50.87% 50.90% +0.02%
==========================================
Files 64 64
Lines 9451 9479 +28
==========================================
+ Hits 4808 4825 +17
- Misses 4397 4401 +4
- Partials 246 253 +7
|
| // or withdrawn, but not liquidated. A blacklisted token must have enable_lend | ||
| // and enable_borrow set to false. Such tokens can be safely removed from the | ||
| // by the oracle and price feeder as well. | ||
| bool blacklist = 14; |
There was a problem hiding this comment.
how about renaming to disabled?
There was a problem hiding this comment.
Runs the risk of being interpreted as just a combination of the other two being disabled.
This is more serious in that it also forces the value of the coin to zero in all calculations, which would have all kinds of consequences - we might look for a name that communicates that, but blacklist at least shows the severity.
There was a problem hiding this comment.
In #913 (comment) I was thinking to remove this field.
What it would take to unblackist an asset?
There was a problem hiding this comment.
Technically, only a governance proposal with the blacklisted field set back to false.
In reality, it seems unlikely that an accepted asset could become so nasty we have to blacklist it, but then recover to a point where we need to reverse the decision.
adamewozniak
left a comment
There was a problem hiding this comment.
left a few suggestions 🥳
…e into adam/unsupported-assets
robert-zaremba
left a comment
There was a problem hiding this comment.
LGTM. Pending proto comments update
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Description
Adds various options for disabling borrow, lend, and oracle price calculations of asset types.
Prevents token registry update from EVER removing base denoms from token registry. Therefore:
Blacklistfield depending on the situation. Their metadata and params remain in the token registry.Also adds validation to
SetRegisteredTokencloses: #869
closes: #724
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...
!to the type prefix if API or client breaking changeCHANGELOG.mdReviewers 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...
!in the type prefix if API or client breaking change