⬅️ Contracts

TribeMinter

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.

Mainnet implementations

Name Address
tribeMinter 0xFC3532b443383d9022b1B2c6FD5Fd0895943360A

Core, TribeReserveStabilizer, Tribe, ERC20Dripper, FeiDAOTimelock

Events

AnnualMaxInflationUpdate

event AnnualMaxInflationUpdate(uint256,uint256)
Params
Param Type Notes
oldAnnualMaxInflationBasisPoints uint256
newAnnualMaxInflationBasisPoints uint256

BufferCapUpdate

event BufferCapUpdate(uint256,uint256)
Params
Param Type Notes
oldBufferCap uint256
newBufferCap uint256

BufferUsed

event BufferUsed(uint256,uint256)
Params
Param Type Notes
amountUsed uint256
bufferRemaining uint256

ContractAdminRoleUpdate

event ContractAdminRoleUpdate(bytes32,bytes32)
Params
Param Type Notes
oldContractAdminRole bytes32 indexed
newContractAdminRole bytes32 indexed

CoreUpdate

event CoreUpdate(address,address)
Params
Param Type Notes
oldCore address indexed
newCore address indexed

OwnershipTransferred

event OwnershipTransferred(address,address)
Params
Param Type Notes
previousOwner address indexed
newOwner address indexed

Paused

event Paused(address)
Params
Param Type Notes
account address

RateLimitPerSecondUpdate

event RateLimitPerSecondUpdate(uint256,uint256)
Params
Param Type Notes
oldRateLimitPerSecond uint256
newRateLimitPerSecond uint256

TribeRewardsDripperUpdate

event TribeRewardsDripperUpdate(address,address)
Params
Param Type Notes
oldTribeRewardsDripper address indexed
newTribeRewardsDripper address indexed

TribeTreasuryUpdate

event TribeTreasuryUpdate(address,address)
Params
Param Type Notes
oldTribeTreasury address indexed
newTribeTreasury address indexed

Unpaused

event Unpaused(address)
Params
Param Type Notes
account address

Methods

CONTRACT_ADMIN_ROLE

function CONTRACT_ADMIN_ROLE() view returns(bytes32)

a role used with a subset of governor permissions for this contract only

Returns
Param Type Notes
bytes32

MAX_RATE_LIMIT_PER_SECOND

function MAX_RATE_LIMIT_PER_SECOND() view returns(uint256)

maximum rate limit per second governance can set for this contract

Returns
Param Type Notes
uint256

annualMaxInflationBasisPoints

function annualMaxInflationBasisPoints() view returns(uint256)

the max inflation in TRIBE circulating supply per year in basis points (1/10000)

Returns
Param Type Notes
uint256

buffer

function buffer() view returns(uint256)

the amount of action used before hitting limit

replenishes at rateLimitPerSecond per second up to bufferCap

Returns
Param Type Notes
uint256

bufferCap

function bufferCap() view returns(uint256)

the cap of the buffer that can be used at once

Returns
Param Type Notes
uint256

core

function core() view returns(address)

address of the Core contract referenced

Returns
Param Type Notes
address ICore implementation address

doPartialAction

function doPartialAction() view returns(bool)

a flag for whether to allow partial actions to complete if the buffer is less than amount

Returns
Param Type Notes
bool

fei

function fei() view returns(address)

address of the Fei contract referenced by Core

Returns
Param Type Notes
address IFei implementation address

feiBalance

function feiBalance() view returns(uint256)

fei balance of contract

Returns
Param Type Notes
uint256 fei amount held

idealBufferCap

function idealBufferCap() view returns(uint256)

return the ideal buffer cap based on TRIBE circulating supply

Returns
Param Type Notes
uint256

isContractAdmin

function isContractAdmin(address) view returns(bool)

returns whether a given address has the admin role for this contract

Params
Param Type Notes
_admin address
Returns
Param Type Notes
bool

isPokeNeeded

function isPokeNeeded() view returns(bool)

return whether a poke is needed or not i.e. is buffer cap != ideal cap

Returns
Param Type Notes
bool

lastBufferUsedTime

function lastBufferUsedTime() view returns(uint256)

the last time the buffer was used by the contract

Returns
Param Type Notes
uint256

mint

function mint(address,uint256) nonpayable

mints TRIBE to the target address, subject to rate limit

Params
Param Type Notes
to address the address to send TRIBE to
amount uint256 the amount of TRIBE to send

owner

function owner() view returns(address)

Returns the address of the current owner.

Returns
Param Type Notes
address

pause

function pause() nonpayable

set pausable methods to paused

paused

function paused() view returns(bool)

Returns true if the contract is paused, and false otherwise.

Returns
Param Type Notes
bool

poke

function poke() nonpayable

update the rate limit per second and buffer cap

rateLimitPerSecond

function rateLimitPerSecond() view returns(uint256)

the rate per second for this contract

Returns
Param Type Notes
uint256

renounceOwnership

function renounceOwnership() nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

setAnnualMaxInflationBasisPoints

function setAnnualMaxInflationBasisPoints(uint256) nonpayable

sets the max annual inflation relative to current supply

Params
Param Type Notes
newAnnualMaxInflationBasisPoints uint256 the new max inflation % denominated in basis points (1/10000)

setBufferCap

function setBufferCap(uint256) pure

no-op, reverts. Prevent admin or governor from overwriting ideal buffer cap

Params
Param Type Notes
uint256

setContractAdminRole

function setContractAdminRole(bytes32) nonpayable

sets a new admin role for this contract

Params
Param Type Notes
newContractAdminRole bytes32

setCore

function setCore(address) nonpayable

set new Core reference address

Params
Param Type Notes
newCore address the new core address

setMinter

function setMinter(address) nonpayable

changes the TRIBE minter address

Params
Param Type Notes
newMinter address the new minter address

setRateLimitPerSecond

function setRateLimitPerSecond(uint256) pure

no-op, reverts. Prevent admin or governor from overwriting ideal rate limit

Params
Param Type Notes
uint256

setTribeRewardsDripper

function setTribeRewardsDripper(address) nonpayable

sets the new TRIBE treasury rewards dripper

Params
Param Type Notes
newTribeRewardsDripper address

setTribeTreasury

function setTribeTreasury(address) nonpayable

sets the new TRIBE treasury address

Params
Param Type Notes
newTribeTreasury address

totalSupply

function totalSupply() view returns(uint256)

alias for tribeCirculatingSupply

for compatibility with ERC-20 standard for off-chain 3rd party sites

Returns
Param Type Notes
uint256

transferOwnership

function transferOwnership(address) nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Params
Param Type Notes
newOwner address

tribe

function tribe() view returns(address)

address of the Tribe contract referenced by Core

Returns
Param Type Notes
address IERC20 implementation address

tribeBalance

function tribeBalance() view returns(uint256)

tribe balance of contract

Returns
Param Type Notes
uint256 tribe amount held

tribeCirculatingSupply

function tribeCirculatingSupply() view returns(uint256)

return the TRIBE supply, subtracting locked TRIBE

Returns
Param Type Notes
uint256

tribeRewardsDripper

function tribeRewardsDripper() view returns(address)

the tribe rewards dripper address used to exclude from circulating supply

Returns
Param Type Notes
address

tribeTreasury

function tribeTreasury() view returns(address)

the tribe treasury address used to exclude from circulating supply

Returns
Param Type Notes
address

unpause

function unpause() nonpayable

set pausable methods to unpaused

⬅️ Contracts