Voting and incentives
A short interface reference for the future ve(3,3) release.
On this page
Release scope
Meme token staking and ve(3,3) are separate integrations. LaunchStakingRewards accounts for a project's Meme stake and pays its Holder Fee. VotingEscrow locks BIBO and represents voting positions as NFTs. A BIBOCAT balance or a Meme stake is not a BIBO lock.
BIBO locks and pool votes
Approve BIBO to VotingEscrow before creating a lock. createLock takes a token amount and a duration in seconds, and returns the new veNFT tokenId. Unlock times are rounded down to a weekly boundary; display the recorded end from locked(tokenId).
Before voting, check NFT ownership or approval and discover each pool's gauge through Voter.gauges(pool). Confirm the gauge exists and isAlive(gauge) is true. Graduation alone does not establish gauge eligibility.
// VotingEscrow
function createLock(uint256 value, uint256 lockDuration)
external returns (uint256 tokenId);
// Voter
function vote(
uint256 tokenId,
address[] calldata poolVote,
uint256[] calldata weights
) external;
function reset(uint256 tokenId) external;- Voting inputs
- vote takes distinct pool addresses and a matching array of positive relative weights. Read maxVotingNum() and simulate the call with the actual sender and veNFT; each selected pool must receive nonzero voting power.
- Voting window
- Read lastVoted(tokenId), epochVoteStart(timestamp) and epochVoteEnd(timestamp). Both vote and reset have epoch restrictions: reset cannot undo a vote cast in the same epoch. Simulate the intended action before enabling it.
Read and claim voter rewards
Resolve the fee reward contract with gaugeToFees(gauge) and the incentive reward contract with gaugeToBribe(gauge). On each reward contract, read earned(rewardToken, tokenId) to preview claimable rewards from completed epochs.
Voter.claimFees and claimBribes can be submitted by the veNFT owner or an approved operator. Each reward-contract address needs a corresponding array of reward-token addresses, with matching outer array lengths. Rewards are paid to the veNFT's current owner, including when an approved operator submits the claim.
LP incentive claims use CLGauge, which takes concentrated liquidity position NFTs. Deployment-specific instructions will accompany the ve(3,3) release.
// Voter
function claimFees(
address[] memory fees,
address[][] memory tokens,
uint256 tokenId
) external;
function claimBribes(
address[] memory bribes,
address[][] memory tokens,
uint256 tokenId
) external;