Fathom Protocol
  • Introduction
  • FXD Stablecoin
    • FXD Smart Contract Architecture
    • Minting and Burning Mechanisms with LTV Ratio
    • Soft-Pegging to the US Dollar
    • Opening and closing position flows
    • BookKeeping mechanism
      • Stablecoin Accounting
      • Collateral Accounting
    • Liquidation
      • Fixed Spread Liquidation Strategy
      • Liquidation process walk through
    • Emergency Shutdown
    • Maths for position safety
    • Fee structure
    • Risk Management
    • Interfaces
      • ProxyWalletRegistry
      • ProxyWallet
        • FathomStablecoinProxyActions
      • CollateralPoolConfig
      • BookKeeper
      • FXD
      • LiquidationEngine
      • FlashMintModule
      • PriceFeed
      • ShowStopper
      • StabilityFeeCollector
      • SystemDebtEngine
      • AdminControls
    • Deployments
      • XDC Network
    • User Guides
      • Open FXD position
      • Top Up FXD Position
      • Repay and close FXD position
    • Fathom Stablecoin Smart Contracts
    • Fathom Stablecoin Subgraph
  • Vaults
    • Key Features
    • Definitions
    • Architecture
    • Fees
    • Workflows
    • Vault Management
    • Strategy Creation
    • Interfaces
      • Factory
      • Vault
      • BaseStrategy
      • TokenizedStrategy
    • Deployments
      • XDC Network
    • User Guides
      • Deposit and Withdraw in Vault
    • Fathom Vaults Smart Contracts
    • Fathom Vaults Subgraph
  • Lending
    • Core Concepts
    • Protocol Mechanics
    • Architecture
    • Interfaces
      • FmToken
      • VariableDebtToken
      • StableDebtToken
      • L2Pool
      • PoolAddressesProvider
    • User Guides
      • Supply, Borrow, Repay and Withdraw Asset
    • Deployments
      • XDC Network
    • Fathom Lending Smart Contracts
    • Fathom Lending Subgraph
  • DEX
    • Core Concepts
    • Architecture
    • Interfaces
      • Factory
      • Pair
      • Router
    • User Guides
      • Providing Liquidity
      • Swapping Assets
    • Deployments
      • XDC Network
    • Fathom DEX Smart Contracts
    • Fathom DEX Subgraph
  • DAO
    • DAO Structure
    • Governance Process
    • Staking Process
    • Treasury Management
    • Risk Management and Security Measures
    • Contributing to Fathom DAO
    • Interfaces
      • FTHM
      • Staking
        • Vault
        • RewardsCalculator
        • vFTHM
      • Governance
        • TimelockController
    • Deployments
      • XDC Network
    • User Guides
      • Staking
      • Proposing
      • Voting
    • Fathom DAO Smart Contracts
    • Fathom DAO Subgraph
  • Whitepaper
    • Version 1.0
  • Resources
  • FXD Deployments
  • FTHM Deployments
  • Privacy Policy
  • Terms of Service
Powered by GitBook

Copyright© Fathom App 2024.

On this page
  • State Variables
  • Set Functions
  • Read Functions
  • Events

Was this helpful?

Export as PDF
  1. Vaults
  2. Interfaces

Vault

https://github.com/Into-the-Fathom/fathom-vaults-smart-contracts/blob/master/contracts/vault/packages/VaultPackage.sol

PreviousFactoryNextBaseStrategy

Last updated 11 months ago

Was this helpful?

is proxy, and its implementation is .

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

  • Arguments:

    • newAccountant (address): Address of the new accountant contract.

setDefaultQueue

  • Arguments:

    • newDefaultQueue (address[] calldata): Array of strategy addresses to update the default queue.

setUseDefaultQueue

  • Arguments:

    • _useDefaultQueue (bool): New boolean value to set the use of the default queue.

setDepositLimit

  • Arguments:

    • _depositLimit (uint256): New deposit limit for the vault.

setDepositLimitModule

  • Arguments:

    • _depositLimitModule (address): Address of the new deposit limit module.

setWithdrawLimitModule

  • Arguments:

    • _withdrawLimitModule (address): Address of the new withdrawal limit module.

setMinimumTotalIdle

  • Arguments:

    • _minimumTotalIdle (uint256): New minimum total idle assets for the vault.

setProfitMaxUnlockTime

  • Arguments:

    • _newProfitMaxUnlockTime (uint256): New maximum time for profit unlocking.

addStrategy

  • Arguments:

    • newStrategy (address): Address of the new strategy to add to the vault.

revokeStrategy

  • Arguments:

    • strategy (address): Strategy address to revoke.

    • force (bool): Flag to force revocation, potentially incurring losses.

updateMaxDebtForStrategy

  • Arguments:

    • strategy (address): Strategy address to update.

    • newMaxDebt (uint256): New maximum debt for the strategy.

shutdownVault

Shuts down the vault, preventing new deposits and initiating asset liquidation processes.

Read Functions

getDebt

  • Arguments:

    • strategy (address): Strategy address to query the current debt.

  • Returns: Current debt amount for the specified strategy.

totalSupply

Returns the total supply of shares issued by the vault.

totalAssets

Returns the total assets managed by the vault, including both idle assets and those engaged in strategies.

unlockedShares

Returns the number of shares that have been unlocked based on the vault's profit unlocking schedule.

pricePerShare

Returns the current price per share of the vault, based on the underlying asset value.

Events

UpdatedAccountant

  • Parameters:

    • newAccountant (address): Address of the updated accountant.

UpdatedDefaultQueue

  • Parameters:

    • newDefaultQueue (address[]): Updated array of strategy addresses for the default queue.

UpdatedUseDefaultQueue

  • Parameters:

    • _useDefaultQueue (bool): Updated flag state for using the default queue.

UpdatedDepositLimit

  • Parameters:

    • _depositLimit (uint256): New deposit limit set for the vault.

UpdatedDepositLimitModule

  • Parameters:

    • _depositLimitModule (address): Address of the newly set deposit limit module.

UpdatedWithdrawLimitModule

  • Parameters:

    • _withdrawLimitModule (address): Address of the newly set withdrawal limit module.

UpdatedMinimumTotalIdle

  • Parameters:

    • _minimumTotalIdle (uint256): New minimum total idle assets set for the vault.

UpdatedProfitMaxUnlockTime

  • Parameters:

    • _newProfitMaxUnlockTime (uint256): New maximum time for unlocking vault profits.

FathomVault
VaultPackage