Vault
https://github.com/Into-the-Fathom/fathom-vaults-smart-contracts/blob/master/contracts/vault/packages/VaultPackage.sol
FathomVault is proxy, and its implementation is VaultPackage.
The VaultPackage serves as the template for creating and managing vaults within the Fathom ecosystem. It supports a variety of operations including asset management, strategy implementation, and fee assessment in an efficient and secure manner.
State Variables
profitMaxUnlockTime (
uint256): Maximum time over which profits from the vault are unlocked.assetContract (
ERC20): ERC20 token contract address of the vault's primary asset.decimalsValue (
uint8): Decimal precision of the vault's primary asset.sharesName (
string): Name of the token shares issued by the vault.sharesSymbol (
string): Symbol of the token shares issued by the vault.factory (
address): Address of the factory contract that deployed the vault.accountant (
address): Address of the accountant contract responsible for managing the vault's fee assessments.assetType (
uint256): Type identifier for the asset, addressing specific behaviors or requirements.defaultQueue (
address[]): The default strategy queue used for managing assets.useDefaultQueue (
bool): Flag determining if the default strategy queue is always used.depositLimit (
uint256): Maximum amount of assets that can be deposited into the vault.depositLimitModule (
address): Address of the contract handling dynamic deposit limits.withdrawLimitModule (
address): Address of the contract handling dynamic withdrawal limits.minimumTotalIdle (
uint256): Minimum amount of total idle assets required in the vault.strategies (
mapping(address => StrategyParams)): Mapping of strategy addresses to their operational parameters.
Set Functions
setAccountant
setAccountantArguments:
newAccountant(address): Address of the new accountant contract.
setDefaultQueue
setDefaultQueueArguments:
newDefaultQueue(address[] calldata): Array of strategy addresses to update the default queue.
setUseDefaultQueue
setUseDefaultQueueArguments:
_useDefaultQueue(bool): New boolean value to set the use of the default queue.
setDepositLimit
setDepositLimitArguments:
_depositLimit(uint256): New deposit limit for the vault.
setDepositLimitModule
setDepositLimitModuleArguments:
_depositLimitModule(address): Address of the new deposit limit module.
setWithdrawLimitModule
setWithdrawLimitModuleArguments:
_withdrawLimitModule(address): Address of the new withdrawal limit module.
setMinimumTotalIdle
setMinimumTotalIdleArguments:
_minimumTotalIdle(uint256): New minimum total idle assets for the vault.
setProfitMaxUnlockTime
setProfitMaxUnlockTimeArguments:
_newProfitMaxUnlockTime(uint256): New maximum time for profit unlocking.
addStrategy
addStrategyArguments:
newStrategy(address): Address of the new strategy to add to the vault.
revokeStrategy
revokeStrategyArguments:
strategy(address): Strategy address to revoke.force(bool): Flag to force revocation, potentially incurring losses.
updateMaxDebtForStrategy
updateMaxDebtForStrategyArguments:
strategy(address): Strategy address to update.newMaxDebt(uint256): New maximum debt for the strategy.
shutdownVault
shutdownVaultShuts down the vault, preventing new deposits and initiating asset liquidation processes.
Read Functions
getDebt
getDebtArguments:
strategy(address): Strategy address to query the current debt.
Returns: Current debt amount for the specified strategy.
totalSupply
totalSupplyReturns the total supply of shares issued by the vault.
totalAssets
totalAssetsReturns the total assets managed by the vault, including both idle assets and those engaged in strategies.
unlockedShares
unlockedSharesReturns the number of shares that have been unlocked based on the vault's profit unlocking schedule.
pricePerShare
pricePerShareReturns the current price per share of the vault, based on the underlying asset value.
Events
UpdatedAccountant
UpdatedAccountantParameters:
newAccountant(address): Address of the updated accountant.
UpdatedDefaultQueue
UpdatedDefaultQueueParameters:
newDefaultQueue(address[]): Updated array of strategy addresses for the default queue.
UpdatedUseDefaultQueue
UpdatedUseDefaultQueueParameters:
_useDefaultQueue(bool): Updated flag state for using the default queue.
UpdatedDepositLimit
UpdatedDepositLimitParameters:
_depositLimit(uint256): New deposit limit set for the vault.
UpdatedDepositLimitModule
UpdatedDepositLimitModuleParameters:
_depositLimitModule(address): Address of the newly set deposit limit module.
UpdatedWithdrawLimitModule
UpdatedWithdrawLimitModuleParameters:
_withdrawLimitModule(address): Address of the newly set withdrawal limit module.
UpdatedMinimumTotalIdle
UpdatedMinimumTotalIdleParameters:
_minimumTotalIdle(uint256): New minimum total idle assets set for the vault.
UpdatedProfitMaxUnlockTime
UpdatedProfitMaxUnlockTimeParameters:
_newProfitMaxUnlockTime(uint256): New maximum time for unlocking vault profits.
Last updated
Was this helpful?