LogoLogo
  • CrossCurve MetaLayer
    • βš™οΈWhat is CrossCurve MetaLayer
      • CrossCurve Consensus bridge
      • CrossCurve Pools v2
    • πŸ—ΊοΈRoadmap
      • 2024
  • 🏒CrossCurve DAO
    • Overview of CrossCurve DAO
    • Voting
    • Obtaining veEYWA and Calculating the Boost
    • Staking mechanics
    • NFTs
      • CrossCurve DAO NFT
      • EYWA NFT Collection
  • πŸ’ΌEarn with CrossCurve
    • Staking in CrossCurve
    • Providing Liquidity to CrossCurve Pools
    • Voting for Incentives
  • πŸ“–user documentation
    • πŸ›ΈMigration to Sonic
      • Why are we moving to Sonic
      • Sonic Upgrade Stages
      • Liquidity transfer from Fantom to Sonic
      • Sonic Incentives on CrossCurve MetaLayer
    • πŸ”ƒSwap interface
      • How to trade
      • Slippage settings
      • Routing
    • 🌊Liquidity Interface
      • Easy mode
      • via Curve (Balanced)
      • Liquidity provision use cases
        • Deposit
          • Easy mode (Imbalanced)
          • via Curve (Balanced)
        • Withdraw
          • Easy mode (Imbalanced)
          • via Curve (Balanced)
        • Curve Knowledge Database
          • Balanced liquidity provision
          • Guide to transferring CRV from Fantom chain to Ethereum mainnet
          • Disclamer
    • 🏒DAO
      • Locker Interface
      • Vote Interface
      • Incentives Interface
      • Working with the EYWA Locker contract in Arbiscan.
    • 🌾Yield
      • Farms Interface
        • Staking liquidity and earning rewards
      • APR Calculator
      • EYWA pool via Convex
    • πŸ’ΌVesting
      • Claim portal interface
      • Early farming program interface
    • EYWA NFT
      • Bridge interface in the Aurora chain
      • Merge interface in the Arbitrum chain
      • EYWA NFT Manager interface
      • Dashboard interface
    • Leaderboard
    • ❄️Outdated
      • Early farming program
  • πŸ“–Developer documentation
    • Pools/asset contracts
      • Hubchain Pools and Assets
      • πŸ’±Supported tokens
    • πŸ”—CrossCurve smart contracts
    • πŸ’»Guide for Developers
      • Technical Documentation for CrossCurve DAO Smart Contracts
        • CalldataHelperV1
        • DelegationManagerV1
        • DelegationConditionValidatorV1
        • EmissionManagerV1
        • EscrowManager
        • EscrowVoteManagerV1
        • GaugeFactoryV1
        • GaugeV1
        • IncentiveRewardsDistributor
        • LockHolderFactoryV1
        • LockHolderV1
        • ProposalManager
        • RebaseRewardsDistributorV1
        • RewardsDistributorFactoryV1
        • Treasury
      • πŸ”ƒMake cross-chain swap
      • πŸ”¦Tracking cross-chain swap
      • πŸ“”Pusher API Reference
      • πŸ“Glossary
      • API Specification
  • πŸ“£About CrossCurve
    • πŸ›‘οΈSecurity audits
    • 🧠Team
    • Project History
    • Website
    • Telegram
    • Twitter
    • Medium
    • Discord
    • YouTube
    • LinkedIn
    • GitHub
Powered by GitBook
On this page
  • Overview
  • Inherited Contracts and Interfaces
  • State Variables
  • Constructor
  • External Functions (Defined by ILockHolderFactoryV1)
  • Events
  • Errors
  • Summary
Export as PDF
  1. Developer documentation
  2. Guide for Developers
  3. Technical Documentation for CrossCurve DAO Smart Contracts

LockHolderFactoryV1

Overview

LockHolderFactoryV1 This is an upgradeable contract that deploys new LockHolder contracts on the blockchain. It is integrated with the DelegationManager contract.

Key Roles and Features:

  1. Access Control: Restricts setAssuranceLockParameters and setMinLockVeEywa calls to the owner of contract(owner()).

  2. Upgradeable via UUPS: Uses UUPSUpgradeable and OwnableUpgradeable patterns, restricting contract upgrades to the owner.


Inherited Contracts and Interfaces

  • UUPSUpgradeable (OpenZeppelin): Provides upgrade functionality under the UUPS proxy pattern, restricted to the contract owner.

  • OwnableUpgradeable (OpenZeppelin): Manages ownership, allowing only the owner to modify critical parameters and authorize upgrades.

  • ILockHolderFactoryV1: Defines core methods (e.g., createLockHolder) and events for this contract.

Additional External References:

  • ERC1967Proxy (OpenZeppelin): A proxy implementation that stores the logic contract address in storage per EIP-1967.

  • LockHolderV1: LockHolder contract.


State Variables

  • s_escrowManager (address) Address of the EscrowManager contract.

  • s_escrowVoteManager (address) Address of the EscrowVoteManager contract.

  • s_delegationManager (address) Address of the DelegationManager contract.

  • s_incentiveRewardsAggregator (address) Address of the IncentiveRewardsAggregator contract.


Constructor

constructor() {
    _disableInitializers();
}
  • Description: Disables contract initializers to prevent re-initialization in a UUPS proxy context.


External Functions (Defined by ILockHolderFactoryV1)

initialize(...)

function initialize(
    address owner_, 
    address escrowManager_,
    address escrowVoteManager_,
    address delegationManager_,
    address incentiveRewardsAggregator_
) external initializer;

Description: Configures ownership, references, and initial state:

  • References the EYWA NFT, escrow manager, escrow vote manager and delegation manager.

Parameters:

  • owner_: The address of the contract owner.

  • escrowManager_: The address of the escrow manager contract.

  • escrowVoteManager_: The address of the escrow vote manager contract.

  • delegationManager_: The address of the delegation manager contract.

  • incentiveRewardsAggregator_: The address of the incentive rewards aggregator contract.


createLockHolder()

function createLockHolder() external returns (address);

Description: The function deploys and initializes an upgradable LockHolder contract. Returns the address of the LockHolder contract.

Checks:

  • sender must be a DelegationManager contract. Otherwise, UnauthorizedCaller() is thrown.

Events:

  • Emits LockHolderCreated(m_lockHolder, m_implementation).


Events

  • LockHolderCreated(address indexed lockHolder, address indexed implementation)) Emitted when a new LockHolder is created.


Errors

  • UnauthorizedCaller() Thrown when the caller is not the delegation manager.


Summary

LockHolderFactoryV1 contract is an important part of the lock delegation architecture. It deploys a new LockHolder contract for each delegator-delegate pair, which provides the ability to reliably track the movement of delegated locks, manage them, and receive and distribute rewards.

PreviousIncentiveRewardsDistributorNextLockHolderV1

Last updated 1 month ago

πŸ“–
πŸ’»