Skip to main content

TribeReserveStabilizer

Functions

constructor

function constructor(
address _core,
address _tribeOracle,
address _backupOracle,
uint256 _usdPerFeiBasisPoints,
contract ICollateralizationOracle _collateralizationOracle,
uint256 _collateralizationThresholdBasisPoints,
contract ITribeMinter _tribeMinter,
uint256 _osmDuration
) public

Tribe Reserve Stabilizer constructor

Parameters

NameTypeDescription
_coreaddressFei Core to reference
_tribeOracleaddressthe TRIBE price oracle to reference
_backupOracleaddressthe backup oracle to reference
_usdPerFeiBasisPointsuint256the USD price per FEI to sell TRIBE at
_collateralizationOraclecontract ICollateralizationOraclethe collateralization oracle to reference
_collateralizationThresholdBasisPointsuint256the collateralization ratio below which the stabilizer becomes active. Reported in basis points (1/10000)
_tribeMintercontract ITribeMinterthe tribe minter contract
_osmDurationuint256the amount of delay time before the TribeReserveStabilizer begins minting TRIBE

exchangeFei

function exchangeFei(
uint256 feiAmount
) public returns (uint256)

exchange FEI for minted TRIBE

the timer counts down from first time below threshold and opens after window

Parameters

NameTypeDescription
feiAmountuint256

withdraw

function withdraw(
address ,
uint256
) external

reverts. Held TRIBE should only be released by exchangeFei or mint

Parameters

NameTypeDescription
``address
``uint256

isCollateralizationBelowThreshold

function isCollateralizationBelowThreshold() public returns (bool)

check whether collateralization ratio is below the threshold set

returns false if the oracle is invalid

startOracleDelayCountdown

function startOracleDelayCountdown() external

delay the opening of the TribeReserveStabilizer until oracle delay duration is met

resetOracleDelayCountdown

function resetOracleDelayCountdown() external

reset the opening of the TribeReserveStabilizer oracle delay as soon as above CR target

setCollateralizationOracle

function setCollateralizationOracle(
contract ICollateralizationOracle newCollateralizationOracle
) external

set the Collateralization oracle

Parameters

NameTypeDescription
newCollateralizationOraclecontract ICollateralizationOracle

setCollateralizationThreshold

function setCollateralizationThreshold(
uint256 newCollateralizationThresholdBasisPoints
) external

set the collateralization threshold below which exchanging becomes active

Parameters

NameTypeDescription
newCollateralizationThresholdBasisPointsuint256

collateralizationThreshold

function collateralizationThreshold() external returns (struct Decimal.D256)

the collateralization threshold below which exchanging becomes active

_transfer

function _transfer(
address to,
uint256 amount
) internal

Parameters

NameTypeDescription
toaddress
amountuint256

_pauseTimer

function _pauseTimer() internal