V2 Tribe Reserve Stabilizer#151
Merged
Joeysantoro merged 6 commits intofeat/v2-RatelimitedMinterfrom Sep 11, 2021
Merged
Conversation
eswak
reviewed
Sep 6, 2021
| // Transfer held TRIBE first, then mint to cover remainder | ||
| function _transfer(address to, uint256 amount) internal override { | ||
| _mint(to, amount); | ||
| uint256 _tribeBalance = balance(); |
Contributor
There was a problem hiding this comment.
this is using the cached token variable from the contract state, while the _mint() call uses a fresh ITribe(address(tribe())). Not sure if there could be some bad interaction here, but it would be nice to use the same source of information for both ?
Contributor
Author
There was a problem hiding this comment.
Fixed, although it should be fine because token is immutably set to equal tribe();
022bb45 to
d36706f
Compare
eswak
approved these changes
Sep 10, 2021
xklob
approved these changes
Sep 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of Fei V2 Phase 1 that handles the inflation of TRIBE when the collateralization ratio is low.
Replaces the logic regarding the FEI peg/oracle with collateralization ratio logic. If the CR is below the configured threshold, then exchanging FEI for minted TRIBE becomes possible.
Any TRIBE held by the contract is transferred first before performing a direct mint.
Also restricts TRIBE withdrawals from the contract so TRIBE held is effectively burned barring a mint operation.
Uses the RateLimited utility to put a cap on how much TRIBE can be minted at once.