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, and GenesisGroup contracts

  • Stores whether GenesisGroup has completed

  • 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

The governor will then set the genesis group contract.

When the genesis group conditions are met, the GenesisGroup contract should complete the genesis group by calling completeGenesisGroup()

  • Governor ⚖️

Events

FeiUpdate
TribeUpdate
GenesisGroupUpdate
TribeAllocation
GenesisPeriodComplete
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

GenesisGroupUpdate

Governance change of GenesisGroup address

type

param

description

address indexed

_genesisGroup

new Genesis Group 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

GenesisPeriodComplete

Signals completion of Genesis Period and full launch of FEI protocol

type

param

description

uint256

_timestamp

The block timestamp at Genesis completion

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

genesisGroup

function genesisGroup() external view returns (address);

returns the address of the GenesisGroup contract

hasGenesisGroupCompleted

function hasGenesisGroupCompleted() external view returns (bool);

returns true if after genesis period and launched, false otherwise

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

setGenesisGroup

function setGenesisGroup(address _genesisGroup) external;

sets the reference GenesisGroup contract to _genesisGroup

emits GenesisGroupUpdate

allocateTribe

function allocateTribe(address to, uint256 amount) external;

distribute amount TRIBE from Core to an external address to

emits TribeAllocation

GenesisGroup-Only🚀 State-Changing Functions

completeGenesisGroup

function completeGenesisGroup() external;

called during Fei Protocol launch to unlock the remaining protocol functionality

emits GenesisPeriodComplete

ABIs