🏭Factory
Factory contract is the main contract of the protocol. It is used to create vault proxies and serves as registry.
Last updated
Factory contract is the main contract of the protocol. It is used to create vault proxies and serves as registry.
Last updated
Returns the number of vaults from the factory.
Return Value:
Type | Description |
---|---|
Returns a list of all whitelisted token addresses.
Return Value:
Type | Description |
---|---|
Returns the address of the fees receiver.
Call Parameters:
Return Value:
Checks if a token is whitelisted.
Call Parameters:
Return Value:
Returns all parameters from the factory.
Return Values:
Returns the parameters of a vault.
Call Parameters:
Return Values:
Returns the amount of fees to harvest according to a vault address.
Call Parameters:
Return Values:
Returns the share parameters from a vault according to its address.
Call Parameters:
Return Values:
Returns user's share information according to the vault's address and the user address.
Call Parameters:
Return Values:
Returns the roles names and the addresses of the admins, strategists and harvesters according to a vault address.
Call Parameters:
Return Values:
Creates a vault with the parameters requested.
This method can only be called by address with VAULT_CREATOR_ROLE.
Call Parameters:
Settles the new AccessManager.
This method can only be called by the contract owner.
Call Parameters:
Settles the new FeesManager.
This method can only be called by the contract owner.
Call Parameters:
Settles the new Harvester.
This method can only be called by the contract owner.
Call Parameters:
Settles the new aggregator proxy and router.
This method can only be called by the contract owner.
Call Parameters:
Settles the new swap adapter.
This method can only be called by the contract owner.
Call Parameters:
Whitelists a tokens and their oracles for vaults.
This method can only be called by the contract owner.
Call Parameters:
Removes tokens and their oracles from the whitelist.
This method can only be called by the contract owner.
Parameters:
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
uint256
number of vaults
address[]
addresses of whitelisted tokens
_feeType
uint256
0 corresponds to managementFeesReceiver
address
address of the fees receivercreateVault
_tokens
address
token's address to check
bool
returns true
if the address of the token is whitelisted
address[]
addresses of the vaults
address
address of the fees manager
address
address of the access manager
address
address of the harvester
address
address of the proxy
address
address of the router
_vault
address
address of the vault
vTokens
VLib.Token[]
list of the tokens managed by the vault
constantProps
VLib.constantProps
constant parameters from the vault
historyProps
VLib.HistoryProps
previous parameters
configProps
VLib.ConfigProps
main configuration parameters from the vault
feesProps
VLib.FeesProps
fees parameter from the vault
securityProps
VLib.securityProps
security parameter from the vault
balances
uint256
amount of each assets in the vault
positions
uint256
positions from the vaults
vvl
uint256
vault's TVL
sharePrice
uint256
share price
ongoingFees
uint256[2]
amount of management and performance fees to harvest
_vault
address
address of the vault
ongoingManagementFees
uint256
amount of management fees to harvest
ongoingPerformanceFees
uint256
amount of performance fees to harvest
_vault
address
address of the vault
share
address
address of vault's share
name
string
name of the vault's share
symbol
string
symbol of vault's share
decimals
uint8
vault's share decimals
supply
uint256
vault's share supply
transferable
bool
vault's share transferability
_vault
address
address of the vault
_user
address
address of the user
share
address
address of vault's share
balance
uint256
amount of share in user's wallet
allowanceToVault
uint256
allowance between the user and the vault
_vault
address
address of the vault
bytes32[3]
list of roles names
address[]
list of admins addresses
address[]
list of strategists addresses
address[]
list of harvesters addresses
_tokensAddresses
address[]
all manageable assets
_creationProps
VLib.CreationProps
main vault information
_feesProps
VLib.FeesProps
fees parameters
_securityProps
VLib.SecurityProps
security parameters
_newAccessManager
address
address of the new AccessManager
_newFeesManager
address
address of the new FeesManager
_newHarvester
address
address of the new Harvester
_newSwapRouter
address
address of the new router
_newSwapProxy
address
address of the new proxy
_newSwapAdapter
address
address of the new swap adapter
_token
address[]
list of tokens addresses to whitelist
_priceFeeds
address[]
list token's oracle addresses to whitelist
_tokens
address[]
list of tokens addresses to remove