QuestBoard

GAUGE_CONTROLLER

address GAUGE_CONTROLLER

Address of the Curve Gauge Controller

nextID

uint256 nextID

ID for the next Quest to be created

quests

mapping(uint256 => struct IQuestBoard.Quest) quests

List of Quest (indexed by ID)

periodStateByQuest

mapping(uint256 => mapping(uint256 => enum QuestDataTypes.PeriodState)) periodStateByQuest

Mapping of all state for each period of each Quest

periodAmountDistributedByQuest

mapping(uint256 => mapping(uint256 => uint256)) periodAmountDistributedByQuest

Mapping of distributed reward amounts for each period of each Quest

originalRewardPerPeriod

mapping(uint256 => uint256) originalRewardPerPeriod

Original Reward per period for Rollover Quests

questDistributors

mapping(uint256 => address) questDistributors

Mapping of Distributors used by each Quest to send rewards

questWithdrawableAmount

mapping(uint256 => uint256) questWithdrawableAmount

Amount not distributed, for Quest creators to redeem

platformFeeRatio

uint256 platformFeeRatio

Platform fees ratio (in BPS)

customPlatformFeeRatio

mapping(address => uint256) customPlatformFeeRatio

Mapping of specific fee ratio for some Quest creators

objectiveMinimalThreshold

uint256 objectiveMinimalThreshold

Minimum Objective required

questChest

address questChest

Address of the Chest to receive platform fees

distributor

address distributor

Address of the reward Distributor contract

whitelistedTokens

mapping(address => bool) whitelistedTokens

Whitelisted tokens that can be used as reward tokens

minRewardPerVotePerToken

mapping(address => uint256) minRewardPerVotePerToken

Min rewardPerVote per token (to avoid spam creation of useless Quest)

isKilled

bool isKilled

Boolean, true if the cotnract was killed, stopping main user functions

killTs

uint256 killTs

Timestamp when the contract was killed

Parameters

getCurrentPeriod

function getCurrentPeriod() public view returns (uint256)

Returns the current Period for the contract

getQuestIdsForPeriodForGauge

function getQuestIdsForPeriodForGauge(address gauge, uint256 period) external view returns (uint256[])

Returns the list of all Quest IDs active on a given period

Parameters

Return Values

getQuestIdsForPeriod

function getQuestIdsForPeriod(uint256 period) external view returns (uint256[])

Returns the list of all Quest IDs active on a given period

Parameters

Return Values

getAllPeriodsForQuestId

function getAllPeriodsForQuestId(uint256 questID) external view returns (uint48[])

Returns all periods for a Quest

Parameters

Return Values

_getRemainingDuration

function _getRemainingDuration(uint256 questID) internal view returns (uint256)

Returns the number of periods to come for a given Quest

Parameters

Return Values

getQuestCreator

function getQuestCreator(uint256 questID) external view returns (address)

Returns the address of the Quest creator

Parameters

Return Values

getQuestVoterList

function getQuestVoterList(uint256 questID) external view returns (address[])

Returns the voter list for a given Quest

Parameters

Return Values

getCurrentReducedBias

function getCurrentReducedBias(uint256 questID) external view returns (uint256)

Returns the current reduced bias for a given gauge (based on a Quest's voter list)

Parameters

Return Values

getReducedBias

function getReducedBias(uint256 period, uint256 questID) public view returns (uint256)

Returns the reduced bias for a given gauge for a given period (based on a Quest's voter list)

Parameters

Return Values

createFixedQuest

function createFixedQuest(address gauge, address rewardToken, bool startNextPeriod, uint48 duration, uint256 rewardPerVote, uint256 totalRewardAmount, uint256 feeAmount, enum QuestDataTypes.QuestVoteType voteType, enum QuestDataTypes.QuestCloseType closeType, address[] voterList) external returns (uint256)

Creates a fixed rewards Quest based on the given parameters

Parameters

Return Values

createRangedQuest

function createRangedQuest(address gauge, address rewardToken, bool startNextPeriod, uint48 duration, uint256 minRewardPerVote, uint256 maxRewardPerVote, uint256 totalRewardAmount, uint256 feeAmount, enum QuestDataTypes.QuestVoteType voteType, enum QuestDataTypes.QuestCloseType closeType, address[] voterList) external returns (uint256)

Creates a ranged rewards Quest based on the given parameters

Parameters

Return Values

extendQuestDuration

function extendQuestDuration(uint256 questID, uint48 addedDuration, uint256 addedRewardAmount, uint256 feeAmount) external

Increases the duration of a Quest

Parameters

updateQuestParameters

function updateQuestParameters(uint256 questID, uint256 newMinRewardPerVote, uint256 newMaxRewardPerVote, uint256 addedPeriodRewardAmount, uint256 addedTotalRewardAmount, uint256 feeAmount) external

Updates the parametes of the Quest

Parameters

addToVoterList

function addToVoterList(uint256 questID, address[] accounts) external

Adds a given list of addresses to a Quest's voter list

Parameters

removeFromVoterList

function removeFromVoterList(uint256 questID, address account) external

Removes a given address from a Quest's voter list

Parameters

withdrawUnusedRewards

function withdrawUnusedRewards(uint256 questID, address recipient) external

Withdraw all undistributed rewards from Closed Quest Periods

Parameters

multipleWithdrawUnusedRewards

function multipleWithdrawUnusedRewards(uint256[] questIDs, address recipient) external

emergencyWithdraw

function emergencyWithdraw(uint256 questID, address recipient) external

Emergency withdraws all undistributed rewards from Closed Quest Periods & all rewards for Active Periods

Parameters

closeQuestPeriod

function closeQuestPeriod(uint256 period) external returns (uint256 closed, uint256 skipped)

Closes the Period, and all QuestPeriods for this period

Parameters

closePartOfQuestPeriod

function closePartOfQuestPeriod(uint256 period, uint256[] questIDs) external returns (uint256 closed, uint256 skipped)

Closes the given QuestPeriods for the Period

Parameters

addMultipleMerkleRoot

function addMultipleMerkleRoot(uint256[] questIDs, uint256 period, uint256[] totalAmounts, bytes32[] merkleRoots) external

Sets a list of QuestPeriods as disitrbuted, and adds the MerkleRoot to the Distributor contract for each

Parameters

Last updated