EYWA
  • Eywa v2
    • πŸ’₯Eywa v2: new era of Web3 interoperability
  • Eywa token
    • πŸ’ŽTokenomics Eywa/CrossCurve
    • πŸ“ˆEywa token utility
    • ⚑Eywa NFT Collection
      • Eywa NFT Bridge from Aurora to Arbitrum
      • Merge interface in the Arbitrum chain
      • EYWA NFT Manager interface
      • Dashboard interface
    • 🏒Eywa DAO
      • Overview of EYWA DAO
      • Voting
      • Obtaining veEYWA and Calculating the Boost
      • Staking
  • EYWA Ecosystem
    • πŸ’‘Vision
    • πŸ—ΊοΈProduct & EYWA token Roadmap
    • πŸ—οΈProducts
      • Eywa v1
        • Cross-chain Liquidity Protocol
          • Cross-chain DEX v1
          • Eywa Token Bridge
          • Gasless transactions
        • Cross-chain Data Protocol
          • Eywa CDP Introduction
          • Eywa Oracle Network
          • Data transfer flow
      • Eywa v2
        • πŸŒ‰Consensus Bridge
        • ⚑CrossCurve
    • πŸ›‘οΈSecurity audits
    • 🧠Team
    • πŸ¦„Project History
    • πŸ”—External Links
    • ❓FAQ
  • User documentation
    • πŸ’ΈEywa DEX
      • About EYWA Cross-chain DEX
      • Interface Eywa WebApp
      • How to trade
      • Slippage settings
      • Routing
      • Operation Interruption
        • Slippage condition
        • Data transfer error
    • 🏒DAO
      • EYWA Locker Interface
      • Working with the EYWA Locker contract in Arbiscan.
      • EYWA Vote Interface
      • EYWA Incentives Interface
    • πŸ”—Contracts addresses
      • Cross-chain Liquidity Protocol
        • CLP smart-contracts
        • Supported stablecoins
        • Addresses of Eywa stableswap pools
        • Addresses of s-tokens
        • Addresses of e-tokens
      • Cross-chain Data Protocol
        • Governance of Eywa Oracle network
        • Cross-chain messaging
  • DEVELOPER DOCUMENTATION
    • πŸ’»Guide for Developers
      • Technical Documentation for EYWA DAO Smart Contracts
        • EmissionManagerV1
        • EscrowManager
        • EscrowVoteManagerV1
        • GaugeFactoryV1
        • GaugeV1
        • IncentiveRewardsDistributor
        • ProposalManager
        • RebaseRewardsDistributorV1
        • RewardsDistributorFactoryV1
        • CalldataHelperV1
        • Treasury
        • DelegationManagerV1
        • DelegationConditionValidatorV1
        • LockHolderFactoryV1
        • LockHolderV1
  • Eywa Oracle Network - will be ENDED in April 2024
    • πŸ₯‡Validators token distribution
    • Incentivised PoA mainnet
      • General information
      • Application for participation in PoA mainnet
      • Requirements for PoA mainnet validators
      • Rewards for PoA mainnet
      • Instruction for node operators
    • FAQ
  • βš–οΈLEGAL INFORMATION
    • Terms of Service
    • Protocol Disclaimer
    • Cookies Policy
    • Risk of using Eywa
Powered by GitBook
On this page
  • Overview
  • Inherited Contracts and Interfaces
  • Constants
  • State Variables
  • Constructor
  • External Functions (Defined by ILockHolderV1)
  • Errors
  • Summary
  1. DEVELOPER DOCUMENTATION
  2. Guide for Developers
  3. Technical Documentation for EYWA DAO Smart Contracts

LockHolderV1

Overview

LockHolderV1 is an upgradeable contract integrated with DelegationManager, EscrowManager, EscrowVoteManager, IncentiveRewardsAggregatorV1. For each delegator-delegate pair, a different LockHolder contract is deployed, with delegated locks in the balance. Through the LockHolder contract the proxied call of functions of EscrowManager, EscrowVoteManager counters, as well as collection and distribution of incentive rewards takes place.

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.

  • ILockHolderV1: Defines core methods (e.g., boost, deboost, extend) and events for this contract.

Additional External References:

  • SafeERC20, IERC20 (OpenZeppelin): Handles secure ERC20 operations for distributing and approving token transfers.

  • IIncentiveRewardsAggregatorV1: Aggregates lists of reward tokens.

  • IEscrowVoteManagerV1: Receives gauge emission amounts and coordinates gauge reward distribution.

  • IEscrowManager: Holds locked token data and checks voting power and freeze logic.


Constants

uint256 private constant PRECISION = 100_000;
  • PRECISION: The divisior for percentage math.


State Variables

  • s_delegationManager (address) address of the delegation manager contract.

  • s_escrowVoteManager (IEscrowVoteManagerV1) IEscrowVoteManagerV1 interface for the escrow vote manager contract.

  • s_incentiveRewardsAggregator (IIncentiveRewardsAggregatorV1) IIncentiveRewardsAggregatorV1 Interface for the incentive rewards aggregator contract.


Constructor

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


External Functions (Defined by ILockHolderV1)

initialize(...)

function initialize(
    address owner_,
    address delegationManager_,
    IEscrowManager escrowManager_,
    IEscrowVoteManagerV1 escrowVoteManager_,
    IIncentiveRewardsAggregatorV1 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.

  • delegationManager_: The address of the delegation manager contract.

  • escrowManager_: The address of the escrow manager contract.

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

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


claimIncentives(address delegator_, address delegatee_, uint256 percentIncentive_)

function claimIncentives(
    address delegator_, 
    address delegatee_, 
    uint256 percentIncentive_
) external;

Description: Function for claim and distributing incentives. The function queries arrays with the addresses of the reward tokens and the size of the reward for each of them on the IncentiveRewardsAggregatorV1 contract Then for each IncentiveRewardsDistributor it claim incentives, calculates on the basis of percentIncentive_ what parts of it should be received by delegator_ and delegatee_ and distributes incentives between them.

Parameters:

  • delegator_: The delegator's address.

  • delegatee_: The delegate's address.

  • percentIncentive_: The percentage of the incentive reward received by the delegate.

Checks:

  • The function must be called by the DelegationManager contract. Otherwise, UnauthorizedCaller() is thrown.


Errors

  • UnauthorizedCaller() Thrown when the caller is not authorized to perform the action.


Summary

LockHolderV1 contract is an important and necessary part of the lock delegation and self-delegation architecture. It allows for diverse and flexible interaction and integration with all contracts in the system.

PreviousLockHolderFactoryV1NextValidators token distribution

Last updated 1 month ago

πŸ’»