# IMaverickV2VotingEscrowWSync

### Functions <a href="#functions" id="functions"></a>

#### MIN\_SYNC\_DURATION <a href="#min_sync_duration" id="min_sync_duration"></a>

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

```solidity
function MIN_SYNC_DURATION() external pure returns (uint256 minSyncDuration);
```

**Returns**

| Name              | Type      | Description                          |
| ----------------- | --------- | ------------------------------------ |
| `minSyncDuration` | `uint256` | The minimum allowed lockup end time. |

#### legacyVeMav <a href="#legacyvemav" id="legacyvemav"></a>

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

```solidity
function legacyVeMav() external view returns (IERC20);
```

**Returns**

| Name     | Type     | Description                                               |
| -------- | -------- | --------------------------------------------------------- |
| `<none>` | `IERC20` | legacyVeMav The address of the IERC20 legacy veMav token. |

#### syncBalances <a href="#syncbalances" id="syncbalances"></a>

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

```solidity
function syncBalances(address staker, uint256 legacyLockupIndex) external view returns (uint256 balance);
```

**Parameters**

| Name                | Type      | Description                                                              |
| ------------------- | --------- | ------------------------------------------------------------------------ |
| `staker`            | `address` | The address of the user for whom to retrieve the synced balance.         |
| `legacyLockupIndex` | `uint256` | The index of the legacy lockup for which to retrieve the synced balance. |

**Returns**

| Name      | Type      | Description                                           |
| --------- | --------- | ----------------------------------------------------- |
| `balance` | `uint256` | The synced balance associated with the legacy lockup. |

#### sync <a href="#sync" id="sync"></a>

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.

```solidity
function sync(address staker, uint256 legacyLockupIndex) external returns (uint256 newBalance);
```

**Parameters**

| Name                | Type      | Description                                                  |
| ------------------- | --------- | ------------------------------------------------------------ |
| `staker`            | `address` | The address of the user for whom to perform synchronization. |
| `legacyLockupIndex` | `uint256` | The index of the legacy lockup to be synchronized.           |

**Returns**

| Name         | Type      | Description                                                 |
| ------------ | --------- | ----------------------------------------------------------- |
| `newBalance` | `uint256` | The new balance resulting from the synchronization process. |

### Events <a href="#events" id="events"></a>

#### Sync <a href="#sync-1" id="sync-1"></a>

```solidity
event Sync(address staker, uint256 legacyLockupIndex, uint256 newBalance);
```

### Errors <a href="#errors" id="errors"></a>

#### VotingEscrowLockupEndTooShortToSync <a href="#votingescrowlockupendtooshorttosync" id="votingescrowlockupendtooshorttosync"></a>

```solidity
error VotingEscrowLockupEndTooShortToSync(uint256 legacyLockupEnd, uint256 minimumLockupEnd);
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-reward-contracts/interfaces/imaverickv2votingescrowwsync.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
