Core

The access control, source of truth, and DAO treasury for Fei Protocol

Contract

Core.sol implements ICore, Permissions

Description

The Core contract responsibilities:

  • Access control

  • Pointing to FEI, TRIBE

  • Escrowing DAO TRIBE treasury

The access control module is managed by Permissions.

Most other Fei Protocol contracts should refer to Core by implementing the CoreRef contract.

When Core is constructed and initialized it does the following:

  • Set sender as governor

  • Create and reference FEI and TRIBE contracts

  • Governor ⚖️

Events

FeiUpdate
TribeUpdate
TribeAllocation
FeiUpdate

Governance change of FEI token address

type

param

description

address indexed

_fei

new FEI address

TribeUpdate

Governance change of TRIBE token address

type

param

description

address indexed

_tribe

new TRIBE address

TribeAllocation

Governance deployment of TRIBE tokens from treasury

type

param

description

address indexed

_to

The address to receive TRIBE

uint256

_amount

The amount of TRIBE distributed

Read-Only Functions

fei

function fei() external view returns (IFei);

returns the address of the FEI contract as an interface for consumption

tribe

function tribe() external view returns (IERC20);

returns the address of the TRIBE contract as an interface for consumption

Governor-Only⚖️ State-Changing Functions

setFei

function setFei(address token) external;

sets the reference FEI contract

emits FeiUpdate

setTribe

function setTribe(address token) external;

sets the reference TRIBE contract

emits TribeUpdate

allocateTribe

function allocateTribe(address to, uint256 amount) external;

distribute amount TRIBE from Core to an external address to

emits TribeAllocation

ABIs