MaverickV2VotingEscrowWSync

Inherits: MaverickV2VotingEscrow, IMaverickV2VotingEscrowWSync

Inherits MaverickV2VotingEscrow and adds functionality for synchronizing veMav V1 and veMav v2 balances.

State Variables

legacyVeMav

This function retrieves the address of the legacy Maverick V1 Voting Escrow (veMav) token.

IERC20 public immutable legacyVeMav;

syncBalances

This function retrieves the synced balance for a specific legacy lockup index of a user.

mapping(address staker => mapping(uint256 legacyLockupIndex => uint256 balance)) public syncBalances;

MIN_SYNC_DURATION

This function retrieves the minimum lockup duration required for a legacy lockup to be eligible for synchronization.

uint256 public constant MIN_SYNC_DURATION = 365 days;

Functions

constructor

constructor(string memory __name, string memory __symbol) MaverickV2VotingEscrow(__name, __symbol);

sync

This function synchronizes a specific legacy lockup index for a user within the contract. If the legacy lockup.end is not at least block.timestamp + MIN_SYNC_DURATION(), this function will revert.

function sync(address staker, uint256 legacyLockupIndex) public nonReentrant returns (uint256 newBalance);

Parameters

NameTypeDescription

staker

address

The address of the user for whom to perform synchronization.

legacyLockupIndex

uint256

The index of the legacy lockup to be synchronized.

Returns

NameTypeDescription

newBalance

uint256

The new balance resulting from the synchronization process.

Last updated