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:
params
VaultParams
The custom data structure containing the Vault Parameters' variables and assigned values.
Returns:
vaultAddress
address
The address of the new vault after it is created.
numVaults
function numVaults() external view returns (uint256)
Return Value:
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:
_protocolFee
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:
_governance
address
The new address of Charm Governance. The changes will not take effect until the new address calls accepGovernance
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:
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:
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
The provisional address of Charm Governance. Not finalised until it calls calls accepGovernanc
protocolFee
uint256
The protocol fee applied to all vaults created using Alpha Vaults.
Last updated