Skip to main content

TRIBERagequit

Functions

constructor

function constructor(
bytes32 root,
uint256 _rageQuitStart,
uint256 _rageQuitEnd,
address tribeRariDAO
) public

Parameters

NameTypeDescription
rootbytes32
_rageQuitStartuint256
_rageQuitEnduint256
tribeRariDAOaddress

ngmi

function ngmi(
uint256 amount,
uint256 totalMerkleAmount,
bytes32[] merkleProof
) external

ragequit held TRIBE with FEI

not gonna make it

Parameters

NameTypeDescription
amountuint256the amount to redeem in TRIBE
totalMerkleAmountuint256the amount of TRIBE allocated to the caller in the merkle drop
merkleProofbytes32[]a proof proving that the caller may redeem up to totalMerkleAmount amount of tribe

getCirculatingTribe

function getCirculatingTribe() public returns (uint256)

exchangeRate

function exchangeRate(
uint256 protocolEquity
) public returns (uint256)

recalculate the exchange amount using the protocolEquity

Parameters

NameTypeDescription
protocolEquityuint256the protocol equity

Return Values

NameTypeDescription
[0]uint256the new intrinsicValueExchangeRateBase

setExchangeRate

function setExchangeRate(
uint256 protocolEquity
) external returns (uint256)

Update the exchange rate based on protocol equity

only callable once by guardian

Parameters

NameTypeDescription
protocolEquityuint256the protocol equity

Return Values

NameTypeDescription
[0]uint256the new exchange rate

verifyClaim

function verifyClaim(
address claimer,
uint256 totalMerkleAmount,
bytes32[] merkleProof
) private returns (bool)

validate the proof of a merkle drop claim

Parameters

NameTypeDescription
claimeraddressthe address attempting to claim
totalMerkleAmountuint256the amount of scaled TRIBE allocated the claimer claims that they have credit over
merkleProofbytes32[]a proof proving that claimer may redeem up to totalMerkleAmount amount of tribe

Return Values

NameTypeDescription
[0]boolboolean true if the proof is valid, false if the proof is invalid

Events

Exchange

event Exchange(
address from,
uint256 amountIn,
uint256 amountOut
)

Parameters

NameTypeDescription
fromaddress
amountInuint256
amountOutuint256