Key features:

  • Token locking mechanism for voting power and rewards
  • Time-weighted governance rights
  • Reward distribution based on lock duration and amount

Core Components

  1. Token Locking Contract

    • Allows users to lock tokens for a specified duration
    • Calculates voting power based on lock amount and duration
    • Manages unlock schedules and early withdrawal penalties
  2. Gauge System

    • Distributes rewards to different liquidity pools
    • Voting mechanism for reward allocation
  3. Reward Distribution

    • Handles emission of protocol tokens to locked token holders
    • Integrates with Merkl for efficient reward distribution
  4. Voting Mechanism

    • Allows ve3,3 token holders to participate in governance decisions
    • Includes proposal creation, voting, and execution logic

Integration Points

Smart Contracts (polygon)

  1. $RETRO Token

    • Address: 0xBFA35599c7AEbb0dAcE9b5aa3ca5f2a79624D8Eb
    • The main token of our ecosystem
  2. veRETRO

    • Address: 0xB419cE2ea99f356BaE0caC47282B9409E38200fa
    • Implements the vote-escrowed mechanism
    • Key functions:
      • create_lock(uint _value, uint _lock_duration)
      • increase_amount(uint _tokenId, uint _value)
      • increase_unlock_time(uint _tokenId, uint _lock_duration)
  3. VoterV3 (proxy)

    • Address: 0xAcCbA5e852AB85E5E3a84bc8E36795bD8cEC5C73
    • Manages voting and gauge weights
    • Key functions:
      • vote(uint256 _tokenId, address[] memory _poolVote, int256[] memory _weights)
      • distribute(address[] memory _gauges)
  4. GaugeFactoryV2 (proxy)

    • Address: 0xbDEe7Cc84ef62B2C507ceEC31AaC7a975bF8b20F
    • Creates and manages gauges for regular pools
  5. GaugeFactoryV2_CL (proxy)

    • Address: 0x9AE721D3Bae21FA42AA11eD7E4AB0b9b7263DE52
    • Creates and manages gauges for concentrated liquidity pools
  6. BribeFactoryV3 (proxy)

    • Address: 0x601b14aCb5C340f2a12Ee9D3BE0B0828E5619081
    • Manages the creation and distribution of bribes
  7. RewardDistributorV2

    • Address: 0x072ba11A17ac13EfF9F566d6d54f4887BAB94d3C
    • Handles the distribution of rewards
  8. Minter (proxy)

    • Address: 0x003D505Aff54FB7856aA6Bcb56a8397F5aF89479
    • Responsible for minting and distributing new tokens
  9. FeesDistributorAutomation

    • Address: 0xF8ae07c51f2020Fb8279309c08336e36d0275573
    • Automates the distribution of fees
  10. Permissions Registry

    • Address: 0xE14261E4c0347f6dfc74D515cA48BAA6A818EDfA
    • Manages permissions and access control

Integration Points

When integrating with these contracts, consider the following:

  1. Locking Tokens

    • Use the veRETRO contract to lock $RETRO tokens
    • Implement frontend interfaces for locking, increasing lock amount, and extending lock time
  2. Voting on Gauges

    • Interact with the VoterV3 contract for voting on gauges
    • Implement a voting interface that allows users to allocate their voting power
  3. Managing Gauges

    • Use GaugeFactoryV2 and GaugeFactoryV2_CL for creating and managing gauges
    • Implement interfaces for gauge creation and management
  4. Handling Bribes

    • Integrate with BribeFactoryV3 for bribe creation and distribution
    • Create interfaces for users to place and claim bribes
  5. Reward Distribution

    • Use RewardDistributorV2 and Minter contracts for reward calculations and distribution
    • Implement reward claiming interfaces
  6. Fee Distribution

    • Integrate with FeesDistributorAutomation for automated fee distribution
    • Display fee distribution data in the frontend

Customization and Modification

When modifying the system:

  1. Always use the proxy pattern for upgradeable contracts
  2. Update the Permissions Registry when changing access controls
  3. Ensure new implementations are compatible with existing proxies
  4. Thoroughly test all modifications, especially those affecting reward distribution or voting mechanics

Interacting with External Systems

  1. Merkl Integration

    • Interface with Merkl through the RewardDistributorV2 contract
    • Implement Merkl’s proof generation and verification for efficient reward claiming
  2. UniV3 Fork Integration

    • Use the provided UniV3 fork contracts (Factory, Router, etc.) for liquidity provision and swaps
    • Ensure compatibility between the ve3,3 system and the UniV3 fork