Maverick Docs
  • Introducing Maverick
  • Getting Started
    • 🖥️The Maverick V2 UI
    • 👛Connect a Wallet
    • ⛓️Choose a Network
    • 🪙Approving Tokens
  • Guides
    • 🤝Traders
      • How to Make a Swap
    • 💰Liquidity Providers
      • Understanding Liquidity Provision
      • Understanding Modes
      • How to Add Liquidity
      • How to Deploy a New Pool
      • How to Check Position Balances
      • How to Manage Liquidity in a Pool
      • How to Migrate from V1 to V2
      • Understanding Permanent Loss
      • Liquidity Strategies
    • ⚡Incentives
      • Understanding Boosted Positions
      • Understanding Incentives
      • How to Join a Boosted Position
      • How to Create a Boosted Position
      • How to Manage a Boosted Position
      • How to Add Incentives
    • 🎡veFlywheel
      • veFlywheel Basics
      • Guide to veFlywheel Emissions
      • How to Vote to Direct Emissions
    • 👩‍🏫Advanced Tutorials
      • Single-Sided Incentives
  • Technical Reference
    • Contract Addresses
      • V1 Contract Addresses
      • V2 Contract Addresses
    • Maverick V1
      • V1 Whitepaper
      • V1 Contracts
        • Router
        • Pool
        • Factory
        • SlimRouter
    • Maverick V2
      • V2 Whitepaper
      • V2 Contracts
        • Maverick V2 Common Contracts
          • base
            • IMulticall
            • IPayableMulticall
            • Multicall
            • PayableMulticall
          • interfaces
            • IMaverickV2AddLiquidityCallback
            • IMaverickV2Factory
            • IMaverickV2FactoryAdmin
            • IMaverickV2FlashLoanCallback
            • IMaverickV2Pool
            • IMaverickV2PoolAdmin
            • IMaverickV2SwapCallback
          • libraries
            • ArrayOperations
            • Constants
            • Math
            • PoolLib
            • TickMath
            • TransferLib
        • Maverick V2 AMM Contracts
          • poollib
            • Bin
            • Delta
            • Deployer
            • DeployerPermissioned
            • SwapMath
            • Twa
          • MaverickV2Factory
          • MaverickV2Pool
          • MaverickV2PoolPermissioned
        • Maverick V2 Reward Contracts
          • interfaces
            • IMaverickV2IncentiveMatcher
            • IMaverickV2IncentiveMatcherFactory
            • IMaverickV2Reward
            • IMaverickV2RewardFactory
            • IMaverickV2RewardRouter
            • IMaverickV2RewardVault
            • IMaverickV2VotingEscrowBase
            • IMaverickV2VotingEscrow
            • IMaverickV2VotingEscrowFactory
            • IMaverickV2VotingEscrowLens
            • IMaverickV2VotingEscrowWSync
          • libraries
            • IncentiveMatcherDeployer
            • RewardDeployer
            • VotingEscrowDeployer
            • VotingEscrowWSyncDeployer
          • rewardbase
            • IRewardAccounting
            • RewardAccounting
          • votingescrowbase
            • HistoricalBalance
            • IHistoricalBalance
            • ILegacyVeMav
            • VotingEscrow
          • MaverickV2IncentiveMatcher
          • MaverickV2IncentiveMatcherFactory
          • MaverickV2Reward
          • MaverickV2RewardFactory
          • MaverickV2RewardRouter
          • MaverickV2RewardVault
          • MaverickV2VotingEscrow
          • MaverickV2VotingEscrowFactory
          • MaverickV2VotingEscrowLens
          • MaverickV2VotingEscrowWSync
        • Maverick V2 Supplemental Contracts
          • base
            • Checks
            • IChecks
            • IMigrateBins
            • MigrateBins
          • boostedpositionbase
            • BoostedPositionBase
            • IBoostedPositionBase
            • ImmutableArrayGetter
          • interfaces
            • IMaverickV2BoostedPosition
            • IMaverickV2BoostedPositionFactory
            • IMaverickV2LiquidityManager
            • IMaverickV2PoolLens
            • IMaverickV2Position
            • IMaverickV2Quoter
            • IMaverickV2Router
            • IPositionImage
          • libraries
            • BoostedPositionDeployerDynamic
            • BoostedPositionDeployerStatic
            • BytesLib
            • LiquidityUtilities
            • PackLib
            • Path
            • PoolInspection
          • liquiditybase
            • ArgPacker
            • IArgPacker
          • paymentbase
            • IERC20PermitAllowed
            • IPayment
            • ISelfPermit
            • IState
            • IWETH9
            • Payment
            • SelfPermit
            • State
          • positionbase
            • INft
            • Nft
          • routerbase
            • CallbackOperations
            • ExactOutputSlim
            • ICallbackOperations
            • IExactOutputSlim
            • IPushOperations
            • IRouterErrors
            • PushOperations
          • MaverickV2BoostedPositionDynamic
          • MaverickV2BoostedPositionFactory
          • MaverickV2BoostedPositionStatic
          • MaverickV2LiquidityManager
          • MaverickV2PoolLens
          • MaverickV2Position
          • MaverickV2Quoter
          • MaverickV2Router
          • PositionImage
      • V2 API Documentation
      • V2 Testnet Guide
        • Get Sepolia ETH & Test Tokens
        • How to Create a Boosted Position in V2
        • How to Add & Match Incentives
        • How to Create a veFlywheel
    • Development FAQ
    • Finding LP Balances
  • MAV token
    • MAV Token & Tokenomics
    • veMAV & MAV Staking
    • How to Stake MAV
    • Syncing V1 veMAV
    • Airdrop Information
      • Maverick Ecosystem Rewards Pre-Season Airdrop
      • Maverick Governance & S1 Airdrops
  • Further Information
    • Frequently Asked Questions
    • Glossary
    • Security
    • Maverick Wallets
    • Dune Analytics
    • Rebasing Tokens
    • Restricted Territories
    • Delphi Digital Report
Powered by GitBook
On this page
  • State Variables
  • Functions
  1. Technical Reference
  2. Maverick V2
  3. V2 Contracts
  4. Maverick V2 Reward Contracts

MaverickV2VotingEscrowFactory

PreviousMaverickV2VotingEscrowNextMaverickV2VotingEscrowLens

Last updated 1 year ago

Inherits:

Factory to deploy veTokens. The resulting ve contracts are deployed using create2 and have deterministic addresses.

State Variables

baseTokenParameter

This function retrieves the default base token used for creating new voting escrow contracts. This state variable is only used temporarily when a new veToken is deployed.

IERC20 public baseTokenParameter;

isFactoryToken

This function checks whether a provided IMaverickV2VotingEscrow contract address was created by this factory.

mapping(IMaverickV2VotingEscrow => bool) public isFactoryToken;

legacyVeMav

This function retrieves the address of the legacy Maverick V1 Voting Escrow (veMAV) token. The address will be zero for blockchains where this contract is deployed that do not have a legacy MAV contract deployed.

IERC20 public immutable legacyVeMav;

_allVotingEscrow

IMaverickV2VotingEscrow[] private _allVotingEscrow;

Functions

constructor

constructor(IERC20 legacyVeMav_);

createVotingEscrow

Create a ve token for an input base token.

Once the ve contract is created, it will call name() and symbol() on the baseToken. If those functions do not exist, the ve creation will revert.

function createVotingEscrow(IERC20 baseToken) public returns (IMaverickV2VotingEscrow veToken);

Parameters

Name
Type
Description

baseToken

IERC20

The address of the ERC-20 token to be used as the base token for the new veToken.

Returns

Name
Type
Description

veToken

IMaverickV2VotingEscrow

The address of the newly created IMaverickV2VotingEscrow contract.

votingEscrows

This function retrieves a paginated list of existing Maverick V2 Voting Escrow (veToken) contracts within a specified index range.

function votingEscrows(uint256 startIndex, uint256 endIndex)
    external
    view
    returns (IMaverickV2VotingEscrow[] memory returnElements);

Parameters

Name
Type
Description

startIndex

uint256

The starting index for the desired range of veTokens.

endIndex

uint256

The ending index for the desired range of veTokens.

Returns

Name
Type
Description

returnElements

IMaverickV2VotingEscrow[]

votingEscrows An array of IMaverickV2VotingEscrow addresses representing the veTokens within the specified range.

votingEscrowsLength

This function retrieves the total number of deployed Maverick V2 Voting Escrow (veToken) contracts.

function votingEscrowsLength() external view returns (uint256 count);

Returns

Name
Type
Description

count

uint256

The total number of veTokens.

votingEscrowAddress

This function retrieves the address of the existing Maverick V2 Voting Escrow (veToken) contract associated with a specific ERC20 base token.

function votingEscrowAddress(IERC20 baseToken) public view returns (IMaverickV2VotingEscrow veToken);

Parameters

Name
Type
Description

baseToken

IERC20

The address of the ERC-20 base token for which to retrieve the veToken address.

Returns

Name
Type
Description

veToken

IMaverickV2VotingEscrow

The address of the IMaverickV2VotingEscrow contract associated with the base token, or the zero address if none exists.

_nameSymbolGetter

function _nameSymbolGetter(IERC20 baseToken) internal view returns (string memory name, string memory symbol);

IMaverickV2VotingEscrowFactory