AlphaProVaultFactory

The contract that creates liquidity vaults.

createVault

function createVault(
  VaultParams calldata params,
) external returns (address vaultAddress)

Creates a vault for a given set of vault parameters.

Parameters:

Varible
Type
Description

params

VaultParams

Returns:

Variable
Type
Description

vaultAddress

address

The address of the new vault after it is created.

numVaults

function numVaults() external view returns (uint256)

Return Value:

Variable
Type
Description

vaults.length

uint256

The number of vaults created by the factory.

setProtocolFee

function setProtocolFee(uint256 _protocolFee) external onlyGovernance

Sets the protocol fee as a % of fees received from Uniswap. Can only be called by Charm Governance.

Parameters:

Variale
Type
Description

uint256

The amount of protocol fees as a % of fees earned by the vault, with 1 unit of fees = 1e-4 % of fees earned.

The maximum protocol fee is 20000 units (20%).

setGovernance

function setGovernance(address _governance) external onlyGovernance

The first step to change the address of Charm Governance. Can only called by Charm Governance.

Parameters:

Variable
Type
Description

address

acceptGovernance

function acceptGovernance() external

The second step to to change the address of Charm Governance. Can only be called by the address assigned to _governance.

State Changes:

Variable
Type
Description

governance

address

Setting the value of _governance as the new Charm Governance address.

Getter functions for public variables

Getter functions are automatically generated for the following public variables:

Variable
Type
Description

template

address

vaults

array

The array that contains the address of all the vaults created by Alpha Vaults.

isVault

mapping

The mapping used to check whether a vault have been created by Alpha Vaults.

governance

address

The address of Charm Governance.

pendingGovernance

address

protocolFee

uint256

The protocol fee applied to all vaults created using Alpha Vaults.

Last updated