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

Original Reward per period for Rollover Quests

questDistributors

Mapping of Distributors used by each Quest to send rewards

questWithdrawableAmount

Amount not distributed, for Quest creators to redeem

platformFeeRatio

Platform fees ratio (in BPS)

customPlatformFeeRatio

Mapping of specific fee ratio for some Quest creators

objectiveMinimalThreshold

Minimum Objective required

questChest

Address of the Chest to receive platform fees

distributor

Address of the reward Distributor contract

whitelistedTokens

Whitelisted tokens that can be used as reward tokens

minRewardPerVotePerToken

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

isKilled

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

killTs

Timestamp when the contract was killed

Parameters

Name
Type
Description

_distributor

address

Address of the Distributor

getCurrentPeriod

Returns the current Period for the contract

getQuestIdsForPeriodForGauge

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

Parameters

Name
Type
Description

gauge

address

period

uint256

Timestamp of the period

Return Values

Name
Type
Description

[0]

uint256[]

uint256[] : Quest IDs for the period

getQuestIdsForPeriod

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

Parameters

Name
Type
Description

period

uint256

Timestamp of the period

Return Values

Name
Type
Description

[0]

uint256[]

uint256[] : Quest IDs for the period

getAllPeriodsForQuestId

Returns all periods for a Quest

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

Return Values

Name
Type
Description

[0]

uint48[]

uint256[] : List of period timestamps

_getRemainingDuration

Returns the number of periods to come for a given Quest

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

Return Values

Name
Type
Description

[0]

uint256

uint : remaining duration (non active periods)

getQuestCreator

Returns the address of the Quest creator

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

Return Values

Name
Type
Description

[0]

address

address : creator of the Quest

getQuestVoterList

Returns the voter list for a given Quest

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

Return Values

Name
Type
Description

[0]

address[]

address[] : vote list

getCurrentReducedBias

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

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

Return Values

Name
Type
Description

[0]

uint256

uint256 : current reduced bias

getReducedBias

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

Parameters

Name
Type
Description

period

uint256

timestamp of the period

questID

uint256

ID of the Quest

Return Values

Name
Type
Description

[0]

uint256

uint256 : current reduced bias

createFixedQuest

Creates a fixed rewards Quest based on the given parameters

Parameters

Name
Type
Description

gauge

address

Address of the gauge

rewardToken

address

Address of the reward token

startNextPeriod

bool

(bool) true to start the Quest the next period

duration

uint48

Duration of the Quest (in weeks)

rewardPerVote

uint256

Amount of reward/vote (in wei)

totalRewardAmount

uint256

Total amount of rewards available for the full Quest duration

feeAmount

uint256

Amount of fees paid at creation

voteType

enum QuestDataTypes.QuestVoteType

Vote type for the Quest

closeType

enum QuestDataTypes.QuestCloseType

Close type for the Quest

voterList

address[]

List of voters for the Quest (to be used for Blacklist or Whitelist)

Return Values

Name
Type
Description

[0]

uint256

uint256 : ID of the newly created Quest

createRangedQuest

Creates a ranged rewards Quest based on the given parameters

Parameters

Name
Type
Description

gauge

address

Address of the gauge

rewardToken

address

Address of the reward token

startNextPeriod

bool

(bool) true to start the Quest the next period

duration

uint48

Duration of the Quest (in weeks)

minRewardPerVote

uint256

Minimum amount of reward/vote (in wei)

maxRewardPerVote

uint256

Maximum amount of reward/vote (in wei)

totalRewardAmount

uint256

Total amount of rewards available for the full Quest duration

feeAmount

uint256

Amount of fees paid at creation

voteType

enum QuestDataTypes.QuestVoteType

Vote type for the Quest

closeType

enum QuestDataTypes.QuestCloseType

Close type for the Quest

voterList

address[]

List of voters for the Quest (to be used for Blacklist or Whitelist)

Return Values

Name
Type
Description

[0]

uint256

uint256 : ID of the newly created Quest

extendQuestDuration

Increases the duration of a Quest

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

addedDuration

uint48

Number of period to add

addedRewardAmount

uint256

Amount of reward to add for the new periods (in wei)

feeAmount

uint256

Platform fees amount (in wei)

updateQuestParameters

Updates the parametes of the Quest

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

newMinRewardPerVote

uint256

New min reward/vote value (in wei)

newMaxRewardPerVote

uint256

New max reward/vote value (in wei)

addedPeriodRewardAmount

uint256

Amount of reward to add for each period (in wei)

addedTotalRewardAmount

uint256

Amount of reward to add for all periods (in wei)

feeAmount

uint256

Platform fees amount (in wei)

addToVoterList

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

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

accounts

address[]

list of voters

removeFromVoterList

Removes a given address from a Quest's voter list

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

account

address

address of the voter

withdrawUnusedRewards

Withdraw all undistributed rewards from Closed Quest Periods

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

recipient

address

Address to send the reward tokens to

multipleWithdrawUnusedRewards

emergencyWithdraw

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

Parameters

Name
Type
Description

questID

uint256

ID of the Quest

recipient

address

Address to send the reward tokens to

closeQuestPeriod

Closes the Period, and all QuestPeriods for this period

Parameters

Name
Type
Description

period

uint256

Timestamp of the period

closePartOfQuestPeriod

Closes the given QuestPeriods for the Period

Parameters

Name
Type
Description

period

uint256

Timestamp of the period

questIDs

uint256[]

List of the Quest IDs to close

addMultipleMerkleRoot

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

Parameters

Name
Type
Description

questIDs

uint256[]

List of Quest IDs

period

uint256

Timestamp of the period

totalAmounts

uint256[]

List of sums of all rewards for the Merkle Tree

merkleRoots

bytes32[]

List of MerkleRoots to add

Last updated

Was this helpful?