Skip to content

Tribe Rate Limit#232

Merged
Joeysantoro merged 7 commits intofeat/v2/basefrom
feat/Tribe-Rate-Limit
Oct 17, 2021
Merged

Tribe Rate Limit#232
Joeysantoro merged 7 commits intofeat/v2/basefrom
feat/Tribe-Rate-Limit

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Oct 10, 2021

Separates all Tribe Minting logic out from TribeReserveStabilizer into a TribeMinter contract


@title implementation for a TRIBE Minter Contract
@author Fei Protocol

This contract will be the unique TRIBE minting contract.
All minting is subject to an annual inflation rate limit.
For example if circulating supply is 1m and inflation is capped at 10%, then no more than 100k TRIBE can enter circulation in the following year.

The contract will increase (decrease) the rate limit proportionally as supply increases (decreases)

Governance and admins can only lower the max inflation %.
They can also exclude (unexclude) addresses' TRIBE balances from the circulating supply.
The minter's balance is excluded by default.

ACCESS_CONTROL:
This contract follows a somewhat unique access control pattern.
It has a contract admin which is NOT intended for optimistic approval, but rather for contracts such as the TribeReserveStabilizer.
An additional potential contract admin is one which automates the inclusion and removal of excluded deposits from on-chain timelocks.

Additionally, the ability to transfer the tribe minter role is held by the contract owner rather than governor or admin.
The owner will intially be the DAO timelock.
This keeps the power to transfer or burn TRIBE minting rights isolated.


Also makes some light changes to RateLimited contract

@Joeysantoro Joeysantoro changed the base branch from master to feat/v2-phase1-fixes October 10, 2021 23:12
@ElliotFriedman
Copy link
Contributor

We also need to add a test here that tries to call withdraw on the TribeReserveStabilizer and receives an error "TribeReserveStabilizer: can't withdraw TRIBE".

@Joeysantoro Joeysantoro changed the base branch from feat/v2-phase1-fixes to feat/v2/base October 13, 2021 22:36
Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I'm glad we hardcoded in the Treasury, Dripper, etc.

I think we need to make very sure that the Tribe balance in the Treasury & the Dripper aren't manipulable if we're going to use tribe.balanceOf (as opposed to having them report their own locked balances).

Otherwise, no concerns.

@Joeysantoro
Copy link
Contributor Author

I think we need to make very sure that the Tribe balance in the Treasury & the Dripper aren't manipulable if we're going to use tribe.balanceOf (as opposed to having them report their own locked balances).

The only way to get tokens out of them is drip() or having a governor or PCV Controller role.

@Joeysantoro Joeysantoro merged commit 560dcf5 into feat/v2/base Oct 17, 2021
@Joeysantoro Joeysantoro deleted the feat/Tribe-Rate-Limit branch October 17, 2021 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments