# AeraVaultV1

## AeraVaultV1

> Risk-managed treasury vault.

Managed n-asset vault that supports withdrawals in line with a pre-defined validator contract.

*Vault owner is the asset owner.*

### Methods

#### acceptOwnership

```solidity
function acceptOwnership() external nonpayable
```

Accept ownership

#### bVault

```solidity
function bVault() external view returns (contract IBVault)
```

Balancer Vault.

**Returns**

| Name | Type             | Description |
| ---- | ---------------- | ----------- |
| \_0  | contract IBVault | undefined   |

#### cancelOwnershipTransfer

```solidity
function cancelOwnershipTransfer() external nonpayable
```

Cancel current pending ownership transfer

#### cancelWeightUpdates

```solidity
function cancelWeightUpdates() external nonpayable
```

Cancel the active weight update schedule.

*Keep calculated weights from the schedule at the time.*

#### claimGuardianFees

```solidity
function claimGuardianFees() external nonpayable
```

Claim guardian fee.

*This function shouldn't be called too frequently.*

#### claimRewards

```solidity
function claimRewards(IBMerkleOrchard.Claim[] claims, contract IERC20[] tokens) external nonpayable
```

Claim Balancer rewards.

*It calls claimDistributions() function of Balancer MerkleOrchard. Once this function is called, the tokens will be transferred to the Vault and it can be distributed via sweep function.*

**Parameters**

| Name   | Type                     | Description                                                                                                                                                |
| ------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| claims | IBMerkleOrchard.Claim\[] | An array of claims provided as a claim struct. See <https://docs.balancer.fi/products/merkle-orchard/claiming-tokens#claiming-from-the-contract-directly>. |
| tokens | contract IERC20\[]       | An array consisting of tokens to be claimed.                                                                                                               |

#### deposit

```solidity
function deposit(IProtocolAPI.TokenValue[] tokenWithAmount) external nonpayable
```

Deposit tokens into vault.

*It calls updateWeights() function which cancels current active weights change schedule.*

**Parameters**

| Name            | Type                       | Description                 |
| --------------- | -------------------------- | --------------------------- |
| tokenWithAmount | IProtocolAPI.TokenValue\[] | Deposit tokens with amount. |

#### depositIfBalanceUnchanged

```solidity
function depositIfBalanceUnchanged(IProtocolAPI.TokenValue[] tokenWithAmount) external nonpayable
```

Deposit tokens into vault.

*It calls updateWeights() function which cancels current active weights change schedule. It reverts if balances were updated in the current block.*

**Parameters**

| Name            | Type                       | Description                |
| --------------- | -------------------------- | -------------------------- |
| tokenWithAmount | IProtocolAPI.TokenValue\[] | Deposit token with amount. |

#### description

```solidity
function description() external view returns (string)
```

Describes vault purpose and modelling assumptions for differentiating between vaults

*string cannot be immutable bytecode but only set in constructor*

**Returns**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| \_0  | string | undefined   |

#### disableTrading

```solidity
function disableTrading() external nonpayable
```

Disable swap.

#### enableTradingRiskingArbitrage

```solidity
function enableTradingRiskingArbitrage() external nonpayable
```

Enable swap with current weights.

#### enableTradingWithWeights

```solidity
function enableTradingWithWeights(IProtocolAPI.TokenValue[] tokenWithWeight) external nonpayable
```

Enable swap with updating weights.

*These are checked by Balancer in internal transactions: If weight length and token length match. If total sum of weights is one. If weight is greater than minimum.*

**Parameters**

| Name            | Type                       | Description              |
| --------------- | -------------------------- | ------------------------ |
| tokenWithWeight | IProtocolAPI.TokenValue\[] | Tokens with new weights. |

#### finalize

```solidity
function finalize() external nonpayable
```

Destroy vault and returns all funds to treasury owner.

#### finalized

```solidity
function finalized() external view returns (bool)
```

Indicates that the Vault has been finalized

**Returns**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \_0  | bool | undefined   |

#### getHoldings

```solidity
function getHoldings() external view returns (uint256[] amounts)
```

Underlying token balances.

**Returns**

| Name    | Type       | Description                       |
| ------- | ---------- | --------------------------------- |
| amounts | uint256\[] | Token balances in underlying pool |

#### getNormalizedWeights

```solidity
function getNormalizedWeights() external view returns (uint256[])
```

Get token weights.

**Returns**

| Name | Type       | Description                                    |
| ---- | ---------- | ---------------------------------------------- |
| \_0  | uint256\[] | Normalized weights of tokens on Balancer pool. |

#### getSwapFee

```solidity
function getSwapFee() external view returns (uint256)
```

Get swap fee.

*Divide by* *10\*\*18 for decimal representation*

**Returns**

| Name | Type    | Description                             |
| ---- | ------- | --------------------------------------- |
| \_0  | uint256 | Swap fee from underlying Balancer pool. |

#### getTokens

```solidity
function getTokens() external view returns (contract IERC20[] tokens)
```

Get IERC20 Tokens Balancer Pool.

**Returns**

| Name   | Type               | Description                     |
| ------ | ------------------ | ------------------------------- |
| tokens | contract IERC20\[] | IERC20 tokens of Balancer pool. |

#### getTokensData

```solidity
function getTokensData() external view returns (contract IERC20[], uint256[], uint256)
```

Get Token Data of Balancer Pool.

**Returns**

| Name | Type               | Description                          |
| ---- | ------------------ | ------------------------------------ |
| \_0  | contract IERC20\[] | IERC20 tokens of Balancer pool.      |
| \_1  | uint256\[]         | Balances of tokens of Balancer pool. |
| \_2  | uint256            | Last updated Blocknumber.            |

#### holding

```solidity
function holding(uint256 index) external view returns (uint256)
```

Balance of token with given index.

**Parameters**

| Name  | Type    | Description |
| ----- | ------- | ----------- |
| index | uint256 | undefined   |

**Returns**

| Name | Type    | Description                       |
| ---- | ------- | --------------------------------- |
| \_0  | uint256 | Token balance in underlying pool. |

#### initialDeposit

```solidity
function initialDeposit(IProtocolAPI.TokenValue[] tokenWithAmount) external nonpayable
```

Initialize Vault with first deposit.

*Initial deposit must be performed before calling withdraw() or deposit() functions. It enables trading, so weights and balances should be in line with market spot prices, otherwise there is a significant risk of arbitrage. This is checked by Balancer in internal transactions: If token amount is not zero when join pool.*

**Parameters**

| Name            | Type                       | Description                 |
| --------------- | -------------------------- | --------------------------- |
| tokenWithAmount | IProtocolAPI.TokenValue\[] | Deposit tokens with amount. |

#### initialized

```solidity
function initialized() external view returns (bool)
```

Indicates that the Vault has been initialized

**Returns**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \_0  | bool | undefined   |

#### initiateFinalization

```solidity
function initiateFinalization() external nonpayable
```

Initiate vault destruction and return all funds to treasury owner.

#### isSwapEnabled

```solidity
function isSwapEnabled() external view returns (bool)
```

Check if vault trading is enabled.

**Returns**

| Name | Type | Description                                                 |
| ---- | ---- | ----------------------------------------------------------- |
| \_0  | bool | If public swap is turned on, returns true, otherwise false. |

#### lastFeeCheckpoint

```solidity
function lastFeeCheckpoint() external view returns (uint256)
```

Last timestamp where guardian fee index was locked.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### lastSwapFeeCheckpoint

```solidity
function lastSwapFeeCheckpoint() external view returns (uint256)
```

Last timestamp where swap fee was updated.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### managementFee

```solidity
function managementFee() external view returns (uint256)
```

Management fee earned proportion per second.

*10\*\*18 is 100%*

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### guardian

```solidity
function guardian() external view returns (address)
```

Controls vault parameters.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### guardianFee

```solidity
function guardiansFee(address, uint256) external view returns (uint256)
```

Fee earned amount by current guardian and previous guardians.

**Parameters**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |
| \_1  | uint256 | undefined   |

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### guardiansFeeTotal

```solidity
function guardiansFeeTotal(uint256) external view returns (uint256)
```

Total guardian fee earned amount

**Parameters**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### merkleOrchard

```solidity
function merkleOrchard() external view returns (contract IBMerkleOrchard)
```

Balancer Merkle Orchard.

**Returns**

| Name | Type                     | Description |
| ---- | ------------------------ | ----------- |
| \_0  | contract IBMerkleOrchard | undefined   |

#### noticePeriod

```solidity
function noticePeriod() external view returns (uint256)
```

Notice period for vault termination (in seconds).

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### noticeTimeoutAt

```solidity
function noticeTimeoutAt() external view returns (uint256)
```

Timestamp when notice elapses or 0 if not yet set

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### owner

```solidity
function owner() external view returns (address)
```

*Returns the address of the current owner.*

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### pendingOwner

```solidity
function pendingOwner() external view returns (address)
```

Pending account to accept ownership of vault.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### pool

```solidity
function pool() external view returns (contract IBManagedPool)
```

Balancer Managed Pool.

**Returns**

| Name | Type                   | Description |
| ---- | ---------------------- | ----------- |
| \_0  | contract IBManagedPool | undefined   |

#### poolController

```solidity
function poolController() external view returns (contract IBManagedPoolController)
```

Balancer Managed Pool Controller.

**Returns**

| Name | Type                             | Description |
| ---- | -------------------------------- | ----------- |
| \_0  | contract IBManagedPoolController | undefined   |

#### poolId

```solidity
function poolId() external view returns (bytes32)
```

Pool ID of Balancer pool on Vault.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | bytes32 | undefined   |

#### renounceOwnership

```solidity
function renounceOwnership() external nonpayable
```

Disable ownership renounceable

#### setGuardian

```solidity
function setGuardian(address newGuardian) external nonpayable
```

Change guardian.

**Parameters**

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| newGuardian | address | undefined   |

#### setSwapFee

```solidity
function setSwapFee(uint256 newSwapFee) external nonpayable
```

Change swap fee.

*These are checked by Balancer in internal transactions: If new swap fee is less than maximum. If new swap fee is greater than minimum.*

**Parameters**

| Name       | Type    | Description |
| ---------- | ------- | ----------- |
| newSwapFee | uint256 | undefined   |

#### sweep

```solidity
function sweep(address token, uint256 amount) external nonpayable
```

Withdraw any tokens accidentally sent to vault.

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| token  | address | undefined   |
| amount | uint256 | undefined   |

#### transferOwnership

```solidity
function transferOwnership(address newOwner) external nonpayable
```

Offer ownership to another address

*It disables immediate transfer of ownership*

**Parameters**

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| newOwner | address | undefined   |

#### updateWeightsGradually

```solidity
function updateWeightsGradually(IProtocolAPI.TokenValue[] tokenWithWeight, uint256 startTime, uint256 endTime) external nonpayable
```

Initiate weight move to target in given update window.

*These are checked by Balancer in internal transactions: If target weight length and token length match. If total sum of target weights is one. If target weight is greater than minimum.*

**Parameters**

| Name            | Type                       | Description                                                |
| --------------- | -------------------------- | ---------------------------------------------------------- |
| tokenWithWeight | IProtocolAPI.TokenValue\[] | Tokens with target weights.                                |
| startTime       | uint256                    | Timestamp at which weight movement should start.           |
| endTime         | uint256                    | Timestamp at which the weights should reach target values. |

#### validator

```solidity
function validator() external view returns (contract IWithdrawalValidator)
```

Verifies withdraw limits.

**Returns**

| Name | Type                          | Description |
| ---- | ----------------------------- | ----------- |
| \_0  | contract IWithdrawalValidator | undefined   |

#### withdraw

```solidity
function withdraw(IProtocolAPI.TokenValue[] tokenWithAmount) external nonpayable
```

Withdraw tokens up to requested amounts.

*It calls updateWeights() function which cancels current active weights change schedule.*

**Parameters**

| Name            | Type                       | Description                   |
| --------------- | -------------------------- | ----------------------------- |
| tokenWithAmount | IProtocolAPI.TokenValue\[] | Requested tokens with amount. |

#### withdrawIfBalanceUnchanged

```solidity
function withdrawIfBalanceUnchanged(IProtocolAPI.TokenValue[] tokenWithAmount) external nonpayable
```

Withdraw tokens up to requested amounts.

*It calls updateWeights() function which cancels current active weights change schedule. It reverts if balances were updated in the current block.*

**Parameters**

| Name            | Type                       | Description                   |
| --------------- | -------------------------- | ----------------------------- |
| tokenWithAmount | IProtocolAPI.TokenValue\[] | Requested tokens with amount. |

### Events

#### CancelWeightUpdates

```solidity
event CancelWeightUpdates(uint256[] weights)
```

Emitted when cancelWeightUpdates is called.

**Parameters**

| Name    | Type       | Description                |
| ------- | ---------- | -------------------------- |
| weights | uint256\[] | Current weights of tokens. |

#### Created

```solidity
event Created(address indexed factory, string name, string symbol, contract IERC20[] tokens, uint256[] weights, uint256 swapFeePercentage, address indexed guardian, address indexed validator, uint256 noticePeriod, uint256 managementFee, address merkleOrchard, string description)
```

Emitted when the vault is created.

**Parameters**

| Name                | Type               | Description                                  |
| ------------------- | ------------------ | -------------------------------------------- |
| factory `indexed`   | address            | Balancer Managed Pool factory address.       |
| name                | string             | Name of Pool Token.                          |
| symbol              | string             | Symbol of Pool Token.                        |
| tokens              | contract IERC20\[] | Token addresses.                             |
| weights             | uint256\[]         | Token weights.                               |
| swapFeePercentage   | uint256            | Pool swap fee.                               |
| guardian `indexed`  | address            | Vault guardian address.                      |
| validator `indexed` | address            | Withdrawal validator contract address.       |
| noticePeriod        | uint256            | Notice period (in seconds).                  |
| managementFee       | uint256            | Management fee earned proportion per second. |
| merkleOrchard       | address            | Merkle Orchard address.                      |
| description         | string             | Vault description.                           |

#### Deposit

```solidity
event Deposit(uint256[] requestedAmounts, uint256[] amounts, uint256[] weights)
```

Emitted when tokens are deposited.

**Parameters**

| Name             | Type       | Description                      |
| ---------------- | ---------- | -------------------------------- |
| requestedAmounts | uint256\[] | Requested amounts to deposit.    |
| amounts          | uint256\[] | Deposited amounts.               |
| weights          | uint256\[] | Token weights following deposit. |

#### DistributeGuardianFees

```solidity
event DistributeGuardianFees(address indexed guardian, uint256[] amounts)
```

Emitted when management fees are withdrawn.

**Parameters**

| Name               | Type       | Description        |
| ------------------ | ---------- | ------------------ |
| guardian `indexed` | address    | Guardian address.  |
| amounts            | uint256\[] | Withdrawn amounts. |

#### EnabledTradingWithWeights

```solidity
event EnabledTradingWithWeights(uint256 time, uint256[] weights)
```

Emitted when enableTradingWithWeights is called.

**Parameters**

| Name    | Type       | Description               |
| ------- | ---------- | ------------------------- |
| time    | uint256    | timestamp of updates.     |
| weights | uint256\[] | Target weights of tokens. |

#### FinalizationInitiated

```solidity
event FinalizationInitiated(uint256 noticeTimeoutAt)
```

Emitted when initiateFinalization is called.

**Parameters**

| Name            | Type    | Description                   |
| --------------- | ------- | ----------------------------- |
| noticeTimeoutAt | uint256 | Timestamp for notice timeout. |

#### Finalized

```solidity
event Finalized(address indexed caller, uint256[] amounts)
```

Emitted when vault is finalized.

**Parameters**

| Name             | Type       | Description             |
| ---------------- | ---------- | ----------------------- |
| caller `indexed` | address    | Address of finalizer.   |
| amounts          | uint256\[] | Returned token amounts. |

#### GuardianChanged

```solidity
event GuardianChanged(address indexed previousGuardian, address indexed guardian)
```

Emitted when guardian is changed.

**Parameters**

| Name                      | Type    | Description                |
| ------------------------- | ------- | -------------------------- |
| previousGuardian`indexed` | address | Previous guardian address. |
| guardian `indexed`        | address | New guardian address.      |

#### OwnershipTransferCanceled

```solidity
event OwnershipTransferCanceled(address indexed currentOwner, address indexed canceledOwner)
```

Emitted when cancelOwnershipTransfer is called.

**Parameters**

| Name                    | Type    | Description                |
| ----------------------- | ------- | -------------------------- |
| currentOwner `indexed`  | address | Address of current owner.  |
| canceledOwner `indexed` | address | Address of canceled owner. |

#### OwnershipTransferOffered

```solidity
event OwnershipTransferOffered(address indexed currentOwner, address indexed pendingOwner)
```

Emitted when transferOwnership is called.

**Parameters**

| Name                   | Type    | Description               |
| ---------------------- | ------- | ------------------------- |
| currentOwner `indexed` | address | Address of current owner. |
| pendingOwner `indexed` | address | Address of pending owner. |

#### OwnershipTransferred

```solidity
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
```

**Parameters**

| Name                    | Type    | Description |
| ----------------------- | ------- | ----------- |
| previousOwner `indexed` | address | undefined   |
| newOwner `indexed`      | address | undefined   |

#### SetSwapEnabled

```solidity
event SetSwapEnabled(bool swapEnabled)
```

Emitted when swap is enabled/disabled.

**Parameters**

| Name        | Type | Description        |
| ----------- | ---- | ------------------ |
| swapEnabled | bool | New state of swap. |

#### SetSwapFee

```solidity
event SetSwapFee(uint256 swapFee)
```

Emitted when swap fee is updated.

**Parameters**

| Name    | Type    | Description   |
| ------- | ------- | ------------- |
| swapFee | uint256 | New swap fee. |

#### UpdateWeightsGradually

```solidity
event UpdateWeightsGradually(uint256 startTime, uint256 endTime, uint256[] weights)
```

Emitted when updateWeightsGradually is called.

**Parameters**

| Name      | Type       | Description                 |
| --------- | ---------- | --------------------------- |
| startTime | uint256    | Start timestamp of updates. |
| endTime   | uint256    | End timestamp of updates.   |
| weights   | uint256\[] | Target weights of tokens.   |

#### Withdraw

```solidity
event Withdraw(uint256[] requestedAmounts, uint256[] amounts, uint256[] allowances, uint256[] weights)
```

Emitted when tokens are withdrawn.

**Parameters**

| Name             | Type       | Description                         |
| ---------------- | ---------- | ----------------------------------- |
| requestedAmounts | uint256\[] | Requested amounts to withdraw.      |
| amounts          | uint256\[] | Withdrawn amounts.                  |
| allowances       | uint256\[] | Token withdrawal allowances.        |
| weights          | uint256\[] | Token weights following withdrawal. |

### Errors

#### Aera\_\_AmountExceedAvailable

```solidity
error Aera__AmountExceedAvailable(address token, uint256 amount, uint256 available)
```

**Parameters**

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| token     | address | undefined   |
| amount    | uint256 | undefined   |
| available | uint256 | undefined   |

#### Aera\_\_AmountIsBelowMin

```solidity
error Aera__AmountIsBelowMin(uint256 actual, uint256 min)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| min    | uint256 | undefined   |

#### Aera\_\_BalanceChangedInCurrentBlock

```solidity
error Aera__BalanceChangedInCurrentBlock()
```

#### Aera\_\_CallerIsNotGuardian

```solidity
error Aera__CallerIsNotGuardian()
```

#### Aera\_\_CallerIsNotOwnerOrGuardian

```solidity
error Aera__CallerIsNotOwnerOrGuardian()
```

#### Aera\_\_CannotSetSwapFeeBeforeCooldown

```solidity
error Aera__CannotSetSwapFeeBeforeCooldown()
```

#### Aera\_\_CannotSweepPoolToken

```solidity
error Aera__CannotSweepPoolToken()
```

#### Aera\_\_DescriptionIsEmpty

```solidity
error Aera__DescriptionIsEmpty()
```

#### Aera\_\_DifferentTokensInPosition

```solidity
error Aera__DifferentTokensInPosition(address actual, address sortedToken, uint256 index)
```

**Parameters**

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| actual      | address | undefined   |
| sortedToken | address | undefined   |
| index       | uint256 | undefined   |

#### Aera\_\_FinalizationNotInitiated

```solidity
error Aera__FinalizationNotInitiated()
```

#### Aera\_\_ManagementFeeIsAboveMax

```solidity
error Aera__ManagementFeeIsAboveMax(uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_GuardianIsOwner

```solidity
error Aera__GuardianIsOwner(address newGuardian)
```

**Parameters**

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| newGuardian | address | undefined   |

#### Aera\_\_GuardianIsZeroAddress

```solidity
error Aera__GuardianIsZeroAddress()
```

#### Aera\_\_NoAvailableFeeForCaller

```solidity
error Aera__NoAvailableFeeForCaller(address caller)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| caller | address | undefined   |

#### Aera\_\_NoPendingOwnershipTransfer

```solidity
error Aera__NoPendingOwnershipTransfer()
```

#### Aera\_\_NotPendingOwner

```solidity
error Aera__NotPendingOwner()
```

#### Aera\_\_NoticePeriodIsAboveMax

```solidity
error Aera__NoticePeriodIsAboveMax(uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_NoticeTimeoutNotElapsed

```solidity
error Aera__NoticeTimeoutNotElapsed(uint256 noticeTimeoutAt)
```

**Parameters**

| Name            | Type    | Description |
| --------------- | ------- | ----------- |
| noticeTimeoutAt | uint256 | undefined   |

#### Aera\_\_OwnerIsZeroAddress

```solidity
error Aera__OwnerIsZeroAddress()
```

#### Aera\_\_PoolSwapIsAlreadyEnabled

```solidity
error Aera__PoolSwapIsAlreadyEnabled()
```

#### Aera\_\_SwapFeePercentageChangeIsAboveMax

```solidity
error Aera__SwapFeePercentageChangeIsAboveMax(uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_ValidatorIsNotMatched

```solidity
error Aera__ValidatorIsNotMatched(uint256 numTokens, uint256 numAllowances)
```

**Parameters**

| Name          | Type    | Description |
| ------------- | ------- | ----------- |
| numTokens     | uint256 | undefined   |
| numAllowances | uint256 | undefined   |

#### Aera\_\_ValidatorIsNotValid

```solidity
error Aera__ValidatorIsNotValid(address validator)
```

**Parameters**

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| validator | address | undefined   |

#### Aera\_\_ValueLengthIsNotSame

```solidity
error Aera__ValueLengthIsNotSame(uint256 numTokens, uint256 numValues)
```

ERRORS ///

**Parameters**

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| numTokens | uint256 | undefined   |
| numValues | uint256 | undefined   |

#### Aera\_\_VaultIsAlreadyFinalized

```solidity
error Aera__VaultIsAlreadyFinalized()
```

#### Aera\_\_VaultIsAlreadyInitialized

```solidity
error Aera__VaultIsAlreadyInitialized()
```

#### Aera\_\_VaultIsFinalizing

```solidity
error Aera__VaultIsFinalizing()
```

#### Aera\_\_VaultIsNotRenounceable

```solidity
error Aera__VaultIsNotRenounceable()
```

#### Aera\_\_VaultNotInitialized

```solidity
error Aera__VaultNotInitialized()
```

#### Aera\_\_WeightChangeDurationIsBelowMin

```solidity
error Aera__WeightChangeDurationIsBelowMin(uint256 actual, uint256 min)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| min    | uint256 | undefined   |

#### Aera\_\_WeightChangeEndBeforeStart

```solidity
error Aera__WeightChangeEndBeforeStart()
```

#### Aera\_\_WeightChangeEndTimeIsAboveMax

```solidity
error Aera__WeightChangeEndTimeIsAboveMax(uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_WeightChangeRatioIsAboveMax

```solidity
error Aera__WeightChangeRatioIsAboveMax(address token, uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| token  | address | undefined   |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_WeightChangeStartTimeIsAboveMax

```solidity
error Aera__WeightChangeStartTimeIsAboveMax(uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_WeightIsAboveMax

```solidity
error Aera__WeightIsAboveMax(uint256 actual, uint256 max)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| max    | uint256 | undefined   |

#### Aera\_\_WeightIsBelowMin

```solidity
error Aera__WeightIsBelowMin(uint256 actual, uint256 min)
```

**Parameters**

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| actual | uint256 | undefined   |
| min    | uint256 | undefined   |


---

# 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.aera.finance/v1-archive/contracts/aeravaultv1.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.
