Skip to main content

VoterV4

0x32d5633feB481A9a0A5C483C728CA75c3b29d1d8

The persistent voter. It registers gauges, tallies weekly votes from veNFTs, and distributes the MinterUpgradeable emission to gauges in proportion to votes. Source: bark_contracts/ve3/contracts/VoterV4.sol.

Voting

FunctionDescription
vote(uint256 _tokenId, address[] _poolVote, uint256[] _weights)Allocate a veNFT's voting power across pools. Once per epoch (onlyNewEpoch).
reset(uint256 _tokenId)Clear a veNFT's current votes.
poke(uint256 _tokenId)Re-apply the veNFT's last weights with refreshed power.

Claiming

FunctionDescription
claimRewards(address[] _gauges)Claim emission rewards from gauges (for stakers).
claimBribes(address[] _bribes, address[][] _tokens, uint256 _tokenId)Claim voting bribes for a veNFT.
claimFees(address[] _fees, address[][] _tokens, uint256 _tokenId)Claim trading fees for a veNFT.

Gauge registry & distribution

FunctionDescription
gauges(address pool) → addressThe gauge for a pool (address(0) if none).
poolForGauge(address gauge) → addressReverse lookup.
createGauge(address _pool, uint256 _gaugeType) → (address gauge, address internalBribe, address externalBribe)Permissioned — deploy a gauge + bribe contracts for a pool.
distributeAll()Advance the epoch and distribute emissions to all gauges. Calls Minter.update_period() internally.
length() → uint256 / pools(uint256) → addressEnumerate registered pools.

Use gauges(pool) to resolve where to stake a position and, via the returned bribe addresses, where to claim bribes/fees.

Key events

  • Voted(address indexed voter, uint256 tokenId, uint256 weight)
  • Abstained(uint256 tokenId, uint256 weight)
  • GaugeCreated(address indexed gauge, address creator, address internalBribe, address indexed externalBribe, address indexed pool)
  • DistributeReward(address indexed sender, address indexed gauge, uint256 amount)

The gauges subgraph indexes GaugeCreated to track gauges — see the gauge queries.